Skip to content

Locating roots using a change of sign

Many equations cannot be solved exactly using familiar algebra. Numerical methods instead locate an approximate solution. The change of sign method is especially reliable: evaluate a continuous function at the two ends of an interval and look for outputs with opposite signs.

You should be able to:

  • use function notation, including evaluating (f(a));
  • rearrange an equation into the form (f(x)=0);
  • interpret where a graph of a function lies above or below the (x)-axis;
  • use a calculator accurately, retaining enough digits during working.

A root or zero of (f) is a value (alpha) for which

[ f(\alpha)=0. ]

Graphically, ((\alpha,0)) is a point where the graph (y=f(x)) meets the (x)-axis. To solve an equation such as

[ x^3+2x=7, ]

first define

[ f(x)=x^3+2x-7. ]

The solutions of the original equation are exactly the roots of (f).

Suppose (f) is continuous on the closed interval ([a,b]). If

[ f(a)f(b)<0, ]

then (f(a)) and (f(b)) have opposite signs. The graph must pass through height zero somewhere between them, so there is at least one root (alpha) with

[ a<\alpha<b. ]

This is a consequence of the intermediate value theorem. A continuous graph has no break or jump, so it cannot move from below the axis to above it without meeting the axis.

The product form is compact:

[ f(a)f(b)<0 \quad\Longleftrightarrow\quad \begin{cases} f(a)<0<f(b), &\text{or}\ f(b)<0<f(a). \end{cases} ]

If an endpoint itself gives zero, you have already found a root. For example, (f(a)=0) means (x=a) is a root, even though (f(a)f(b)=0), not a negative number.

Worked example: proving that a root exists

Section titled “Worked example: proving that a root exists”

Show that

[ x^3+x-1=0 ]

has a root between (0) and (1).

Define (f(x)=x^3+x-1). As a polynomial, (f) is continuous everywhere. Now evaluate the endpoints:

[ f(0)=-1, \qquad f(1)=1. ]

Therefore

[ f(0)f(1)=(-1)(1)=-1<0. ]

Since (f) is continuous on ([0,1]) and changes sign, there is at least one root in ((0,1)).

An exam quality conclusion must mention both continuity and the sign change. A table of calculator values alone is evidence, but not a complete justification.

A sign change proves the existence of at least one root. It does not automatically prove there is exactly one.

For example,

[ f(x)=(x-1)(x-2)(x-3) ]

has (f(0)=-6) and (f(4)=6). There is a sign change across ([0,4]), but the interval contains three roots.

To prove uniqueness, add another argument. If (f’(x)>0) throughout the interval, then (f) is strictly increasing and can cross the axis at most once. Combining this with a sign change proves exactly one root.

Let

[ f(x)=x^3+x-1. ]

The previous example proved that a root exists in ((0,1)). Also,

[ f’(x)=3x^2+1>0 ]

for every real (x). Thus (f) is strictly increasing, so it has at most one root. Consequently the root in ((0,1)) is unique.

Once a root is bracketed between (a) and (b), evaluate the function at a point inside the interval, usually the midpoint

[ m=\frac{a+b}{2}. ]

Keep the half interval whose endpoints have opposite signs. Repeating this process is called interval bisection.

Locate the root of

[ f(x)=x^3+x-1 ]

in ((0,1)) to a narrower interval.

We already know (f(0)<0) and (f(1)>0). Test successive midpoints:

StepTest value (m)(f(m))Interval retained
1(0.5)(-0.375)((0.5,1))
2(0.75)(0.171875)((0.5,0.75))
3(0.625)(-0.130859375)((0.625,0.75))
4(0.6875)(0.012451171875)((0.625,0.6875))
5(0.65625)(-0.06112670898\ldots)((0.65625,0.6875))

At every step, one endpoint gives a negative value and the other gives a positive value. The root is therefore trapped in progressively shorter intervals. Continuing gives

[ 0.6823<\alpha<0.6824. ]

The method is slower than Newton Raphson iteration, but a valid sign changing bracket is never lost if calculations are performed correctly.

Questions often ask you to show that a root is a stated value to a given accuracy. Test the rounding boundaries, not merely the stated decimal.

To prove that a root is (r) correct to (n) decimal places, use the interval

[ r-\frac12\times10^{-n}<\alpha<r+\frac12\times10^{-n}. ]

Worked example: correct to two decimal places

Section titled “Worked example: correct to two decimal places”

Show that the root of

[ x^3+x-1=0 ]

is (0.68) correct to two decimal places.

Numbers round to (0.68) to two decimal places when they lie between (0.675) and (0.685). Evaluate:

[ f(0.675)=0.675^3+0.675-1=-0.017453125, ]

[ f(0.685)=0.685^3+0.685-1=0.006419125. ]

The function is continuous and

[ f(0.675)<0<f(0.685), ]

so a root lies in ((0.675,0.685)). Since the root is unique, it follows that

