<s>[INST] Cosine rule problem Question:
In triangle ABC, BC = a, AC= b, AB = c, and BD is perpendicular to AC.
If $\angle ABC = 60^{\circ}$, prove that $c = \dfrac{1}{2}a \pm \sqrt{b^2-\dfrac{3}{4}a^2}$
My approach: $b^2 = a^2 + c^2 - 2ac\cos B$
$b^2 = a^2 + c^2 - 2ac \cos{60}^\circ$
$b^2 = a^2 + c^2 - ac$
$b^2 = (a-c)^2+ac$
After this I don't know how to isolate the $c$ term.
 [/INST] If you are not familiar with the standard formula for a quadratic equation then you can approach it like this:
$$\begin{align}
b^2 &= a^2 + c^2 - ac\\
\therefore c^2-ac&=b^2-a^2\\
\therefore \left(c-\frac{a}{2}\right)^2-\frac{a^2}{4}&=b^2-a^2\\
\therefore \left(c-\frac{a}{2}\right)^2&=\frac{a^2}{4}+b^2-a^2=b^2-\frac{3a^2}{4}\\
\therefore c-\frac{a}{2}&=\pm\sqrt{b^2-\frac{3a^2}{4}}\\
\therefore c&=\frac{a}{2}\pm\sqrt{b^2-\frac{3a^2}{4}}
\end{align}$$
This technique is called completing the square.
</s>