>[!abstract]
> In specific circumstances, adding complexity to a problem can in fact make it easier to solve. The camel principle (an informal name found online) states that adding and subtracting the same quantity does not change the equality (e.g., $x = x + (y - y)$), but can help with the computation. It is an equivalence-preserving transformation.
>
> The canonical example is that of an old Bedouin who passes away and leaves his camels to his three sons as follows: one half to his eldest, one third to the middle son, and one ninth to the youngest. The man had 17 camels at the time of his passing, which cannot be split into $1/2$, $1/3$, and $1/9$.
>
> A wise neighbor comes along and lends one of his camels to the boys, making the total 18. The eldest takes half (9 camels), the middle takes one third (6 camels), and the youngest takes one ninth (2 camels), as per their father's wish. That leaves one camel, which the neighbor takes back. Everybody is happy.
>[!example] Example: the quadratic equation
>1. The well-known solution to an equation of the quadratic form is:
>$ax^2+bx+c=0 \leftrightarrow x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}$
>2. We can derive this solution using the camel principle. Let's start by factoring the left-hand terms by $\textcolor{aquamarine}{a}$ (assuming that $\textcolor{aquamarine}{a} \ne 0$):
>$ax^2+bx+c = \textcolor{aquamarine}{a}[x^2 + \frac{bx}{a} + \frac{c}{a}] = 0$
>3. Since $a \ne 0$, the part in square brackets must be equal to $0$, so we can remove the factor $a$:
>$\textcolor{aquamarine}{\cancel{a}}[x^2 + \frac{bx}{a} + \frac{c}{a}] = x^2 + \frac{bx}{a} + \frac{c}{a}= 0$
>4. Let's move the constant $c/a$ to the other side:
$x^2 + \frac{bx}{a} = -\frac{c}{a}$
>5. Now ==let's apply the camel principle== and add a quantity $\textcolor{Apricot}{(b / 2a)^2}$ to each side such as the equality is preserved ("completing the square"):
>$x^2 + \frac{bx}{a} \textcolor{Apricot}{+ (\frac{b}{2a})^2} = -\frac{c}{a} \textcolor{Apricot}{+ (\frac{b}{2a})^2}$
>6. In the left-hand side of this equation, let's multiply the numerator and the denominator of $bx/a$ by $\textcolor{aquamarine}{2}$, keeping the equality unchanged:
>$x^2 + \frac{bx}{a} + (\frac{b}{2a})^2 = x^2 + \frac{\textcolor{aquamarine}{2}bx}{\textcolor{aquamarine}{2}a} + (\frac{b}{2a})^2 = x^2 + 2(\frac{b}{2a})x + (\frac{b}{2a})^2$
>7. This surfaces the famous identity $\textcolor{YellowGreen}{\alpha^2 + 2\alpha\beta + \beta^2} = \textcolor{Salmon}{(\alpha + \beta)^2}$ where $\alpha = x$ and $\beta = b/2a$:
>$\textcolor{YellowGreen}{x^2 + 2(\frac{b}{2a})x + (\frac{b}{2a})^2} = \textcolor{Salmon}{(x + \frac{b}{2a})^2}$
>8. Let's also simplify the right-hand side of the equation from step 5 by using a common denominator ($\textcolor{aquamarine}{4a^2}$) to both fractions:
>$-\frac{c}{a} + (\frac{b}{2a})^2 = -\frac{\textcolor{aquamarine}{4a} \cdot c}{\textcolor{aquamarine}{4a} \cdot a} + \frac{b^2}{4a^2} = -\frac{4ac}{4a^2} + \frac{b^2}{4a^2} = \frac{b^2-4ac}{4a^2}$
>9. Rejoining with the left-hand side of the equation from step 7, we get:
>$\textcolor{CornflowerBlue}{(x + \frac{b}{2a})^2} = \textcolor{Lavender}{\frac{b^2-4ac}{4a^2}}$
>10. We can now solve for $x$. Let's take the square root of both sides to get rid of the square:
>$\sqrt{\textcolor{CornflowerBlue}{(x + \frac{b}{2a})^2}} = x + \frac{b}{2a}$ and $\sqrt{\textcolor{Lavender}{\frac{b^2-4ac}{4a^2}}} = \pm \frac{\sqrt{b^2-4ac}}{\sqrt{4a^2}} = \pm \frac{\sqrt{b^2-4ac}}{2a}$
>11. So we get a simplified equation from step 9:
>$x + \frac{b}{2a} = \pm \frac{\sqrt{b^2-4ac}}{2a}$
>12. Let's subtract $\textcolor{aquamarine}{b/2a}$ from both sides:
>$x + \frac{b}{2a} - \textcolor{aquamarine}{\frac{b}{2a}} = \pm \frac{\sqrt{b^2-4ac}}{2a} - \textcolor{aquamarine}{\frac{b}{2a}}$
>$x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}$
>Which is the equation from step 1.
>[!related]
>- **North** (upstream): —
>- **West** (similar): —
>- **East** (different): —
>- **South** (downstream): —