4.2 Quadratic functions and equations
Definition 4.8. A quadratic function has the form \(f(x)=ax^2+bx+c\) with \(a\neq 0\), and the corresponding quadratic equation is \(ax^2+bx+c=0\).
The graph is a parabola. If \(a>0\) it opens upwards and has a lowest point; if \(a<0\) it opens downwards and has a highest point.
4.2.1 Completing the square
Any quadratic can be rewritten as \(f(x)=a(x-h)^2+k\). This form is worth the effort because it shows the turning point immediately: it is \((h,k)\).
Example 4.9. Write \(f(x)=2x^2-12x+7\) in the form \(a(x-h)^2+k\), and state its turning point and minimum value.
Solution. Step 1. Factor the coefficient of \(x^2\) out of the first two terms only — not out of the constant: \[f(x)=2\left [x^2-6x\right ]+7.\]
Step 2. Inside the bracket, halve the coefficient of \(x\) and square it: half of \(-6\) is \(-3\), and \((-3)^2=9\). Add and subtract that \(9\) inside the bracket, so nothing changes in value: \[f(x)=2\left [x^2-6x+9-9\right ]+7=2\left [(x-3)^2-9\right ]+7.\]
Step 3. Multiply the \(2\) back through and tidy: \[f(x)=2(x-3)^2-18+7=2(x-3)^2-11.\]
Reading off the answer. \((x-3)^2\) is never negative and equals \(0\) only when \(x=3\). So the smallest \(f\) can be is \(-11\), reached at \(x=3\): \[\text {turning point } (3,-11),\qquad \text {minimum value } -11.\] It is a minimum, not a maximum, because \(a=2>0\).
Check. Expanding back, \(2(x-3)^2-11=2(x^2-6x+9)-11=2x^2-12x+18-11 =2x^2-12x+7\), the original.
Note 4.10. The \(-9\) must go inside the bracket, where it is multiplied by the \(2\) along with everything else. Putting it outside gives \(-9\) instead of \(-18\) and the answer comes out wrong by \(9\).
4.2.2 The quadratic formula and the nature of the roots
Completing the square on the general quadratic gives the formula \[x=\frac {-b\pm \sqrt {b^2-4ac}}{2a}.\]
Everything about the roots is decided by the quantity under the square root.
| Discriminant | Nature of the roots |
| \(\Delta >0\) | two distinct real roots |
| \(\Delta =0\) | one repeated real root |
| \(\Delta <0\) | no real roots |
When \(\Delta >0\) and is also a perfect square, the roots are rational and the quadratic factorises over the integers; when it is positive but not a perfect square, the roots are irrational.
Example 4.12. Determine the nature of the roots of each equation.
- (a).
- \(2x^2-2x-5=0\)
- (b).
- \(6x^2+4x+2=0\)
- (c).
- \(x^2-10x+25=0\)
- (d).
- \(x^2+3x=0\)
Solution. In each case identify \(a\), \(b\), \(c\) and compute \(\Delta =b^2-4ac\).
(a) \(a=2\), \(b=-2\), \(c=-5\): \[\Delta =(-2)^2-4(2)(-5)=4+40=44>0.\] Two distinct real roots. \(44\) is not a perfect square, so they are irrational: \(x=\frac {2\pm \sqrt {44}}{4}=\frac {1\pm \sqrt {11}}{2}\).
(b) \(a=6\), \(b=4\), \(c=2\): \[\Delta =4^2-4(6)(2)=16-48=-32<0.\] No real roots. The parabola opens upwards and its lowest point is above the \(x\)-axis, so it never crosses.
(c) \(a=1\), \(b=-10\), \(c=25\): \[\Delta =(-10)^2-4(1)(25)=100-100=0.\] One repeated root. Indeed \(x^2-10x+25=(x-5)^2\), giving \(x=5\) twice; the parabola touches the \(x\)-axis without crossing.
(d) \(a=1\), \(b=3\), \(c=0\): \[\Delta =3^2-4(1)(0)=9>0,\] and \(9\) is a perfect square, so the roots are rational. Here factorising is faster than the formula: \(x^2+3x=x(x+3)=0\) gives \(x=0\) or \(x=-3\).
Note 4.13. A missing term means a coefficient of zero, not a coefficient that is absent. In (d), \(c=0\); in an equation like \(x^2-25=0\), \(b=0\). Writing the missing coefficient as \(0\) before using the formula avoids the commonest slip in this topic.
Example 4.14. Find the values of \(k\) for which each equation has equal roots.
- (a).
- \(x^2+2kx+25=0\)
- (b).
- \(kx^2+12x+k=0\)
Solution. “Equal roots” means \(\Delta =0\).
(a) Here \(a=1\), \(b=2k\), \(c=25\): \[\Delta =(2k)^2-4(1)(25)=4k^2-100=0\] \[\implies \quad 4k^2=100\quad \implies \quad k^2=25\quad \implies \quad k=\pm 5.\]
(b) Here \(a=k\), \(b=12\), \(c=k\): \[\Delta =12^2-4(k)(k)=144-4k^2=0\] \[\implies \quad 4k^2=144\quad \implies \quad k^2=36\quad \implies \quad k=\pm 6.\] Both values are acceptable, since the definition of a quadratic requires only \(a=k\neq 0\).
Note 4.15. Both parts give two answers. Taking a square root of both sides produces \(\pm \), and losing the negative solution is easy — a quadratic in \(k\) has two roots just as one in \(x\) does.
4.2.3 An application
Example 4.16. A rectangular plot of land has a perimeter of \(34\) metres and an area of \(60\) square metres. Find its dimensions.
Solution. Set up the algebra. Let the length be \(\ell \) and the width \(w\), both in metres. The two facts give \[2(\ell +w)=34\quad \implies \quad \ell +w=17,\qquad \text {and}\qquad \ell w=60.\]
Reduce to one unknown. From the first equation \(\ell =17-w\). Substituting into the second: \[w(17-w)=60\quad \implies \quad 17w-w^2=60\quad \implies \quad w^2-17w+60=0.\]
Solve. \(\Delta =(-17)^2-4(1)(60)=289-240=49\), a perfect square, so \[w=\frac {17\pm \sqrt {49}}{2}=\frac {17\pm 7}{2}=12\ \text { or }\ 5.\]
Interpret. The two roots are not two different plots — they are the two sides of the same one. If \(w=5\) then \(\ell =12\), and if \(w=12\) then \(\ell =5\). So the plot is \(12\) m by \(5\) m.
Check. Perimeter \(2(12+5)=34\) m and area \(12\times 5=60\) m2, as required.
Remark 4.17. In word problems the algebra is usually the easy part; the two steps worth care are setting up the equations and interpreting the answers. A quadratic often produces a root that must be discarded — a negative length, for instance — so always ask what each root means before writing the final answer. Here both roots were meaningful, but that is not always so.
Questions on this section
Stuck on something here? Ask below and it stays attached to this topic.