Locating roots by change of sign

Locating roots by change of sign

Spec I1 · AQA A-Level Maths: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • A root of f(x)=0f(x)=0 is a value of xx where f(x)=0f(x)=0.
  • If ff is continuous and f(a)f(a), f(b)f(b) have opposite signs, a root lies in a<x<ba<x<b.
  • A full answer states the values, continuity, the sign change and the interval.
  • Interval bisection halves an interval and keeps the half where the sign changes.
  • The rule fails across an asymptote, and misses repeated roots or an even number of roots.

The change-of-sign rule

A continuous function that changes sign on an interval must cross zero somewhere in it.

A root of f(x)=0f(x)=0 is a value of xx at which f(x)=0f(x)=0. If ff is continuous on [a,b][a,b] and f(a)f(a) and f(b)f(b) have opposite signs (a change of sign), then f(x)=0f(x)=0 has at least one root in a<x<ba<x<b.

For f(x)=x3−5x+3f(x)=x^3-5x+3, f(1)=−1f(1)=-1 and f(2)=1f(2)=1, so there is a root between 11 and 22. Rewrite the equation as f(x)=0f(x)=0 first: for ex=3xe^x=3x use f(x)=ex−3xf(x)=e^x-3x.

0.20.40.60.811.21.41.61.822.22.4−2246xy(1, −1)(2, 1)y = x³ − 5x + 3
f(1) = −1 is below the axis and f(2) = 1 above it, so the curve crosses between.

f(x)=x2−2f(x)=x^2-2 has f(1)=−1f(1)=-1 and f(2)=2f(2)=2. What can you conclude?

Writing a full argument

Define ff, evaluate it at both ends, state continuity and the sign change, then conclude.

A complete answer has four parts: define f(x)f(x) with right-hand side 00; work out f(a)f(a) and f(b)f(b) accurately; state that ff is continuous on the interval; and conclude that there is a change of sign, so a root lies in the interval.

To give the root to a given accuracy, use smaller and smaller intervals.

  1. 1

    Define f

    with right-hand side 0

  2. 2

    Evaluate

    f(a) and f(b), accurately

  3. 3

    State

    f is continuous on the interval

  4. 4

    Conclude

    sign change, so a root lies in a < x < b

A complete change-of-sign argument

Worked example

Show that ex=3xe^x=3x has a root between 0.60.6 and 0.70.7.

Which is a full conclusion for f(0.6)=0.0221f(0.6)=0.0221 and f(0.7)=−0.0862f(0.7)=-0.0862?

Interval bisection

Evaluate ff at the midpoint and keep the half in which the sign changes; each step halves the width.

Interval bisection repeatedly halves an interval that contains a root. Evaluate ff at the midpoint and keep the half where the sign changes. Each step halves the interval width.

Keep the end that has the opposite sign to the midpoint value; do not just keep the 'nicer' number.

  1. 1

    Start: [0.6, 0.7]

    f(0.6) > 0 and f(0.7) < 0

  2. 2

    Midpoint 0.65

    f(0.65) = −0.0345 < 0, so the root is in [0.6, 0.65]

  3. 3

    Midpoint 0.625

    f(0.625) = −0.00675 < 0, so the root is in [0.6, 0.625]

Bisecting f(x) = eˣ − 3x on [0.6, 0.7]
0.40.450.50.550.60.650.70.750.80.850.9−0.2−0.15−0.1−0.0500.050.10.150.2xy(0.6, 0.0221)(0.7, −0.0862)y = eˣ − 3x
The root of e^x − 3x = 0 is where the curve crosses the axis, just after x = 0.6.

f(a)>0f(a)>0, f(b)<0f(b)<0 and f(midpoint)>0f(\text{midpoint})>0. Which half contains the root?

Failure: discontinuities

If ff is not continuous, the sign can change across a break instead of through zero.

If ff is not continuous on the interval, a change of sign may come from a break rather than a root. f(x)=1x−1f(x)=\frac{1}{x-1} has f(0)=−1f(0)=-1 and f(2)=1f(2)=1, but ff is undefined at x=1x=1 and 1x−1\frac{1}{x-1} is never zero. There is a sign change but no root.

Functions with asymptotes, such as tan⁡x\tan x, cause this, because of a discontinuity.

−2−11234−4−3−2−11234xyx = 1(0, −1)(2, 1)y = 1 / (x − 1)
Signs differ at 0 and 2, but the curve jumps over x = 1 and misses the axis.

f(x)=1xf(x)=\frac1x has f(−1)=−1f(-1)=-1 and f(1)=1f(1)=1. Is there a root in −1<x<1-1<x<1?

Failure: repeated roots

Same signs at both ends show an even number of roots, which could be zero or two, so roots can be missed.

If f(a)f(a) and f(b)f(b) have the same sign, there may still be roots. A repeated root touches the axis without crossing: f(x)=(x−2)2(x+2)f(x)=(x-2)^2(x+2) has f(1)=3f(1)=3 and f(3)=5f(3)=5, yet f(2)=0f(2)=0. Two roots in the same interval also cancel the sign change.

Close roots are missed if the interval is too wide, so choose a narrower interval when in doubt.

−2−1123−10−5510xy(−2, 0)(1, 3)(2, 0)(3, 5)y = (x − 2)²(x + 2)
f(1) = 3 and f(3) = 5 are positive, yet the curve touches the axis at x = 2.

Sign change

  • An odd number of roots
  • At least one root (if continuous)

No sign change

  • An even number of roots
  • Possibly none, possibly two or more

f(a)f(a) and f(b)f(b) are both positive. What can you say about roots in [a,b][a,b]?

Try an exam question

(a) Show that x3+x−3=0x^3+x-3=0 has a root between 11 and 22. (b) Use interval bisection once to find a smaller interval containing the root.

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Which interval must contain a root of f(x)=0f(x)=0?

1 mark, marked against the mark scheme

Revision notes