# Clinton Montague

Developer, learner of things, functional programming enthusiast, hacker, and all round inquisitor.

### November 1, 2014

This afternoon I decided to practice completing the square (I’m afraid that I’m rediscovering my inner nerd and am now studying for a math degree). After a few examples, I decided to go a bit more general and derive the quadratic formula. I guess that doing things like this is something which I’m going to have to get used to.

I figured that this is also a good excuse to practice my $\LaTeX$ skills and write it out.

We want to find the general solution of the equation: $ax^2 + bx + c = 0$

Start off by dividing through by $a$ $x^2 + \frac{b}{a}x + \frac{c}{a} = 0$

then complete the square $\big(x + \frac{b}{2a}\big)^2 - \frac{b^2}{4a^2} + \frac{c}{a} = 0$

rearrange to leave the square on the left $\big(x + \frac{b}{2a}\big)^2 = \frac{b^2}{4a^2} - \frac{c}{a}$

simplify the RHS $\big(x + \frac{b}{2a}\big)^2 = \frac{b^2 - 4ac}{4a^2}$

take the square root of both sides $\big(x + \frac{b}{2a}\big) = \pm \sqrt{\frac{b^2 - 4ac}{4a^2}}$

simplify the RHS $\big(x + \frac{b}{2a}\big) = \pm \frac{\sqrt{b^2 - 4ac}}{2a}$

make $x$ the subject $x = - \frac{b}{2a} \pm \frac{\sqrt{b^2 - 4ac}}{2a}$

and, boom – the quadratic formula! $\Rightarrow x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$

If I could go back in time and tell my younger self one thing, it would be to play with maths – don’t just do the homework. It’s all very well being able to follow a process (and essentially being a calculator), but knowing and understanding where something comes from unearths the true beauty of maths.