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.
 A: Your work is correct. Picking up your work from $b^2=a^2+c^2-ac$, subtract $b^2$ from both sides and rewrite to get
$$c^2-ac+a^2-b^2=0$$
which is quadratic in $c$. Notice this equation fits the standard quadratic form with $A=1$, $B=-a$ and $C=a^2-b^2$.
Using the quadratic formula, we get
$$c=\frac{a\pm\sqrt{a^2-4(a^2-b^2)}}{2}$$
$$c=\frac{a}{2}\pm\frac{\sqrt{4b^2-3a^2}}{2}$$
$$c=\frac{a}{2}\pm\sqrt{b^2-\frac{3}{4}a^2}\quad.$$
A: 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.
A: From $b^2 = a^2 + c^2 -ac$
$b^2 - a^2 = c^2 - ac$
$b^2 - \dfrac{3}{4}a^2 = c^2- ac + \dfrac{1}{4}a^2$
$b^2 - \dfrac{3}{4}a^2 = (c-\dfrac{1}{2}a)^2$
$c-\dfrac{1}{2}a = \pm \sqrt{b^2 - \dfrac{3}{4}a^2}$
$c = \dfrac{1}{2}a \pm \sqrt{b^2 - \dfrac{3}{4}a^2}$
