Navigation

Concept Review

Differential Calculus

Continuity and the Intermediate Value Theorem

Continuity is the bridge between limits and everything that follows them. A derivative can only exist where a function is already well behaved, and the great existence theorems of calculus — the Intermediate Value Theorem here, the Extreme Value Theorem and the Mean Value Theorem later — all take continuity as a hypothesis. Informally, a continuous graph has no holes, jumps or blow-ups; the job of this topic is to replace that picture with a test you can actually apply, and then to cash it in for a theorem that proves equations have solutions.

Continuity at a point

Definition. A function ff is continuous at aa if

limxaf(x)=f(a).\lim_{x \to a} f(x) = f(a).

That one equation hides three separate requirements. Check them in this order:

  1. f(a)f(a) is defined — that is, aa lies in the domain of ff;
  2. limxaf(x)\lim_{x\to a} f(x) exists as a finite number (equivalently, both one-sided limits exist, are finite, and agree);
  3. the two numbers are equal.

If any one fails, ff is discontinuous at aa. Continuity is always a statement about one point at a time; "ff is continuous" is shorthand for "continuous at every point of some stated set".

Convention. We call aa a discontinuity of ff when ff is defined on a punctured neighbourhood of aa (near aa, though possibly not at aa) yet fails to be continuous there. A point far outside the domain, such as x=5x=-5 for x\sqrt{x}, is not classified at all.

One-sided continuity and intervals

ff is right-continuous at aa if limxa+f(x)=f(a)\lim_{x\to a^{+}} f(x)=f(a), and left-continuous at aa if limxaf(x)=f(a)\lim_{x\to a^{-}} f(x)=f(a). A function is continuous at aa exactly when it is both left-continuous and right-continuous at aa.

ff is continuous on the open interval (a,b)(a,b) if it is continuous at every point of (a,b)(a,b). ff is continuous on the closed interval [a,b][a,b] if it is continuous at every cc in (a,b)(a,b), right-continuous at aa, and left-continuous at bb. Endpoints only ever carry the one-sided requirement — that is exactly why f(x)=xf(x)=\sqrt{x} counts as continuous on [0,)[0,\infty) even though the two-sided limit limx0x\lim_{x\to 0}\sqrt{x} is meaningless.

Types of discontinuity

TypeDiagnostic at x=ax=aExampleFixable by redefining f(a)f(a)?
Removablelimxaf(x)=L\lim_{x\to a}f(x)=L exists and is finite, but f(a)f(a) is undefined or f(a)Lf(a)\ne Lx29x3\dfrac{x^{2}-9}{x-3} at a=3a=3, where L=6L=6Yes — set f(a)=Lf(a)=L
Jumpboth one-sided limits exist and are finite, but they differthe step function s(x)=1s(x)=-1 for x<0x<0, s(x)=1s(x)=1 for x0x\ge 0, at a=0a=0No
Infiniteat least one one-sided limit is ++\infty or -\infty (vertical asymptote)1x\dfrac{1}{x} at a=0a=0; 1(x2)2\dfrac{1}{(x-2)^{2}} at a=2a=2No
Oscillatory (essential)a one-sided limit fails to exist for a reason other than blowing upsin(1x)\sin\left(\dfrac{1}{x}\right) at a=0a=0No

The jump size at a jump discontinuity is limxa+f(x)limxaf(x)\lim_{x\to a^{+}}f(x)-\lim_{x\to a^{-}}f(x). Only the removable case admits a continuous extension: the new function that agrees with ff away from aa and takes the value LL at aa.

Which functions are continuous

Algebra of continuous functions. If ff and gg are continuous at aa, then so are f+gf+g, fgf-g, cfcf (for any constant cc) and fgfg; and fg\dfrac{f}{g} is continuous at aa provided g(a)0g(a)\ne 0.

Composition. If gg is continuous at aa and ff is continuous at g(a)g(a), then the composite f(g(x))f(g(x)) is continuous at aa.

Limit swap. If limxag(x)=L\lim_{x\to a}g(x)=L and ff is continuous at LL, then

limxaf(g(x))=f(limxag(x))=f(L).\lim_{x\to a} f\left(g(x)\right)=f\left(\lim_{x\to a}g(x)\right)=f(L).

The continuity hypothesis is not decoration; without it the swap is false (see Common mistakes).

FamilyContinuous on
polynomials(,)(-\infty,\infty)
rational functions P(x)Q(x)\dfrac{P(x)}{Q(x)}every xx with Q(x)0Q(x)\ne 0
x\sqrt{x}[0,)[0,\infty), one-sided at 00
sinx\sin x, cosx\cos x, exe^{x}, arctanx\arctan x, absolute value(,)(-\infty,\infty)
tanx\tan x, secx\sec xall xx with cosx0\cos x\ne 0, i.e. xπ2+kπx\ne \dfrac{\pi}{2}+k\pi
cotx\cot x, cscx\csc xall xx with sinx0\sin x\ne 0, i.e. xkπx\ne k\pi
lnx\ln x(0,)(0,\infty)
arcsinx\arcsin x, arccosx\arccos x[1,1][-1,1], one-sided at ±1\pm 1

Anything built from these by sums, differences, products, quotients and compositions is continuous on its natural domain. The only candidate trouble spots are therefore: a vanishing denominator, a square root whose argument turns negative, a logarithm whose argument reaches 00, and the switch points of a piecewise definition.

Worked example 1 — choosing parameters

Find aa and bb making ff continuous on (,)(-\infty,\infty):

