Topic 4 Quadratic equations

A quadratic equation is something which looks like

3x2+2x4=0

I.e. the highest power of the unknown variable — x in this case — is x2. A general quadratic has the form

ax2+bx+c=0a0

where a,b and c are constants, and b or c could be equal to zero and so not appear. x is the unknown whose value (or values) need to be found.

In general there are two possible solutions to such equations, as can be seen by plotting

y=ax2+bx+c and seeing where y=0. E.g.

where we can see that y=x2x2 crosses the x axis at x=1 and x=2 so these are solutions to x2x2=0.

Solving the equation graphically isn’t really a good option, and there are three methods which are generally used to solve it analytically.

  • Factorisation
  • Completing the square
  • The quadratic formula

4.1 Factorisation

Note that there are several methods of factorising quadratics, so the method I describe below may be slightly different from the one you know. There is no “one right way” — if you have a method which works for you, use it.

Before moving on to factorisation, it is worth examining expanding double brackets to form quadratic expressions.

You will have been taught at least one method to expand double brackets, e.g. “FOIL” (First Inner Outer Last) the other method which goes by many names, such as “crab claws.” These are very useful in practice, however I would like to go back to basics for the purposes of this section.

Suppose I want to expand (2x+3)(4x5) without using FOIL or crab claws. I could expand either bracket, e.g.

2x(4x5)+3(4x5)

and then expand it again to get

8x210x+12x15

finally giving

8x2+2x15

I could have expanded it the other way, giving

4x(2x+3)5(2x+3)

then

8x2+12x10x15

again giving

8x2+2x15

If you examine equation (4.2) and equation (4.3) you will see that they only differ in the order of the two middle terms. Many methods of factorisation hinge upon trying to find these two middle terms, and then factorising from there — basically doing the above expansion in reverse.

E.g. If I start with 8x2+2x15 my steps are:

  • Split the middle term up so I have 8x2+12x10x15
  • Examine the first two terms 8x2+12x
    • Identify 4x as a common factor
    • Factorise to give 4x(2x+3)
  • Examine the last two terms 10x15x
    • Identify 5 as a common factor
    • Factorise to give 5(2x+3)
  • I now have 4x(2x+3)5(2x+3) which has a common factor of (2x+3)
    • I can now factorise that out to give me (2x+3)(4x5)

The first step is the hardest — finding the way to split up the middle term (the term in x). The trick is to look for two numbers that 1. Add to give the coefficient of x (b in the general equation, +2 in this example) 2. Multiply together to give the product of the coefficient of x2 (a in the general equation, +8 in this example), with the constant term (c in the general equation, 15 in this example).

E.g. we were looking for two numbers which add to give +2 and multiply to give 8(15)=120

  • We know that one is positive and one negative, otherwise the product would be positive
  • We can use (educated) guesswork, or do it systematically by looking at factors of 120
    • 1 and -120 add to give -119
    • 2 and -60 add to give -58
    • 3 and -40 add to give -37
    • 4 and -30 add to give -26
    • 5 and -24 add to give -19
    • 6 and -20 add to give -14
    • 8 and -15 add to give -7
    • 10 and -12 add to give -2
  • Since 10 and -12 add to give -2, -10 and 12 add to give 2 which is what we are looking for, hence the middle term 2x can be split into 12x10x.

4.2 Roots

Often factorisation is the goal — for instance when quadratics appear in the denominators of fractions.

However, we often want to find the solutions to ax2+bx+c=0, which are also called the roots of the quadratic, and are the x-coordinates of the points where y=ax2+bx+c crosses (or touches) the x axis.

Once we have factorised it, we get something of the form

(px+q)(rx+s)=0

It is a general rule that if two (or more) numbers multiply to give 0 then at least one of them must be equal to 0 itself. This means that we can make equation @ref(eq:quad-factorised}) true by setting either of the two bracketed expressions equal to zero, giving us the two equations:

px+q=0orrx+s=0

which lead to the two possible solutions:

x=qpandx=sr

So in our example of 8x2+2x15 we factorised to get (2x+3)(4x5). Thus the solution to 8x2+2x15=0 is the same as the solution of (2x+3)(4x5)=0 and is given by the two possibilities:

2x+3=0or4x5=0

which gives us:

x=32andx=54

4.2.1 Easy case 1: b=0

The previous section outlined the general case of (4.1)

ax2+bx+c=0a0

There are, however, a couple of cases where the equation can be solved quickly without having to worry about factorisation, or the techniques described later. This is when either b=0 or c=0.

When b=0 the equation looks like

ax2+c=0 This can easily be rearranged to give ax2=c and hence x=±ca

For example, if 3x22x=0, x=23 or x=23.

4.2.2 Easy case 2: c=0

The other easy case is when c=0, i.e. we have an equation like

ax2+bx=0 Since both terms have a common factor of x this can be factorised to give

x(ax+b)=0 and, as we have two numbers multiplying to give zero, we get the two possibilities:

x=0orax+b=0

which gives us:

x=0andx=ba

as solutions.

For example, if 2x2+3x=0, we get x=0 and x=32

4.3 Completing the square

