The Intermediate Value Theorem · Mathematics Class 11–12 | StemPy Lab
Course 9.1·Lesson 3 of 3
The Intermediate Value Theorem
If f is continuous on a closed interval [a,b], it takes every value between f(a) and f(b). This is the Intermediate Value Theorem. A change of sign of a continuous function therefore traps a root, and halving the interval again and again, the bisection method, finds that root as closely as you like.
about 25 min1 simulation1 practice question1 Python program5 questions to check yourself
This lesson is free to read. Enroll free to keep your place and take the tests.
Lesson 3 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
state the Intermediate Value Theorem and say why each condition is needed;
show that an equation has a root in an interval by a change of sign;
find a root by halving the interval, and count how many halvings are needed.
The theorem
Walk from a valley at height f(a) up to a hill at height f(b) along a path with no jumps. You must pass through every height in between. This is the Intermediate Value Theorem.
If f is continuous on [a,b] and N is any number between f(a) and f(b), then there is at least one number c in (a,b) with f(c)=N.
A smooth blue curve over the interval from a to b. At a the curve is at the height f of a, below a dashed horizontal line labelled N. At b it is above the line. The curve must cross the line, and a red dot marks a crossing point c, with a dashed vertical line down to the x-axis.
The special case N=0 is the one used most. If f is continuous on [a,b] and f(a) and f(b) have opposite signs, then the equation f(x)=0 has a root in (a,b).
Why continuity is needed
Take f(x)=x1 on [−1,1]. Then f(−1)=−1 and f(1)=1 have opposite signs. But x1 is never zero. The theorem does not apply, because f has an infinite break at x=0 inside the interval.
What the theorem does not say
No sign change does not mean no root. The function x2−3x+2 is positive at x=0 and at x=3, yet it is zero at x=1 and x=2.
A sign change does not mean exactly one root. It guarantees at least one. There could be three.
The theorem says a point exists. It does not say where it is.
Finding the root by bisection
The theorem gives a method. Suppose f is continuous on [a,b] with a sign change.
Find the midpoint m=2a+b and the sign of f(m).
Keep the half of the interval where the sign still changes.
Repeat.
Each step halves the interval. After n steps its length is 2nb−a. To start with an interval of length 1 and finish with one shorter than 0.01, you need 2n>100. That is n=7.
A worked example
Show that x3+x−1=0 has a root between 0 and 1, and trap it more tightly.
Continuity.f(x)=x3+x−1 is a polynomial, so it is continuous everywhere.
A sign change.f(0)=−1 and f(1)=1. By the Intermediate Value Theorem, a root lies in (0,1).
Halve.f(0.5)=−0.375, so the root is in (0.5,1). Then f(0.75)=0.171875, so it is in (0.5,0.75).
Halve again.f(0.625)≈−0.1309, so the root is in (0.625,0.75). Then f(0.6875)≈0.0125, so it is in (0.625,0.6875).
After four halvings the root is trapped in an interval of length 161.
Practise with new numbers
Try it in Python
The program carries out the halving for x3+x−1=0. After each step it prints the interval that still holds the root.
Common mistakes
Using the theorem without continuity. Always say that the function is continuous on the closed interval.
Concluding no root from equal signs. Two roots can sit between two positive values.
Taking the sign change as one root. The theorem gives at least one.
Checking only open ends. The theorem uses the values f(a) and f(b) at the ends of a closed interval.
Remember these
If f is continuous on [a,b] and N lies between f(a) and f(b), then f(c)=N for some c in (a,b).
A sign change of a continuous function traps a root.
Bisection halves the interval each time, so n steps leave a length of 2nb−a.
No sign change proves nothing.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
A function f is continuous on [1,4] with f(1)=−2 and f(4)=6. Must f take the value 3? What about the value 7?
Show that x2−5=0 has a root in (2,3).
The function x1 has opposite signs at −1 and 1 but no root between. Why does this not break the theorem?
The function x2−3x+2 is positive at 0 and at 3. Does the equation x2−3x+2=0 have a root in (0,3)?
Bisection starts with an interval of length 1. How many halvings leave an interval shorter than 0.01?
References
OpenStax, Calculus Volume 1, Chapter 2, section on continuity (the Intermediate Value Theorem).
Enroll free in Continuity of Functions
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.