f(x)={3x+1,x<1ax2+b,1x25x3,x>2f(x)=\begin{cases} 3x+1, & x<1\\ ax^{2}+b, & 1\le x\le 2\\ 5x-3, & x>2 \end{cases}

Each piece is a polynomial, hence continuous on the open interval where it applies; only x=1x=1 and x=2x=2 can fail.

At x=1x=1: the middle line gives the value, f(1)=a(1)2+b=a+bf(1)=a(1)^{2}+b=a+b, which is also limx1+f(x)\lim_{x\to 1^{+}}f(x), while limx1f(x)=3(1)+1=4\lim_{x\to 1^{-}}f(x)=3(1)+1=4. Continuity needs

a+b=4.a+b=4.

At x=2x=2: f(2)=a(2)2+b=4a+b=limx2f(x)f(2)=a(2)^{2}+b=4a+b=\lim_{x\to 2^{-}}f(x), and limx2+f(x)=5(2)3=7\lim_{x\to 2^{+}}f(x)=5(2)-3=7. Continuity needs

4a+b=7.4a+b=7.

Subtracting the first equation from the second gives 3a=33a=3, so a=1a=1 and then b=4a=3b=4-a=3. Check: a+b=4=3(1)+1a+b=4=3(1)+1 and 4a+b=4+3=7=5(2)34a+b=4+3=7=5(2)-3. Answer: a=1a=1, b=3b=3.

The Intermediate Value Theorem

Hypotheses. ff is continuous on the closed, bounded interval [a,b][a,b] (so f(a)f(a) and f(b)f(b) are defined and finite), and NN is a number strictly between f(a)f(a) and f(b)f(b).

Conclusion. There exists at least one cc in the open interval (a,b)(a,b) with f(c)=Nf(c)=N.

Root form (Bolzano). If ff is continuous on [a,b][a,b] and f(a)f(b)<0f(a)\cdot f(b)<0, then ff has at least one zero in (a,b)(a,b).

What the IVT does not give: uniqueness of cc; any formula or algorithm for cc; any conclusion when continuity fails anywhere in [a,b][a,b]; and no conclusion about roots when f(a)f(a) and f(b)f(b) share a sign. Careful: sharing a sign kills only the root argument. If f(a)=2f(a)=2 and f(b)=7f(b)=7 the IVT still delivers every value strictly between 22 and 77. It is the case f(a)=f(b)f(a)=f(b) that leaves no admissible NN at all, and there the theorem says nothing. Its converse is also false: a function can take every intermediate value and still be discontinuous.

Worked example 2 — bracketing a root

Show that x3+x1=0x^{3}+x-1=0 has a solution, and trap one inside an interval of length 14\dfrac{1}{4}.

Let f(x)=x3+x1f(x)=x^{3}+x-1, a polynomial, hence continuous on every closed interval. Then

f(0)=0+01=1<0,f(1)=1+11=1>0.f(0)=0+0-1=-1<0, \qquad f(1)=1+1-1=1>0.

Since ff is continuous on [0,1][0,1] and N=0N=0 lies strictly between 1-1 and 11, the IVT gives some cc in (0,1)(0,1) with f(c)=0f(c)=0.

Bisect once:

f(12)=18+121=38<0,f\left(\frac{1}{2}\right)=\frac{1}{8}+\frac{1}{2}-1=-\frac{3}{8}<0,

so the sign change now sits between 12\dfrac{1}{2} and 11: a root lies in (12,1)\left(\dfrac{1}{2},1\right). Bisect again:

f(34)=2764+341=27641664=1164>0,f\left(\frac{3}{4}\right)=\frac{27}{64}+\frac{3}{4}-1=\frac{27}{64}-\frac{16}{64}=\frac{11}{64}>0,

so the sign change sits between 12\dfrac{1}{2} and 34\dfrac{3}{4}. Hence a root lies in (12,34)\left(\dfrac{1}{2},\dfrac{3}{4}\right), an interval of length 14\dfrac{1}{4}. (In fact c0.6823c\approx 0.6823.)

Common mistakes

WrongRight
"limxaf(x)\lim_{x\to a}f(x) exists, so ff is continuous at aa."Existence of the limit is only condition 2. You still need f(a)f(a) to exist and to equal that limit.
Cancelling and declaring victory: x29x3=x+3\dfrac{x^{2}-9}{x-3}=x+3, "so ff is continuous at 33".The identity holds only for x3x\ne 3. The original ff is undefined at 33: a removable discontinuity. It is the extension g(x)=x+3g(x)=x+3 that is continuous, not ff.
Matching only the two one-sided limits in a piecewise problem.If a separate line of the definition assigns f(a)f(a), the common one-sided value must equal that f(a)f(a) too. Three conditions, not two.
"x\sqrt{x} is discontinuous at 00 because the two-sided limit fails."At a domain endpoint only the one-sided condition applies: limx0+x=0=f(0)\lim_{x\to 0^{+}}\sqrt{x}=0=f(0), so x\sqrt{x} is continuous on [0,)[0,\infty).
Applying the IVT to f(x)=1xf(x)=\dfrac{1}{x} on [1,1][-1,1]: "f(1)=1<0<1=f(1)f(-1)=-1<0<1=f(1), so there is a root."ff is not continuous on [1,1][-1,1] (infinite discontinuity at 00), so the IVT says nothing — and indeed 1x\dfrac{1}{x} is never 00.
"f(0)<0<f(2)f(0)<0<f(2), so there is exactly one root."The IVT gives at least one. f(x)=(x12)(x1)(x32)f(x)=\left(x-\dfrac{1}{2}\right)(x-1)\left(x-\dfrac{3}{2}\right) has f(0)=34<0<34=f(2)f(0)=-\dfrac{3}{4}<0<\dfrac{3}{4}=f(2) and three roots in (0,2)(0,2). Uniqueness needs a separate argument on top of the IVT; strict monotonicity on [a,b][a,b] is the usual one, and it is sufficient but not necessary.
"f(0)=1f(0)=1 and f(2)=1f(2)=1, so by the IVT ff never takes the value 33."The IVT produces values; it forbids nothing. f(x)=1+6x3x2f(x)=1+6x-3x^{2} is continuous with f(0)=f(2)=1f(0)=f(2)=1, yet f(1)=4f(1)=4, so f(x)=3f(x)=3 at x=1±13x=1\pm\dfrac{1}{\sqrt{3}}.
limxaf(g(x))=f(limxag(x))\lim_{x\to a}f(g(x))=f\left(\lim_{x\to a}g(x)\right), always.Only when ff is continuous at L=limxag(x)L=\lim_{x\to a} g(x). With f(y)=1f(y)=1 for y=0y=0 and f(y)=0f(y)=0 otherwise, and g(x)=x2g(x)=x^{2}: limx0f(g(x))=0\lim_{x\to 0}f(g(x))=0 but f(limx0g(x))=f(0)=1f\left(\lim_{x\to 0}g(x)\right)=f(0)=1.

Key terms

  • continuity at a point
  • three conditions for continuity
  • one-sided continuity
  • left-continuous and right-continuous
  • continuous on a closed interval
  • removable discontinuity
  • continuous extension
  • jump discontinuity
  • jump size
  • infinite discontinuity
  • oscillatory (essential) discontinuity
  • algebra of continuous functions
  • continuity of compositions
  • limit-swap rule
  • piecewise-defined function
  • parameter matching
  • Intermediate Value Theorem
  • Bolzano root theorem
  • sign change
  • bracketing a root by bisection
  • existence versus uniqueness
  • fixed point

Practice Problems

Let

f(x)={x29x3,x35,x=3f(x)=\begin{cases} \dfrac{x^{2}-9}{x-3}, & x\ne 3\\ 5, & x=3 \end{cases}

Check the three conditions for continuity at x=3x=3 one at a time. Is ff continuous at 33? If not, name the type of discontinuity and say how, or whether, it can be repaired.

Show hint

Do not just stare at the formula: evaluate f(3)f(3) from the definition and compute limx3f(x)\lim_{x\to 3}f(x) separately, then compare the two numbers.

Show answer

Condition 1: is f(3)f(3) defined? Yes. The second line of the definition gives f(3)=5f(3)=5.

Condition 2: does limx3f(x)\lim_{x\to 3}f(x) exist? For x3x\ne 3 we may cancel, because x30x-3\ne 0:

x29x3=(x3)(x+3)x3=x+3(x3).\frac{x^{2}-9}{x-3}=\frac{(x-3)(x+3)}{x-3}=x+3 \qquad (x\ne 3).

A limit as x3x\to 3 only uses values with x3x\ne 3, so

limx3f(x)=limx3(x+3)=6.\lim_{x\to 3}f(x)=\lim_{x\to 3}(x+3)=6.

Both one-sided limits equal 66, so the limit exists and is finite.

Condition 3: are the two numbers equal? limx3f(x)=6\lim_{x\to 3}f(x)=6 but f(3)=5f(3)=5, and 656\ne 5. Condition 3 fails.

Conclusion. ff is not continuous at 33. Because the limit exists and is finite while the assigned value is the wrong one, this is a removable discontinuity. It is repaired by a single redefinition: setting f(3)=6f(3)=6, which amounts to using g(x)=x+3g(x)=x+3 for all xx, makes the function continuous at 33 and hence continuous on all of (,)(-\infty,\infty).

Find every discontinuity of

f(x)=x21x23x+2,f(x)=\frac{x^{2}-1}{x^{2}-3x+2},

classify each one, and state the largest set on which ff is continuous.

Show hint

Factor the numerator and the denominator first; a zero of the denominator behaves very differently depending on whether the numerator vanishes there too.

Show answer

Factor.

f(x)=x21x23x+2=(x1)(x+1)(x1)(x2).f(x)=\frac{x^{2}-1}{x^{2}-3x+2}=\frac{(x-1)(x+1)}{(x-1)(x-2)}.

The denominator vanishes at x=1x=1 and x=2x=2, so the domain is all xx with x1x\ne 1 and x2x\ne 2. Everywhere else ff is a rational function with nonzero denominator, hence continuous by the quotient rule. So the only candidates are x=1x=1 and x=2x=2.

At x=1x=1. For x1x\ne 1 we may cancel the factor x1x-1:

f(x)=x+1x2(x1 and x2).f(x)=\frac{x+1}{x-2}\qquad (x\ne 1 \text{ and } x\ne 2).

Therefore

limx1f(x)=1+112=21=2,\lim_{x\to 1}f(x)=\frac{1+1}{1-2}=\frac{2}{-1}=-2,

a finite limit, while f(1)f(1) is undefined (condition 1 fails). This is a removable discontinuity; defining f(1)=2f(1)=-2 repairs it.

At x=2x=2. Using the same cancelled form, as x2x\to 2 the numerator tends to 303\ne 0 while the denominator tends to 00. Checking signs:

  • as x2x\to 2^{-}: x20x-2\to 0^{-}, so x+1x2\dfrac{x+1}{x-2}\to -\infty;
  • as x2+x\to 2^{+}: x20+x-2\to 0^{+}, so x+1x2+\dfrac{x+1}{x-2}\to +\infty.

(Numerical check: f(1.999)2999f(1.999)\approx -2999 and f(2.001)3001f(2.001)\approx 3001.) This is an infinite discontinuity, with the vertical asymptote x=2x=2. It cannot be removed by redefining a single value.

Conclusion. ff has a removable discontinuity at x=1x=1 and an infinite discontinuity at x=2x=2, and it is continuous on

(,1)(1,2)(2,).(-\infty,1)\cup(1,2)\cup(2,\infty).

Let

f(x)={x3x3,x31,x=3f(x)=\begin{cases} \dfrac{|x-3|}{x-3}, & x\ne 3\\ 1, & x=3 \end{cases}

Compute both one-sided limits at x=3x=3. Is ff left-continuous at 33? Right-continuous? Continuous? Classify the discontinuity and state its jump size.

Show hint

Split the absolute value into its two cases according to the sign of x3x-3, and simplify the formula separately on each side of 33.

Show answer

Remove the absolute value. By definition x3=x3|x-3|=x-3 when x>3x>3, and x3=(x3)|x-3|=-(x-3) when x<3x<3. Hence for x3x\ne 3,

f(x)={(x3)x3=1,x<3x3x3=+1,x>3f(x)=\begin{cases} \dfrac{-(x-3)}{x-3}=-1, & x<3\\ \dfrac{x-3}{x-3}=+1, & x>3 \end{cases}

One-sided limits. ff is constantly 1-1 just to the left of 33 and constantly +1+1 just to the right, so

limx3f(x)=1,limx3+f(x)=+1.\lim_{x\to 3^{-}}f(x)=-1, \qquad \lim_{x\to 3^{+}}f(x)=+1.

One-sided continuity. The definition gives f(3)=1f(3)=1.

  • Right-continuity: limx3+f(x)=1=f(3)\lim_{x\to 3^{+}}f(x)=1=f(3), so yes, ff is right-continuous at 33.
  • Left-continuity: limx3f(x)=11=f(3)\lim_{x\to 3^{-}}f(x)=-1\ne 1=f(3), so no, ff is not left-continuous at 33.

Continuity. Continuity at 33 requires both one-sided conditions, so ff is not continuous at 33. Equivalently, the two-sided limit does not exist, so condition 2 of the definition fails.

Classification. Both one-sided limits exist and are finite but are unequal, so this is a jump discontinuity, with jump size

limx3+f(x)limx3f(x)=1(1)=2.\lim_{x\to 3^{+}}f(x)-\lim_{x\to 3^{-}}f(x)=1-(-1)=2.

No choice of f(3)f(3) can repair a jump: whatever value is assigned, it can match at most one of the two one-sided limits. Away from 33 the function is locally constant, so ff is continuous on (,3)(3,)(-\infty,3)\cup(3,\infty).

Find the value of the constant aa that makes

f(x)={x24x2,x<2ax+1,x2f(x)=\begin{cases} \dfrac{x^{2}-4}{x-2}, & x<2\\ ax+1, & x\ge 2 \end{cases}

continuous at x=2x=2. With that value of aa, on what set is ff continuous?

Show hint

Compute the left-hand limit by factoring, work out f(2)f(2) from the second line, and force the two to agree.

Show answer

Left-hand limit. For x<2x<2 we certainly have x2x\ne 2, so we may cancel:

x24x2=(x2)(x+2)x2=x+2.\frac{x^{2}-4}{x-2}=\frac{(x-2)(x+2)}{x-2}=x+2.

Hence

limx2f(x)=limx2(x+2)=4.\lim_{x\to 2^{-}}f(x)=\lim_{x\to 2^{-}}(x+2)=4.

Value and right-hand limit. The second line applies at x=2x=2 and to its right, and ax+1ax+1 is a polynomial, so

f(2)=2a+1,limx2+f(x)=limx2+(ax+1)=2a+1.f(2)=2a+1, \qquad \lim_{x\to 2^{+}}f(x)=\lim_{x\to 2^{+}}(ax+1)=2a+1.

Impose continuity. All three of limx2f(x)\lim_{x\to 2^{-}}f(x), limx2+f(x)\lim_{x\to 2^{+}}f(x) and f(2)f(2) must coincide, so

2a+1=42a=3a=32.2a+1=4 \quad\Rightarrow\quad 2a=3 \quad\Rightarrow\quad a=\frac{3}{2}.

Check. With a=32a=\dfrac{3}{2} we get f(2)=232+1=4f(2)=2\cdot\dfrac{3}{2}+1=4, which matches the left-hand limit 44. Continuity holds.

Where is ff continuous? For x<2x<2, ff agrees with the polynomial x+2x+2 (the cancellation is valid there), so it is continuous on (,2)(-\infty,2). For x>2x>2 it is the polynomial 32x+1\dfrac{3}{2}x+1, also continuous. With a=32a=\dfrac{3}{2} the switch point is fine as well, so ff is continuous on all of (,)(-\infty,\infty). For any other value of aa, ff has a jump discontinuity at x=2x=2 of size 2a+14=2a302a+1-4=2a-3\ne 0.

Determine the largest set on which

g(x)=ln(4x2)x+1g(x)=\frac{\ln\left(4-x^{2}\right)}{x+1}

is continuous. Justify your answer by naming the continuity theorems you use, and describe the behaviour of gg at x=1x=-1.

Show hint

Build gg up from standard functions: first ask where the composition in the numerator is even defined, then apply the quotient rule for continuity.

Show answer

Step 1: the numerator. Let u(x)=4x2u(x)=4-x^{2}, a polynomial, hence continuous on (,)(-\infty,\infty), and recall that ln\ln is continuous on (0,)(0,\infty). By the composition theorem (if uu is continuous at xx and ln\ln is continuous at u(x)u(x), then ln(u(x))\ln(u(x)) is continuous at xx), the numerator is continuous at every xx for which

4x2>0,that isx2<4,that is2<x<2.4-x^{2}>0, \quad\text{that is}\quad x^{2}<4, \quad\text{that is}\quad -2<x<2.

Outside [2,2][-2,2] the numerator is undefined, and at x=±2x=\pm 2 the argument of ln\ln equals 00, which is also outside the domain of ln\ln.

Step 2: the denominator. x+1x+1 is a polynomial, continuous everywhere, and it vanishes only at x=1x=-1.

Step 3: the quotient. By the quotient rule for continuity, a quotient of functions continuous at xx is continuous at xx provided the denominator is nonzero there. Combining Steps 1 and 2, gg is continuous at every xx with 2<x<2-2<x<2 and x1x\ne -1, that is, on

(2,1)(1,2).(-2,-1)\cup(-1,2).

This is also exactly the domain of gg, so gg is continuous at every point of its domain — as any elementary function is.

Behaviour at x=1x=-1. There the numerator tends to ln(4(1)2)=ln31.09860\ln\left(4-(-1)^{2}\right)=\ln 3\approx 1.0986\ne 0 while the denominator tends to 00:

  • as x1x\to -1^{-}: x+10x+1\to 0^{-}, so g(x)g(x)\to -\infty;
  • as x1+x\to -1^{+}: x+10+x+1\to 0^{+}, so g(x)+g(x)\to +\infty.

So x=1x=-1 is an infinite discontinuity with vertical asymptote x=1x=-1, and it is not removable.

A remark on x=±2x=\pm 2. These are not classified as discontinuities, because gg is undefined on a whole one-sided neighbourhood there (gg does not exist for x2|x|\ge 2); they are domain endpoints. For the record, ln(4x2)\ln(4-x^{2})\to -\infty as x2x\to 2^{-} while x+13x+1\to 3, so g(x)g(x)\to -\infty; and as x2+x\to -2^{+} the denominator tends to 1-1, so g(x)+g(x)\to +\infty.

Find constants aa and bb so that

f(x)={2x+1,x<1ax+b,1x2x23,x>2f(x)=\begin{cases} 2x+1, & x<-1\\ ax+b, & -1\le x\le 2\\ x^{2}-3, & x>2 \end{cases}

is continuous on (,)(-\infty,\infty).

Show hint

Only the two switch points can cause trouble. Each one gives a linear equation in aa and bb; solve the resulting system of two equations.

Show answer

Where can continuity fail? On (,1)(-\infty,-1), on (1,2)(-1,2) and on (2,)(2,\infty) the function agrees with a polynomial, and polynomials are continuous. So the only possible discontinuities are the switch points x=1x=-1 and x=2x=2.

Condition at x=1x=-1. The middle line covers x=1x=-1, so

f(1)=a(1)+b=a+b,limx1+f(x)=a+b,f(-1)=a(-1)+b=-a+b, \qquad \lim_{x\to -1^{+}}f(x)=-a+b,

while from the left

limx1f(x)=2(1)+1=1.\lim_{x\to -1^{-}}f(x)=2(-1)+1=-1.

Continuity at 1-1 therefore requires

a+b=1.(1)-a+b=-1. \qquad (1)

Condition at x=2x=2. The middle line also covers x=2x=2, so f(2)=2a+b=limx2f(x)f(2)=2a+b=\lim_{x\to 2^{-}}f(x), while from the right

limx2+f(x)=223=1.\lim_{x\to 2^{+}}f(x)=2^{2}-3=1.

Continuity at 22 therefore requires

2a+b=1.(2)2a+b=1. \qquad (2)

Solve the system. Subtract (1)(1) from (2)(2):

(2a+b)(a+b)=1(1)3a=2a=23.\begin{aligned} (2a+b)-(-a+b) &= 1-(-1)\\ 3a &= 2\\ a &= \frac{2}{3}. \end{aligned}

Then from (1)(1),

b=1+a=1+23=13.b=-1+a=-1+\frac{2}{3}=-\frac{1}{3}.

Check both equations. a+b=2313=1-a+b=-\dfrac{2}{3}-\dfrac{1}{3}=-1, which matches 2(1)+1=12(-1)+1=-1. And 2a+b=4313=12a+b=\dfrac{4}{3}-\dfrac{1}{3}=1, which matches 223=12^{2}-3=1. Both hold.

Answer. a=23a=\dfrac{2}{3} and b=13b=-\dfrac{1}{3}, so the middle piece is f(x)=2x13f(x)=\dfrac{2x-1}{3}. With these values ff is continuous on all of (,)(-\infty,\infty); for any other pair, ff has a jump discontinuity at x=1x=-1, or at x=2x=2, or at both.

Let

f(x)=x+42x,x>4 and x0.f(x)=\frac{\sqrt{x+4}-2}{x}, \qquad x>-4 \text{ and } x\ne 0.

Does ff have a removable discontinuity at x=0x=0? If so, give the value kk that must be assigned to f(0)f(0) to make the extended function continuous at 00, and state the interval on which the extension is continuous.

Show hint

Substituting x=0x=0 gives the indeterminate form 00\dfrac{0}{0}, so the formula must be rewritten. Multiply numerator and denominator by the conjugate of the numerator.

Show answer

Identify the form. As x0x\to 0, the numerator x+4242=0\sqrt{x+4}-2\to\sqrt{4}-2=0 and the denominator 0\to 0: the indeterminate form 00\dfrac{0}{0}. So the limit may still exist, but algebra is needed to find it.

Rationalise the numerator. For x0x\ne 0 with x>4x>-4, multiply above and below by x+4+2\sqrt{x+4}+2, which is never 00 (indeed x+4+22\sqrt{x+4}+2\ge 2):

x+42x=(x+42)(x+4+2)x(x+4+2)=(x+4)4x(x+4+2)=xx(x+4+2)=1x+4+2.\begin{aligned} \frac{\sqrt{x+4}-2}{x} &= \frac{\left(\sqrt{x+4}-2\right)\left(\sqrt{x+4}+2\right)}{x\left(\sqrt{x+4}+2\right)}\\ &= \frac{(x+4)-4}{x\left(\sqrt{x+4}+2\right)}\\ &= \frac{x}{x\left(\sqrt{x+4}+2\right)}\\ &= \frac{1}{\sqrt{x+4}+2}. \end{aligned}

Cancelling xx is legitimate precisely because x0x\ne 0 throughout the limit process.

Take the limit. The function 1x+4+2\dfrac{1}{\sqrt{x+4}+2} is continuous at x=0x=0 — it is a quotient of continuous functions whose denominator there equals 4+2=40\sqrt{4}+2=4\ne 0 — so we may substitute:

limx0f(x)=10+4+2=12+2=14.\lim_{x\to 0}f(x)=\frac{1}{\sqrt{0+4}+2}=\frac{1}{2+2}=\frac{1}{4}.

Numerical check: at x=0.001x=0.001 the original quotient is 0.24998\approx 0.24998, and at x=0.001x=-0.001 it is 0.25002\approx 0.25002. Both sit next to 0.250.25.

Conclusion. The limit exists and is finite while f(0)f(0) is undefined, so x=0x=0 is a removable discontinuity and the repairing value is

k=14.k=\frac{1}{4}.

The extension. Define F(x)=f(x)F(x)=f(x) for x0x\ne 0 and F(0)=14F(0)=\dfrac{1}{4}. The computation above shows that in fact

F(x)=1x+4+2for every x>4,F(x)=\frac{1}{\sqrt{x+4}+2} \qquad\text{for every } x>-4,

and x+4+2\sqrt{x+4}+2 is continuous with value at least 22, hence never 00, so this quotient is continuous at every x>4x>-4. Therefore FF is continuous on (4,)(-4,\infty), which is the domain of ff together with the single repaired point x=0x=0.

(Strictly, FF is not continuous at x=4x=-4, because 4-4 is not in its domain. The formula 1x+4+2\dfrac{1}{\sqrt{x+4}+2} does make sense there, with value 10+2=12\dfrac{1}{\sqrt{0}+2}=\dfrac{1}{2}, so one may extend once more to a function continuous on [4,)[-4,\infty) — right-continuity being all that is required at that endpoint. But that is a second extension, beyond the one the question asks for.)

Show that the equation x34x+1=0x^{3}-4x+1=0 has a solution in the interval (0,1)(0,1). Then use two bisection steps to locate a solution inside an interval of length 14\dfrac{1}{4}. State clearly which hypotheses of the Intermediate Value Theorem you are using at each stage.

Show hint

Name the function, say why it satisfies the hypotheses on the closed interval, then evaluate at the endpoints and look for a sign change.

Show answer

Set up. Let f(x)=x34x+1f(x)=x^{3}-4x+1.

Hypothesis check. ff is a polynomial, and every polynomial is continuous on (,)(-\infty,\infty); in particular ff is continuous on the closed, bounded interval [0,1][0,1].

Endpoint values.

f(0)=00+1=1>0,f(1)=14+1=2<0.f(0)=0-0+1=1>0, \qquad f(1)=1-4+1=-2<0.

The target value N=0N=0 lies strictly between f(1)=2f(1)=-2 and f(0)=1f(0)=1. By the Intermediate Value Theorem there exists cc in (0,1)(0,1) with f(c)=0f(c)=0, that is, cc solves x34x+1=0x^{3}-4x+1=0.

Bisection step 1. Evaluate at the midpoint x=12x=\dfrac{1}{2}:

f(12)=18412+1=182+1=78<0.f\left(\frac{1}{2}\right)=\frac{1}{8}-4\cdot\frac{1}{2}+1=\frac{1}{8}-2+1=-\frac{7}{8}<0.

Now f(0)=1>0f(0)=1>0 and f(12)=78<0f\left(\dfrac{1}{2}\right)=-\dfrac{7}{8}<0, and ff is continuous on [0,12]\left[0,\dfrac{1}{2}\right], so the IVT gives a root in (0,12)\left(0,\dfrac{1}{2}\right). On the other half both endpoint values are negative, so the IVT gives no information there and we discard it.

Bisection step 2. Evaluate at the midpoint x=14x=\dfrac{1}{4}:

f(14)=164414+1=1641+1=164>0.f\left(\frac{1}{4}\right)=\frac{1}{64}-4\cdot\frac{1}{4}+1=\frac{1}{64}-1+1=\frac{1}{64}>0.

Now f(14)=164>0f\left(\dfrac{1}{4}\right)=\dfrac{1}{64}>0 and f(12)=78<0f\left(\dfrac{1}{2}\right)=-\dfrac{7}{8}<0, with ff continuous on [14,12]\left[\dfrac{1}{4},\dfrac{1}{2}\right]. By the IVT there is a root

c(14,12),c \in \left(\frac{1}{4},\frac{1}{2}\right),

an interval of length 1214=14\dfrac{1}{2}-\dfrac{1}{4}=\dfrac{1}{4}, as required.

Verification. Numerically the root is c0.25410c\approx 0.25410, which indeed lies in (0.25, 0.5)(0.25,\ 0.5). Note that ff has two further real roots, near 2.115-2.115 and 1.8611.861, both outside [0,1][0,1] — the IVT never claimed uniqueness.

Prove that the equation cosx=x\cos x = x has a solution in the interval (0,π2)\left(0,\dfrac{\pi}{2}\right). Then explain why the Intermediate Value Theorem alone does not show that the solution is unique, and give a separate argument that it is.

Show hint

The IVT is about one function attaining one value, so first rearrange the equation into the form "some continuous function equals 00".

Show answer

Rearrange. A solution of cosx=x\cos x=x is exactly a zero of

g(x)=cosxx.g(x)=\cos x - x.

Hypothesis check. cosx\cos x is continuous on (,)(-\infty,\infty) and xx is a polynomial, hence continuous; a difference of continuous functions is continuous. So gg is continuous on the closed, bounded interval [0,π2]\left[0,\dfrac{\pi}{2}\right].

Endpoint values.

g(0)=cos00=10=1>0,g(0)=\cos 0-0=1-0=1>0,

g(π2)=cosπ2π2=0π2=π21.5708<0.g\left(\frac{\pi}{2}\right)=\cos\frac{\pi}{2}-\frac{\pi}{2}=0-\frac{\pi}{2}=-\frac{\pi}{2}\approx -1.5708<0.

Apply the IVT. The value N=0N=0 lies strictly between g(π2)=π2g\left(\dfrac{\pi}{2}\right)=-\dfrac{\pi}{2} and g(0)=1g(0)=1, and gg is continuous on [0,π2]\left[0,\dfrac{\pi}{2}\right]. Hence there is some cc in (0,π2)\left(0,\dfrac{\pi}{2}\right) with g(c)=0g(c)=0, that is,

cosc=c.\cos c = c.

Why the IVT does not give uniqueness. Its conclusion is literally "there exists at least one cc". Nothing in the hypotheses — continuity, plus a value lying between the endpoint values — restricts how many such points there are. For example h(x)=(x1)(x2)(x3)h(x)=(x-1)(x-2)(x-3) is continuous on [0,4][0,4] with

h(0)=(1)(2)(3)=6<0<6=(3)(2)(1)=h(4),h(0)=(-1)(-2)(-3)=-6<0<6=(3)(2)(1)=h(4),

so N=0N=0 lies strictly between the endpoint values and the IVT applies word for word — yet hh has three zeros in (0,4)(0,4), namely 11, 22 and 33. Nor may you upgrade the conclusion to "an odd number of crossings": a continuous function can vanish on an entire subinterval, so its zero set need not even be finite. A sign change buys existence and nothing else.

A separate uniqueness argument. On [0,π2]\left[0,\dfrac{\pi}{2}\right] the function cosx\cos x is strictly decreasing while the function xx is strictly increasing. So if 0x1<x2π20\le x_{1}<x_{2}\le \dfrac{\pi}{2} then

g(x1)=cosx1x1>cosx2x1>cosx2x2=g(x2),g(x_{1})=\cos x_{1}-x_{1} > \cos x_{2}-x_{1} > \cos x_{2}-x_{2}=g(x_{2}),

using cosx1>cosx2\cos x_{1}>\cos x_{2} in the first inequality and x1>x2-x_{1}>-x_{2} in the second. Hence gg is strictly decreasing on [0,π2]\left[0,\dfrac{\pi}{2}\right], and a strictly decreasing function takes each value at most once. So gg has at most one zero there; combined with the IVT, which gave at least one, the solution is exactly one.

Numerical check. c0.7391c\approx 0.7391 (the Dottie number), and cos(0.7391)0.7391\cos(0.7391)\approx 0.7391.

(a) Let

f(x)={x2sin(1x),x00,x=0f(x)=\begin{cases} x^{2}\sin\left(\dfrac{1}{x}\right), & x\ne 0\\ 0, & x=0 \end{cases}

Prove that ff is continuous at x=0x=0.

(b) Let g(x)=sin(1x)g(x)=\sin\left(\dfrac{1}{x}\right) for x0x\ne 0. Show that no choice of g(0)g(0) makes gg continuous at 00, and classify the discontinuity.

Show hint

For (a), bound the oscillating factor and squeeze. For (b), it is enough to exhibit two sequences of inputs approaching 00 along which gg takes different constant values.

Show answer

(a) Continuity at 00 by squeezing.

Condition 1 holds: f(0)=0f(0)=0 is defined. We must show that limx0f(x)=0\lim_{x\to 0}f(x)=0.

For every real tt we have 1sint1-1\le \sin t\le 1, so in particular 1sin(1x)1-1\le \sin\left(\dfrac{1}{x}\right)\le 1 for every x0x\ne 0. (The inner expression 1x\dfrac{1}{x} is a perfectly good real number for each x0x\ne 0; we never need it to converge.) Multiplying through by x2x^{2}, which is 0\ge 0 and so preserves the inequalities,

x2x2sin(1x)x2(x0).-x^{2} \le x^{2}\sin\left(\frac{1}{x}\right) \le x^{2} \qquad (x\ne 0).

Since limx0(x2)=0\lim_{x\to 0}\left(-x^{2}\right)=0 and limx0x2=0\lim_{x\to 0}x^{2}=0, the Squeeze Theorem gives

limx0x2sin(1x)=0.\lim_{x\to 0} x^{2}\sin\left(\frac{1}{x}\right)=0.

So the limit exists and equals 00 (condition 2), and it agrees with f(0)=0f(0)=0 (condition 3). Therefore ff is continuous at 00.

Notice what was not used: the limit limx0sin(1x)\lim_{x\to 0}\sin\left(\dfrac{1}{x}\right), which does not exist by part (b). The limit-swap rule and the product rule for limits are both unavailable here, and the squeeze does the work instead.

(b) No value of g(0)g(0) can work.

Suppose, for contradiction, that limx0g(x)=L\lim_{x\to 0}g(x)=L for some number LL. Consider two sequences of inputs tending to 00. For every positive integer nn put

xn=12πn,sog(xn)=sin(2πn)=0,x_{n}=\frac{1}{2\pi n}, \qquad\text{so}\qquad g(x_{n})=\sin(2\pi n)=0,

yn=1π2+2πn,sog(yn)=sin(π2+2πn)=1.y_{n}=\frac{1}{\frac{\pi}{2}+2\pi n}, \qquad\text{so}\qquad g(y_{n})=\sin\left(\frac{\pi}{2}+2\pi n\right)=1.

Both xn0+x_{n}\to 0^{+} and yn0+y_{n}\to 0^{+} as nn\to\infty, yet the corresponding function values are constantly 00 along the first sequence and constantly 11 along the second. If the limit LL existed, every sequence of inputs approaching 00 would force the values to approach that same LL, giving L=0L=0 and L=1L=1 at once — a contradiction. Hence

limx0sin(1x) does not exist,\lim_{x\to 0}\sin\left(\frac{1}{x}\right) \text{ does not exist},

and the same sequences show the right-hand limit fails; mirror sequences with negative terms do the same on the left. Condition 2 of the definition of continuity fails no matter what number is assigned to g(0)g(0), so no choice of g(0)g(0) makes gg continuous at 00.

Classification. The one-sided limits fail to exist, but not by tending to ++\infty or -\infty (indeed gg is bounded, since 1g(x)1-1\le g(x)\le 1). So the discontinuity is neither removable, nor a jump, nor infinite: it is an oscillatory (essential) discontinuity.

Three students misuse the Intermediate Value Theorem. In each case decide whether the conclusion is true or false, and identify precisely which hypothesis, or which part of the statement, is being abused.

(a) "f(x)=1xf(x)=\dfrac{1}{x} satisfies f(1)=1<0<1=f(1)f(-1)=-1<0<1=f(1), so by the IVT there is cc in (1,1)(-1,1) with f(c)=0f(c)=0."

(b) "ff is continuous on [0,2][0,2] with f(0)=f(2)=1f(0)=f(2)=1. Since both endpoint values are 11, the IVT tells us that ff never takes the value 33 on [0,2][0,2]."

(c) "ff is defined on [1,1][-1,1] and takes every value between f(1)f(-1) and f(1)f(1) somewhere on that interval. Therefore ff is continuous on [1,1][-1,1]."

Show hint

For each claim, write out the exact hypotheses and the exact conclusion of the IVT and compare them line by line with what is asserted; then look for an explicit counterexample.

Show answer

Recall the theorem exactly. Hypotheses: ff is continuous on the closed, bounded interval [a,b][a,b], and NN lies strictly between f(a)f(a) and f(b)f(b). Conclusion: there exists at least one cc in (a,b)(a,b) with f(c)=Nf(c)=N.

(a) False — the continuity hypothesis fails.

f(x)=1xf(x)=\dfrac{1}{x} is not even defined at x=0x=0, let alone continuous there, so ff is not continuous on the closed interval [1,1][-1,1]: it has an infinite discontinuity at 00, with f(x)f(x)\to -\infty as x0x\to 0^{-} and f(x)+f(x)\to +\infty as x0+x\to 0^{+}. The IVT therefore says nothing at all. And the asserted conclusion is genuinely false: 1c=0\dfrac{1}{c}=0 has no solution, since 1c0\dfrac{1}{c}\ne 0 for every c0c\ne 0. This is the single most common IVT error — checking the sign change and forgetting to check continuity on the whole closed interval.

(b) False — the IVT is an existence theorem, never an exclusion theorem.

The IVT produces values; it never forbids any. Values outside the range between f(a)f(a) and f(b)f(b) are entirely possible. Concrete counterexample: take

f(x)=1+6x3x2,f(x)=1+6x-3x^{2},

a polynomial, hence continuous on [0,2][0,2], with

f(0)=1,f(2)=1+1212=1,f(1)=1+63=4.f(0)=1, \qquad f(2)=1+12-12=1, \qquad f(1)=1+6-3=4.

So the endpoint values are both 11, yet ff reaches 44. Applying the IVT correctly on [0,1][0,1], where f(0)=1f(0)=1 and f(1)=4f(1)=4 and 33 lies strictly between them, we even get a guaranteed point with f=3f=3. Solving exactly:

1+6x3x2=33x26x+2=0x=6±36246=6±236=1±13.\begin{aligned} 1+6x-3x^{2} &= 3\\ 3x^{2}-6x+2 &= 0\\ x &= \frac{6\pm\sqrt{36-24}}{6}=\frac{6\pm 2\sqrt{3}}{6}=1\pm\frac{1}{\sqrt{3}}. \end{aligned}

Both 1130.42261-\dfrac{1}{\sqrt{3}}\approx 0.4226 and 1+131.57741+\dfrac{1}{\sqrt{3}}\approx 1.5774 lie in (0,2)(0,2), so ff takes the value 33 twice. The correct reading of equal endpoint values: the IVT gives no information whatsoever.

(c) False — this is the converse of the IVT, and the converse is not a theorem.

The property described is called the intermediate value property. Continuity implies it; it does not imply continuity. Counterexample on [1,1][-1,1]:

f(x)={sin(1x),x00,x=0f(x)=\begin{cases} \sin\left(\dfrac{1}{x}\right), & x\ne 0\\ 0, & x=0 \end{cases}

This ff has an oscillatory discontinuity at 00, so it is not continuous on [1,1][-1,1]. Yet on every interval (0,δ)(0,\delta) with δ>0\delta>0 it already attains every value in [1,1][-1,1]: as xx runs through (0,δ)(0,\delta), the quantity 1x\dfrac{1}{x} runs through (1δ,)\left(\dfrac{1}{\delta},\infty\right), an interval longer than 2π2\pi, over which sin\sin sweeps its full range. In particular ff attains every value between f(1)=sin(1)f(-1)=\sin(-1) and f(1)=sin(1)f(1)=\sin(1). So the intermediate value property is strictly weaker than continuity.

Summary. (a) false — continuity on all of [a,b][a,b] is required; (b) false — the IVT asserts existence and never non-existence; (c) false — the converse of the IVT does not hold.

Let ff be continuous on [0,1][0,1] with 0f(x)10\le f(x)\le 1 for every xx in [0,1][0,1], so that ff maps [0,1][0,1] into itself. Prove that ff has a fixed point: there exists cc in [0,1][0,1] with f(c)=cf(c)=c.

Then give an explicit example showing that the conclusion can fail if [0,1][0,1] is replaced throughout by the open interval (0,1)(0,1), and say which hypothesis is lost.

Show hint

The IVT is about zeros of a function, so manufacture one: consider the difference between f(x)f(x) and xx, and evaluate it at the two endpoints.

Show answer

Set up an auxiliary function. Define

g(x)=f(x)x,x in [0,1].g(x)=f(x)-x, \qquad x \text{ in } [0,1].

ff is continuous on [0,1][0,1] by hypothesis and xx is continuous everywhere, so gg, a difference of continuous functions, is continuous on the closed, bounded interval [0,1][0,1]. A fixed point of ff is exactly a zero of gg, since g(c)=0g(c)=0 says precisely that f(c)=cf(c)=c.

Evaluate at the endpoints, using the range hypothesis.

g(0)=f(0)0=f(0)  0,because 0f(0)1;g(0)=f(0)-0=f(0)\ \ge\ 0, \qquad\text{because } 0\le f(0)\le 1;

g(1)=f(1)1  0,because f(1)1.g(1)=f(1)-1\ \le\ 0, \qquad\text{because } f(1)\le 1.

Dispose of the boundary cases first. This matters, because the IVT needs NN to lie strictly between the endpoint values.

  • If g(0)=0g(0)=0, then f(0)=0f(0)=0 and c=0c=0 is a fixed point. Done.
  • If g(1)=0g(1)=0, then f(1)=1f(1)=1 and c=1c=1 is a fixed point. Done.

Main case. Otherwise the inequalities above are strict: g(0)>0g(0)>0 and g(1)<0g(1)<0. Then N=0N=0 lies strictly between g(1)g(1) and g(0)g(0), and gg is continuous on [0,1][0,1], so the Intermediate Value Theorem yields some cc in (0,1)(0,1) with

g(c)=0,that isf(c)=c.g(c)=0, \qquad\text{that is}\qquad f(c)=c.

In every case ff has a fixed point in [0,1][0,1], which is what we had to prove.

(This is the one-dimensional Brouwer fixed point theorem. The proof supplies no formula for cc and gives no uniqueness: for f(x)=xf(x)=x every point of [0,1][0,1] is a fixed point.)

Failure on the open interval. Take

h(x)=x+12,x in (0,1).h(x)=\frac{x+1}{2}, \qquad x \text{ in } (0,1).

hh is continuous, being a polynomial, and it does map (0,1)(0,1) into itself: if 0<x<10<x<1 then 1<x+1<21<x+1<2, so 12<h(x)<1\dfrac{1}{2}<h(x)<1, and every such value lies in (0,1)(0,1). But solving for a fixed point,

x+12=xx+1=2xx=1,\frac{x+1}{2}=x \quad\Rightarrow\quad x+1=2x \quad\Rightarrow\quad x=1,

and each step is reversible, so x=1x=1 is the only solution — and x=1x=1 is not in (0,1)(0,1). Hence hh has no fixed point in (0,1)(0,1).

Which hypothesis is lost. Closedness of the interval. The proof must evaluate gg at the endpoints 00 and 11 to obtain g(0)0g(0)\ge 0 and g(1)0g(1)\le 0, and the IVT itself demands a closed, bounded interval on which ff is continuous. On (0,1)(0,1) the endpoints are unavailable: here g(x)=h(x)x=1x2>0g(x)=h(x)-x=\dfrac{1-x}{2}>0 for every xx in (0,1)(0,1), so there is no sign change at all inside the interval — it would only occur in the limit at x=1x=1, which the open interval excludes.