User:Lapizcasso/sandbox

The derivation of the quadratic formula employs the method of completing the square on the general quadratic equation $$\begin{align} ax^{2\vphantom|} + bx + c &= 0 \\[3mu] \end{align}$$. This process aims to manipulate the equation into the form$$\begin{align} (x+k)^2 = s \\[3mu] \end{align}$$ where $k$ and $s$ are expressions involving the coefficients, enabling the isolation of $$x$$ after taking the square root of both sides.

To initiate the process, we first divide the equation by the quadratic coefficient $$a$$, a permissible step since $$a$$ is non-zero. Consequently, we subtract the constant term $$\begin{align} \frac{c}{a} \end{align}$$ to isolate it on the right-hand side, resulting in:

$$\begin{align} x^2 + \frac{b}{a} &= -\frac{c}{a} \\[3mu] \end{align}$$

Now, the left-hand side resembles $\textstyle x^2 + 2kx$, which allows us to complete the square by adding $\textstyle k^2$ to obtain the squared binomial $$(x + k)^2$$. Specifically, to achieve this, we add $\textstyle (b / 2a)^2$ to both sides so that the left-hand side can be factored:$$\begin{align} x^2 + 2\left(\frac{b}{2a}\right)x + \left(\frac{b}{2a}\right)^2 &= -\frac{c}{a}+\left( \frac{b}{2a} \right)^2 \\[5mu] \left(x + \frac{b}{2a}\right)^2 &= \frac{b^2 - 4ac}{4a^2}. \end{align}$$

This manipulation results in a perfect square on the left-hand side. Thus, taking the square root of both sides yields:$$ x + \frac{b}{2a} = \pm\frac{\sqrt{b^2 - 4ac}}{2a}. $$Lastly, isolating $b/2a$ from both sides, and isolating $x$, furnishes the quadratic formula:$$ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}. $$