Introduction
A sign change at the endpoints is a familiar way to guarantee that a continuous function has a root. But roots are only one kind of output we may want to find. A continuous function also takes every value between its endpoint outputs, even when those endpoint outputs are both positive or both negative.
The key is to distinguish the target value from zero. If the target lies between the endpoint outputs, continuity guarantees that the function attains it. The endpoint values do not have to straddle zero.
The Intermediate-Value Guarantee
Let \(f\) be continuous on the closed interval \([a,b]\), where \(a<b\). The Intermediate Value Theorem says that every value between \(f(a)\) and \(f(b)\) is attained at some point of the interval. In particular, for a target \(L\) strictly between the two endpoint outputs, there is a \(c\in(a,b)\) such that \(f(c)=L\).
“Between” here refers to the ordering of the two outputs, not to their signs. For example, if \(f(a)=2\) and \(f(b)=10\), then any target from 2 to 10 is between them. Both endpoint outputs are positive, but that does not prevent the function from taking, say, the value 6.
The theorem requires continuity on the whole interval, not just at the endpoints. It guarantees that an intermediate output occurs; it does not necessarily identify where it occurs or give a formula for the point.
Worked Examples
Worked Example: A Positive Target Between Positive Endpoint Outputs
Consider \(f(x)=x^2+1\) on \([1,3]\), and ask whether the function takes the target value \(L=6\).
First check continuity: \(f\) is a polynomial, so it is continuous on \([1,3]\). Next compute the endpoint outputs:
The target is strictly between them because \(2<6<10\). The Intermediate Value Theorem therefore guarantees a \(c\in(1,3)\) with \(f(c)=6\).
In this example we can also find the point. Solve the target equation:
Only \(\sqrt{5}\) is in \([1,3]\): \(1<\sqrt{5}<3\), since \(1<5<9\). Thus \(c=\sqrt{5}\). Check by substitution:
The endpoint outputs are both positive, so they do not have opposite signs. That does not matter for this target: 6 lies between the outputs 2 and 10.
Worked Example: A Negative Target Between Negative Endpoint Outputs
Let \(f(x)=x^2-10\) on \([1,3]\), and consider the target \(L=-5\).
This polynomial is continuous on the interval. Its endpoint outputs are
The target is strictly between these values because \(-9<-5<-1\). Thus the theorem guarantees some \(c\in(1,3)\) with \(f(c)=-5\).
To find the point, solve:
As \(1<\sqrt{5}<3\), the point in the interval is \(c=\sqrt{5}\). Substitution checks the result:
Here both endpoint outputs are negative. Their shared sign does not prevent the function from attaining the intermediate output \(-5\).
Worked Example: A Nonlinear Function with Positive Endpoint Outputs
Let \(f(x)=x^2-2x+2\) on \([0,3]\), with target \(L=3\). Since \(f\) is a polynomial, it is continuous on the interval. Compute:
Since \(2<3<5\), the Intermediate Value Theorem guarantees a point \(c\in(0,3)\) where \(f(c)=3\). To find it explicitly, solve:
The quadratic formula gives
Because \(1<\sqrt{2}<2\), the value \(1+\sqrt{2}\) lies between 0 and 3, while \(1-\sqrt{2}<0\). Therefore \(c=1+\sqrt{2}\) is the solution in the interval. Check:
Again, both endpoint outputs are positive, yet the target is attained inside the interval.
Why Shifting the Target Gives a Sign Change
The sign-change theorem for roots is a special way to use the Intermediate Value Theorem: if a continuous function has endpoint values of opposite signs, it must equal zero somewhere between them. To apply that reasoning to a target \(L\), shift the function vertically by subtracting \(L\).
This argument explains why the signs of \(f(a)\) and \(f(b)\) themselves are not the relevant signs when the target is \(L\). The useful comparison is between each endpoint output and \(L\). After shifting, the question “Does \(f\) take the value \(L\)?” becomes “Does \(g\) have a root?”
Write down the value \(L\) whose occurrence you want to guarantee.
Verify that \(L\) lies between \(f(a)\) and \(f(b)\).
Confirm that \(f\) is continuous throughout \([a,b]\).
There is a \(c\in[a,b]\) with \(f(c)=L\); if \(L\) is strictly between the endpoint outputs, then \(c\in(a,b)\).
Intermediate Outputs Are Not Automatically Roots
A root of \(f\) is an input \(c\) for which \(f(c)=0\). Therefore, to guarantee a root using endpoint values, zero must be between those values (or already equal to an endpoint output). When the endpoint outputs have the same strict sign, zero is not between them, so the sign-change theorem does not guarantee a root.
That is different from saying a root cannot exist. For instance, a continuous function might cross zero inside the interval and then cross back before reaching the other endpoint. Same-sign endpoint outputs do not rule this out; they simply do not establish it by the endpoint sign-change test.
Common Pitfall: Checking the Sign of the Wrong Values
Suppose \(f(x)=x^2+1\) on \([1,3]\), and the target is 6. A mistaken argument might say, “The endpoint values are 2 and 10, both positive, so there is no sign change and the theorem cannot be used.” This checks whether the endpoint outputs straddle zero, not whether they straddle the requested target.
The correction is to compare the outputs directly with 6: \(2<6<10\). The function is continuous on \([1,3]\), so the Intermediate Value Theorem applies and gives an input \(c\) with \(f(c)=6\). Indeed, as calculated above, \(c=\sqrt{5}\).
The same example also shows why it is important to name the conclusion accurately. The theorem guarantees an input where \(f(x)=6\), not a root of \(f\). In fact, \(x^2+1\geq 2\) for \(x\in[1,3]\), so this function has no root on the interval.
Why This Distinction Matters
Many problems ask whether a continuous quantity reaches a threshold: a temperature, a population level, a height, or a model output. The threshold need not be zero. If the endpoint outputs lie on opposite sides of the threshold, continuity guarantees that the quantity equals the threshold at some intermediate input.
The same reasoning is useful when one function is compared with another. To ask whether \(f(x)\) reaches a value \(L\), consider \(f(x)-L\). To ask whether two continuous functions \(f\) and \(h\) agree, consider their difference \(f(x)-h(x)\) and target zero. In each case, the target matters: identify what equality is being sought, then check the corresponding endpoint comparisons and continuity.
Summary
If \(f\) is continuous on \([a,b]\), then every value between \(f(a)\) and \(f(b)\) occurs somewhere on that interval. The endpoint outputs can both be positive, or both be negative. For a target \(L\), the relevant sign change is in the shifted function \(f-L\), not necessarily in \(f\) itself.
A root guarantee is the special case \(L=0\). Opposite signs at the endpoints guarantee a root, but same-sign endpoint outputs do not guarantee one. They also do not prevent the function from taking other intermediate values.
Check Your Understanding
For each question, identify the target value and the endpoint comparison that matters.
- A continuous function on \([a,b]\) has \(f(a)=4\) and \(f(b)=12\). What values does the Intermediate Value Theorem guarantee it attains?
- A continuous function has endpoint outputs \(-8\) and \(-2\). Does the theorem guarantee that it takes the value \(-5\)? Explain.
- Why does the fact that \(f(a)\) and \(f(b)\) are both positive not by itself guarantee a root?
- If \(L\) lies strictly between \(f(a)\) and \(f(b)\), define a shifted function whose endpoint values have opposite signs.
- What extra hypothesis, besides the target lying between endpoint outputs, is needed to apply the Intermediate Value Theorem on \([a,b]\)?