[ \alpha=0.68 \text{ correct to two decimal places}. ]

Testing (0.68) and (0.69) would only show that the root lies between those values. That does not prove which value it rounds to at two decimal places.

Worked example: correct to three significant figures

Section titled “Worked example: correct to three significant figures”

Suppose a positive root is believed to be (4.27) correct to three significant figures. Near (4.27), the third significant figure is the hundredths digit, so the rounding boundaries are

[ 4.265 \quad\text{and}\quad 4.275. ]

If a continuous function has opposite signs at these boundaries, then the bracketed root rounds to (4.27) to three significant figures. The place value matters: for (0.0427) to three significant figures, the boundaries would instead be (0.04265) and (0.04275).

Discontinuous functions: why continuity matters

Section titled “Discontinuous functions: why continuity matters”

A sign change alone is not enough. Consider

[ f(x)=\frac{1}{x}. ]

Then

[ f(-1)=-1, \qquad f(1)=1, ]

but (f(x)) has no root between (-1) and (1). It is undefined at (x=0), where the graph jumps through a vertical asymptote. The hypothesis that (f) is continuous on the whole interval fails.

Polynomials, exponential functions and trigonometric functions are continuous wherever they are defined. Rational functions are continuous on intervals that contain no zero of the denominator. Always check the interval for excluded values.

The converse of the test is false: no sign change does not mean no root.

For

[ f(x)=(x-2)^2, ]

we have

[ f(1)=1, \qquad f(3)=1. ]

There is no sign change, yet (x=2) is a root. The graph touches the axis and turns back rather than crossing it. Such an even multiplicity root can be missed by a sign change search.

By contrast, at a typical odd multiplicity root the graph crosses the axis and the sign changes.

Show that the equation

[ \cos x=x ]

has a root between (0.7) and (0.8), where (x) is in radians.

Define

[ f(x)=\cos x-x. ]

This function is continuous. Using radian mode,

[ f(0.7)=\cos(0.7)-0.7=0.064842\ldots>0, ]

[ f(0.8)=\cos(0.8)-0.8=-0.103293\ldots<0. ]

Hence (f) changes sign, so there is a root in ((0.7,0.8)). Furthermore,

[ f’(x)=-\sin x-1<0 ]

throughout this interval. Therefore (f) is strictly decreasing there and the root is unique.

The numerical root is approximately (0.739085), but the required proof comes from the endpoint signs, not from quoting a calculator solution.

  • Writing only (f(a)\ne f(b)). Different values need not have different signs. You need (f(a)f(b)<0).
  • Forgetting continuity. A discontinuity can create a sign change without a root.
  • Claiming exactly one root. A sign change proves at least one. Use monotonicity or other graph information for uniqueness.
  • Claiming no root when the signs agree. The graph may touch the axis, or cross it an even number of times.
  • Rounding intermediate values too early. A small calculated value may have the wrong displayed sign after premature rounding. Store calculator values or retain several extra digits.
  • Using degrees in a calculus or numerical methods question. Unless the context says otherwise, trigonometric arguments at A-level are in radians.
  • Testing the displayed rounded answer instead of its boundaries. To justify rounding, evaluate at the two rounding limits.

Show that (x^3-2x-2=0) has a root in ((1,2)).

A continuous function satisfies (f(2)>0) and (f(5)>0). Which statement is justified?

A. There is no root in ((2,5)).

B. There are exactly two roots in ((2,5)).

C. The change of sign test gives no conclusion about roots in ((2,5)).

Which two values should be tested to prove that a positive root is (1.37) correct to two decimal places?

For (f(x)=x^3-2), use two bisection steps starting with ([1,2]). State the interval retained after each step.

Explain why (f(x)=x^4-1) has exactly one root in ((0,2)).

(f(x)=x^3-2x-2) is continuous, with

[ f(1)=-3, \qquad f(2)=2. ]

The signs differ, so at least one root lies in ((1,2)).

C. Equal endpoint signs do not rule out roots. The graph might cross the axis twice or touch it.

Test the rounding boundaries

[ 1.365 \quad\text{and}\quad 1.375. ]

Opposite signs there, together with continuity, bracket a root that rounds to (1.37).

Initially, (f(1)=-1) and (f(2)=6). The first midpoint is (1.5), and

[ f(1.5)=1.375>0, ]

so retain ([1,1.5]). The next midpoint is (1.25), and

[ f(1.25)=-0.046875<0, ]

so retain ([1.25,1.5]).

The function is continuous, with (f(0)=-1) and (f(2)=15), so at least one root lies in ((0,2)). Also,

[ f’(x)=4x^3>0 ]

for (0<x<2). Thus (f) is strictly increasing on that interval and can have at most one root. Therefore it has exactly one root there.

Change of sign gives a dependable bracket. Next, learn how to generate approximations using fixed point iteration and Newton Raphson iteration, then study when iteration fails. For a stronger understanding of uniqueness arguments, revisit stationary points and curve sketching.