When we have a quadratic equation in the standard form
\[ax^2+bx+c=0\]
where the leading coefficient is \(a\neq 0\), we can divide the equation by \(a\) to get
\[x^2+\frac{b}{a}x+\frac{c}{a}=0\]
A quadratic equation always has a turning point, which must not be on the y-axis. How far this point is shifted on the x-axis can be found by looking at the point \(x\) where the derivative gets zero:
\[\frac{d}{dx} \left(x^2+\frac{b}{a}x+\frac{c}{a}\right)\overset{!}{=}0\]
Therefore, the shift is
\[x=-\frac{b}{2a}\]
When shifting the original equation by this offset, we get
\[\begin{array}{rrl} &\left(x-\frac{b}{2a}\right)^2+\frac{b}{a}\left(x-\frac{b}{2a}\right)+\frac{c}{a}&=0\\ \Leftrightarrow & x^2-\frac{b^2-4ac}{4a^2} &= 0\\ \Leftrightarrow & x&=\pm\sqrt{\frac{b^2-4ac}{4a^2}} \end{array}\]
When we now undo the shift, we get
\[x=-\frac{b}{2a}\pm\sqrt{\frac{b^2-4ac}{4a^2}}\]
and after rearranging the equation, we arrive at the famous famous quadratic formula
\[x_{1,2} = \frac{-b\pm\sqrt{b^2-4ac}}{2a}\]
Completing the Square
The quadratic formula can be derived visually by transforming the equation into a square. We start with the quadratic equation:
\[ x^2 + \frac{b}{a}x + \frac{c}{a} = 0 \]
This can be rearranged to isolate the \(c\)-term on the other side:
\[x^2+\frac{b}{a}x=-\frac{c}{a}\]
Next, we split the middle term \(\frac{b}{a}x\) into two equal parts to prepare for completing the square:
\(x^2\)\(+\)\(\frac{b}{2a}x\)\(+\)\(\frac{b}{2a}x\)\(=\)\(-\frac{c}{a}\)
Now think of \(x^2\) as a physical square of side length \(x\) and the terms \(\frac{b}{2a}x\) as two rectangles of dimensions \(x \times \frac{b}{2a}\). Arranging these pieces nearly forms a larger square.
\(x^2\)\(\frac{b}{2a}x\)\(\frac{b}{2a}x\)\(=-\frac{c}{a}\)
To complete the square, we need to add a small square of area side length\((\frac{b}{2a}\) on both sides:
\(x^2\)\(\frac{b}{2a}x\)\(\frac{b}{2a}x\)\(=-\frac{c}{a}+\)\(\left(\frac{b}{2a}\right)^2\)\(\left(\frac{b}{2a}\right)^2\)
On the left side, we now have a perfect square with side length \(x + \frac{b}{2a}\), and on the right side, the expression simplifies:
\[\left(x+\frac{b}{2a}\right)^2 = \frac{b^2}{4a^2} - \frac{4ac}{4a^2}\]
Taking the square root of both sides yields
\[ x + \frac{b}{2a} = \pm \frac{\sqrt{b^2 - 4ac}}{2a} \]
Finally, isolating \(x\) gives the Quadratic Equation:
\[x_{1,2} = \frac{-b\pm\sqrt{b^2-4ac}}{2a}\]
PQ-Formula
Besides the general formula, people often use the so called PQ-Formula, which basically uses the quadratic equation that is exempt from the leading coefficient
\[x^2+\underbrace{\frac{b}{a}}_{=p}x+\underbrace{\frac{c}{a}}_{=q}=0\]
from which we can also derive a solution for quadratic equations:
\[ \begin{array}{rrl} & x^2 + px + q &= 0\\ \Leftrightarrow & x^2 + px + \left( \frac{p}{2} \right)^2 - \left( \frac{p}{2} \right)^2 + q &= 0\\ \Leftrightarrow & \left(x + \frac{p}{2}\right)^2 - \left(\frac{p}{2}\right)^2 +q &= 0\\ \Leftrightarrow & \left(x + \frac{p}{2}\right)^2 &= \left(\frac{p}{2}\right)^2 - q\\ \Leftrightarrow & x + \frac{p}{2} &= \pm\sqrt{\left(\frac{p}{2}\right)^2 - q}\\ \Leftrightarrow & x_{1,2} &= -\dfrac{p}{2} \pm\sqrt{\left(\frac{p}{2}\right)^2 - q} \end{array} \]
Intercept Form
A quadratic equation can also be written in intercept form, which formulates the problem using the two interception points \((x_1, 0)\) and \((x_2, 0)\) as
\[a(x-x_1)(x-x_2)=0\]
To convert from the standard form to the intercept form, we can use any technique, such as PQ-Formula, Quadratic Formula or simply by completing the square.
Algebraic Proofs
Proving the quadratic equation can be done intuitively like previously done, or by completing the square:
\[ \begin{array}{rrl} & ax^2 + bx + c &= 0\\ \Leftrightarrow & ax^2 + bx &= -c\\ \Leftrightarrow & x^2 + \frac{b}{a}x &= -\frac{c}{a}\\ \Leftrightarrow & x^2 + \frac{b}{a}x + \frac{b^2}{4a^2} &= -\frac{c}{a}+ \frac{b^2}{4a^2}= -\frac{4ac}{4a^2}+ \frac{b^2}{4a^2}\\ \Leftrightarrow & \left(x+\frac{b}{2a}\right)^2 &=\frac{b^2-4ac}{4a^2}\\ \Leftrightarrow & x+\frac{b}{2a} &=\pm\sqrt{\frac{b^2-4ac}{4a^2}}\\ \Leftrightarrow & x &=-\frac{b}{2a}\pm\frac{\sqrt{b^2-4ac}}{2a}\\ \Leftrightarrow & x_{1,2} &= \frac{-b\pm\sqrt{b^2-4ac}}{2a} \end{array} \]
or with an alternative route
\[ \begin{array}{rrl} & ax^2 + bx + c &= 0\\ \Leftrightarrow & 4a^2x^2 + 4abx + 4ac &= 0\\ \Leftrightarrow & (2ax)^2 + 2\cdot 2axb + b^2-b^2+4ac &= 0\\ \Leftrightarrow & (2ax+b)^2 - b^2+4ac &= 0\\ \Leftrightarrow & (2ax+b)^2 &= b^2-4ac\\ \Leftrightarrow & 2ax+b &= \pm\sqrt{b^2-4ac}\\ \Leftrightarrow & 2ax &= -b\pm\sqrt{b^2-4ac}\\ \Leftrightarrow & x_{1,2} &= \frac{-b\pm\sqrt{b^2-4ac}}{2a} \end{array} \]