Topic 4 Quadratic equations

A quadratic polynomial is an expression of the form \(ax^2+bx+c\), where \(a,b,c\) are constants and \(a\neq0\). Any value of \(x\) that makes the equation \(ax^2+bx+c=0\) hold true is called a root of the polynomial \(ax^2+bx+c\). The graph of the polynomial \(f(x)=ax^2+bx+c\) consists of all points \((x,y)\) in the plane that satisfy \(y=f(x)\).

Examples of graphs of quadratic functions 1

Figure 4.1: Examples of graphs of quadratic functions 1

Examples of graphs of quadratic functions 2

Figure 4.2: Examples of graphs of quadratic functions 2

Example 4.1 Find the roots of \(2x^2-x-6\).

Solution. First factorise: \(2x^2-x-6 = (2x+3)(x-2)\).
Thus the roots are \(x_1=-\frac{3}{2}\) and \(x_2=2\).

Example 4.2 Find the roots of \(4x^2+4x+1\).

Solution. Factorise: \(4x^2+4x+1=(2x+1)(2x+1)=(2x+1)^2\).
Hence the only root is \(x_1=-\frac{1}{2}\).

Example 4.3 Find the roots of \(x^2-2x+2\).

Solution. We can rewrite \(x^2-2x+2=(x-1)^2+1\).
This is positive for all real numbers \(x\), thus there are no roots.

4.1 General formula for roots of \(ax^2+bx+c\)

  1. Case: \(b^2-4ac < 0\): no roots
  2. Case: \(b^2-4ac = 0\): exactly one root \(x_1=-\frac{b}{2a}\).
  3. Case: \(b^2-4ac > 0\): two roots \(x_{1,2}=\dfrac{-b\pm\sqrt{b^2-4ac}}{2a}\).

Learn this by heart!

Remarks:

  • The number \(b^2-4ac\) is sometimes referred to as the discriminant of the quadratic.
  • A derivation of this formula in included at the end of the the chapter.

Example 4.4 Find the roots of \(x^2+3x+1\).

Solution. \(x_{1,2}=\dfrac{-3\pm\sqrt{3^2-4\cdot1\cdot1}}{2\cdot 1}\) \(\dfrac{-3\pm\sqrt{9-4}}{2}\) \(=-\dfrac{3}{2}\pm\dfrac{1}{2}\sqrt{5}\).

Example 4.5 Find the roots of \(x^2-9\).

Solution. \(x_{1,2}=\dfrac{-0\pm\sqrt{0-4\cdot1\cdot(-9)}}{2\cdot1}\) \(=\pm\dfrac{36}{2}=\pm 3\).

Example 4.6 Find the roots of \(4x^2-4x+1\).

Solution. \(x_{1,2}=\dfrac{-4\pm\sqrt{(-4)^2-4\cdot 4\cdot 1}}{2\cdot 8}\) \(=\dfrac{4\pm\sqrt{0}}{8}=\dfrac{1}{2}\) (only one solution).

Example 4.7 Solve the simultaneous equations \[\begin{align*} y &= -x^2+2x+2 \tag{A}\\ x+y-2 &=0 \tag{B} \end{align*}\]

Solution. Make \(x\) the subject of (B): \(x=-y+2\).
Substitute into (A): \(y=-(-y+2)^2+2(-y+2)+2\).
Rearrange: \(y^2-y-2=0\).
Solve the quadratic: \(y_{1,2}=\dfrac{-(-1)\pm\sqrt{(-1)^2-4\cdot1\cdot(-2)}}{2\cdot1} = \dfrac{1\pm\sqrt{9}}{2}\)
\(\implies\)   \(y_1=2\),    \(y_2=-1\).
Substitute back into (B):   \(x_1=0\),    \(x_2=3\).

Graphical illustration of the solutions of simultaneous linear+quadratic system

Figure 4.3: Graphical illustration of the solutions of simultaneous linear+quadratic system

4.2 Deriving the quadratic formula

This material is not examinable.

Why does the quadratic formula “work”? In other words, a “proof”.

The following computation shows how to derive the general formula for the roots of a quadratic polynomial.

\[\begin{align*} ax^2+bx+c &= 0\\ ax^2 + bx &= -c\\ x^2 + \tfrac{b}{a}x &= -\tfrac{c}{a} \quad\text{(using $a\not=0$)}\\ x^2 + \tfrac{b}{a}x + \left(\tfrac{b}{2a}\right)^2 &= -\tfrac{c}{a} + \left(\tfrac{b}{2a}\right)^2 \end{align*}\] This trick (adding \(\left(\tfrac{b}{2a}\right)^2\) to both sides) is called “completing the square”. \[\begin{align*} \left(x+\tfrac{b}{2a}\right)^2 &= \tfrac{b^2-4ac}{(2a)^2}\\ x+\tfrac{b}{2a} &= \frac{\pm\sqrt{b^2-4ac}}{2a}\\ %\quad\text{(when $b^2-4ac\geq 0$)} \end{align*}\] The last step is only valid when \(b^2-4ac\geq 0\)!
One should be careful when taking square roots on both sides of an equation — which is why there is “\(\pm\)”. \[ x = \frac{-b\pm\sqrt{b^2-4ac}}{2a}. \]


Extra Note (non-examinable): For quadratic equations, there are formulas (depending only on the numbers appearing in the equation itself) which allow us to very easily determine how many solutions does the equation have, and what are they. This situation is rather rare – for example, if we stay with equations with a single variable \(x\) but allow the power of \(x\) to be higher, we very quickly run into issues: There is a general formula for degree \(3\), but it is rather unpleasantly complicated. From degree \(5\) onwards, it is possible to prove that no such formula can exist in general. That is not to say that we can’t solve some high-degree equations, but there is no general formula which is guaranteed to always work. This wikipedia page goes in that direction.

Note - here we are talking about exact solutions. In practice, problems are almost always solved numerically, obtaining approximate solutions.