The next technique for dealing with quadratics is based around turning the expression into a perfect square with something left over. In arithmetic a perfect square is a number made up of squaring a whole number, e.g. 4,9,16,15,… In algebra we can do a similar thing:

(a+b)2=a2+2ab+b2

so we can think of a2+2ab+b2 as a perfect square, as it is the square of (a+b).

When dealing with quadratics, we are interested in terms like (x+p)2

(x+a)2=x2+2px+p2

E.g.

(x+3)2=x2+6x+9

(x+5)2=x2+10x+25 (x5)2=x210x+25

The important thing to notice here is that the coefficient of x is always twice p in a perfect square. This means that if I see an expression like x2+10x I know that p=5 it must be related to the perfect square (x+5)2:

x2+10x=x2+10x+2525=(x+5)225

The first step is allowed as 2525=0 so hasn’t changed the equation. By adding and subtracting 25 from this equation we have been able to “complete the square.” The 25 was chosen as it is 52, or p2 in the general case — see equation (4.5).

E.g. If we want to complete the square on x2+8x we:

  • Look at the coefficient of x, which is 8
  • Halve it to get p=4
  • Square p to get 16
  • Then add and subtract the 16 from the equation x2+8x=x2+8x+1616
  • Then rewrite the first three terms as a perfect square; giving us x2+8x=(x+4)216

So far we have looked at completing the square where the p term in equation (4.5) is an even number. This is rarely the case, but the same principle applies:

E.g. If we want to complete the square on x2+7x we:

  • Look at the coefficient of x, which is 7
  • Halve it to get p=72
  • Square p to get 494
  • Then add and subtract the 494 from the equation x2+8x=x2+7x+494494
  • Then rewrite the first three terms as a perfect square; giving us x2+8x=(x+72)2494

This is the basic technique of completing the square, however you won’t often see x2+bx by itself. You will often see x2+bx+c, e.g. x2+4x+5. The trick here is to ignore the last number and just concentrate on the x2+4x term, which you know how to complete the square on.

E.g.

x2+4x+5=(x2+4x)+5=(x2+4x+1616)+5=[(x+2)216]+5=(x+2)216+5=(x+2)211

Where only the last step involved the c term.

You will remember that the general quadratic is given by ax2+bx+c. So far we have only looked at cases where a=1. Just as when $ c $ we can easily reduce the general case to what we have studied before, by factorising out the a, the continuing as before:

E.g. If we want to complete the square on 2x2+8x+5, we:

  • Ignore the last term as before 2x2+6x+5=[2x2+8x]+5
  • Factorise out the coefficient of x2 (the a term) 2x2+6x+5=2[x2+4x]+5
  • Complete the square inside the brackets 2x2+6x+5=2[(x+2)24]+5
  • Multiply out the outer bracket 2x2+6x+5=2(x+2)28+5
  • Combine the last two terms 2x2+6x+5=2(x+2)23

4.3.1 Using completing the square to solve quadratic equations

If we are given ax2+bx+c=0 we can use completing the square to find the solutions (also called roots).

E.g. If we have x2+6x+5=0, we can:

  1. Complete the square on the left hand side, giving us: (x+3)24=0
  2. Add 4 to both sides to get: (x+3)2=4
  3. Square root both sides: (x+3)=±2
  4. Subtract 3 from both sides: x=3±2
  5. Which gives us x=3+2 and x=32
  6. So x=1 and x=5 are the solutions.

Note that if, in the last example, the right hand side on step 2 had been negative, there wouldn’t be a solution.

4.4 The quadratic formula

If you are just interested in solving equation (4.1)

ax2+bx+c=0a0

then factorisation or completing the square may be more work than you’d like to do. In this case there is a simple formula for the roots (solutions to the equation)

x=b±b24ac2a

E.g. If I want the roots of 3x2+9x+4, I would:

  • Identify a=3, b=9, c=4
  • Use the formula: x=9±924×3×42×3=9±81486=9±336
  • Giving the roots as: x=9+336 and x=9336.

Where people generally get into trouble is when one or more of the coefficients (a, b or c) are negative. The trick, as ever with negative numbers, is to use brackets.

E.g. If I want the roots of 3x29x4, I would:

  • Identify a=3, b=9, c=4
  • Note that b and c are negative
  • Use the formula, making sure I bracket all cases of b and c: x=(9)±924×3×(4)2×3=9±81+486=9±1296
  • Giving the roots as: x=9+1296 and x=91296.

4.4.1 Number of roots and the discriminant

Look back at the quadratic formula

x=b±b24ac2a

The expression in the square root b24ac is very important, and is called the discriminant.

  • If it is negative, there is no solution to the equation (no roots)
  • If it is zero, the two roots are the same.
  • If it is greater than zero, there are two distinct solutions.

E.g. How many solutions are there to 3x2+2x+5=0? * a=3,b=2,c=5 * The discriminant is b24ac=224×3×5 so the discriminant is -56. * This is negative, so there are no solutions.

E.g. How many solutions are there to 3x2+2x5=0? * a=3,b=2,c=5 * The discriminant is b24ac=224×3×(5) so the discriminant is 64. * This is positive, so there are two solutions.