MathLabs

Grade 11

Continuous Functions

A function is continuous at a point when its graph passes through that point with no hole, jump, or break: formally, lim⁡x→x0f(x)=f(x0)\lim_{x \to x_0} f(x) = f(x_0). Continuity turns out to guarantee two of the most useful facts in analysis — the Intermediate Value Theorem (a continuous function hits every value between f(a)f(a) and f(b)f(b), the basis of the bisection root-finding algorithm) and the Extreme Value Theorem (a continuous function on a closed interval always attains a maximum and a minimum).

IntuitionDrawing a curve without lifting the pen

Take a pencil and draw the graph of y=f(x)y=f(x) from left to right. If you never have to lift the pencil off the paper — no holes, no sudden jumps, no vertical asymptotes shooting off to infinity — the function is continuous on that stretch. The moment you must lift the pencil, the function has a discontinuity at that point. This picture is informal, but it points straight at the precise definition below: a function is continuous at x0x_0 exactly when its value f(x0)f(x_0) and its limiting behavior as x→x0x\to x_0 agree.

A smooth cubic curve rising, dipping, and rising again with no holes or breaks, crossing the x-axis once near x=0.35 and once near x=1.53.
f(x)=x3−3x+1f(x) = x^3 - 3x + 1. This curve never lifts the pen: it is continuous everywhere. Because f(0)=1>0f(0) = 1 > 0 and f(1)=−1<0f(1) = -1 < 0, the curve must cross the xx-axis somewhere between x=0x=0 and x=1x=1 — this is exactly the Intermediate Value Theorem in action, and it is the same cubic used throughout this page.

SchoolContinuity at a point

Definition: Continuity at a point

Let ff be defined on an open interval containing x0x_0. We say ff is **continuous at x0x_0** when three conditions all hold: (1) f(x0)f(x_0) is defined; (2) the limit lim⁡x→x0f(x)\lim_{x \to x_0} f(x) exists; (3) that limit equals f(x0)f(x_0). Combined, these three conditions are written as a single equation, lim⁡x→x0f(x)=f(x0)\lim_{x \to x_0} f(x) = f(x_0). A function is continuous on an open interval (a;b)(a;b) if it is continuous at every point of that interval, and continuous on a closed interval [a;b][a;b] if in addition the one-sided limits at the endpoints match the function's values there.

lim⁡x→x0f(x)=f(x0)\lim_{x \to x_0} f(x) = f(x_0)

Every polynomial, and every function built from polynomials, sin⁡\sin, cos⁡\cos, exponentials and roots by addition, multiplication, division (away from zeros of the denominator) and composition, is continuous at every point of its domain — this is why continuity is "automatic" for almost every formula you write down in school mathematics. Discontinuities only appear at isolated exceptional points: division by zero, a piecewise definition that does not match up, or a genuinely pathological construction.

lim⁡x→x0−f(x)≠lim⁡x→x0+f(x)\lim_{x \to x_0^-} f(x) \neq \lim_{x \to x_0^+} f(x)
Three ways continuity can fail at x0x_0
TypeConditionExample at x0x_0
Removablelim⁡x→x0f(x)\lim_{x \to x_0} f(x) exists but lim⁡x→x0f(x)≠f(x0)\lim_{x \to x_0} f(x) \neq f(x_0), or f(x0)f(x_0) is undefined.f(x)=x2−1x−1f(x) = \dfrac{x^2-1}{x-1} at x0=1x_0=1: the limit is 22 but f(1)f(1) is undefined.
JumpBoth one-sided limits are finite but lim⁡x→x0−f(x)≠lim⁡x→x0+f(x)\lim_{x \to x_0^-} f(x) \neq \lim_{x \to x_0^+} f(x).f(x)=⌊x⌋f(x) = \lfloor x \rfloor at x0=1x_0=1: left limit 00, right limit 11.
InfiniteAt least one one-sided limit is ±∞\pm\infty, so lim⁡x→x0f(x)=±∞\lim_{x \to x_0} f(x) = \pm\infty (no finite limit exists).f(x)=1xf(x) = \dfrac{1}{x} at x0=0x_0=0: both one-sided limits are infinite.

UndergraduateTwo pillars of continuous functions on an interval

If ff is continuous on [a,b][a,b] and kk lies between f(a)f(a) and f(b)f(b), then ∃ c∈(a,b)\exists\, c \in (a,b) with f(c)=kf(c)=k. In particular, if f(a)f(a) and f(b)f(b) have opposite signs, then f(a)⋅f(b)<0 ⇒ ∃ c∈(a,b):f(c)=0f(a)\cdot f(b) < 0 \ \Rightarrow\ \exists\, c \in (a,b): f(c) = 0.

Why is it true?

Think of ff as recording your altitude while hiking continuously from town aa (altitude f(a)f(a)) to town bb (altitude f(b)f(b)) along a trail with no teleporting. You cannot skip over any altitude strictly between the two towns' altitudes — at some instant you must have been at every intermediate height. A discontinuous function can skip values (think of a jump discontinuity), which is exactly why continuity is the essential hypothesis.

Proof

Assume without loss of generality the general case f(a)<k<f(b)f(a) < k < f(b) (the case f(a)>k>f(b)f(a) > k > f(b) is symmetric), and set g(x)=f(x)−kg(x) = f(x) - k, so gg is continuous, g(a)<0<g(b)g(a) < 0 < g(b), and we must find cc with g(c)=0g(c)=0. Set a0=aa_0=a, b0=bb_0=b.

Repeat the following bisection step for n=0,1,2,…n=0,1,2,\dots: compute the midpoint m=a+b2m = \dfrac{a+b}{2} of [an,bn][a_n,b_n]. If g(m)=0g(m)=0, stop — c=mc=m is found. Otherwise g(m)g(m) has a definite sign; keep whichever half of [an,bn][a_n,b_n] has endpoints of opposite sign, i.e. set [an+1,bn+1]=[an,m][a_{n+1},b_{n+1}] = [a_n,m] if g(an)g(m)<0g(a_n)g(m)<0, or [an+1,bn+1]=[m,bn][a_{n+1},b_{n+1}]=[m,b_n] if g(m)g(bn)<0g(m)g(b_n)<0. In every case g(an+1)g(a_{n+1}) and g(bn+1)g(b_{n+1}) keep opposite signs, i.e. f(an)⋅f(bn)≤0f(a_n)\cdot f(b_n) \le 0 (with an,bna_n,b_n now roles of gg), and the interval length halves: bn−an=b−a2nb_n - a_n = \dfrac{b-a}{2^n}.

The sequence (an)(a_n) is increasing and bounded above by bb, and (bn)(b_n) is decreasing and bounded below by aa, so both converge; since bn−an→0b_n-a_n\to 0, they converge to the same limit, an→c,bn→ca_n \to c,\quad b_n \to c, with c∈[a,b]c\in[a,b].

By continuity of gg, g(an)→g(c)g(a_n)\to g(c) and g(bn)→g(c)g(b_n)\to g(c). Because g(an)g(a_n) and g(bn)g(b_n) have opposite signs at every stage (or one is already 00), g(an)g(bn)≤0g(a_n)g(b_n)\le 0 for all nn; passing to the limit gives g(c)2≤0g(c)^2\le 0, i.e. f(c)2≤0 ⇒ f(c)=0f(c)^2 \le 0 \ \Rightarrow\ f(c) = 0 (applied to gg). Hence f(c)=g(c)+k=kf(c) = g(c)+k = k, and c∈(a,b)c\in(a,b) since an<c<bna_n<c<b_n strictly as soon as bisection has run at least one step without landing on an endpoint (and if it lands on mm at some step, that mm is the sought cc).

If ff is continuous on the closed, bounded interval [a,b][a,b], then ∃ c,d∈[a,b]: f(c)≤f(x)≤f(d)  ∀x∈[a,b]\exists\, c, d \in [a,b]:\ f(c) \le f(x) \le f(d)\ \ \forall x \in [a,b]: that is, ff attains a maximum value f(d)f(d) and a minimum value f(c)f(c) somewhere on [a,b][a,b].

Why is it true?

A continuous function on a closed interval cannot "run away" to infinity (the interval is bounded and closed, so there is nowhere to escape to), and it cannot approach a highest value without ever quite reaching it either — an open interval like (0,1)(0,1) lets f(x)=xf(x)=x get arbitrarily close to 11 without ever attaining it, but including the endpoint x=1x=1 in [0,1][0,1] closes that loophole. Both the boundedness of the interval and its closedness (including endpoints) are essential.

Proof

**Step 1 — ff is bounded above on [a,b][a,b].** Suppose not: for every n∈Nn\in\mathbb{N} there is xn∈[a,b]x_n\in[a,b] with f(xn)>nf(x_n) > n. The sequence (xn)(x_n) lies in the bounded interval [a,b][a,b], so by the Bolzano–Weierstrass theorem it has a subsequence xnk→c∈[a,b]x_{n_k}\to c\in[a,b]. Continuity of ff gives f(xnk)→f(c)f(x_{n_k})\to f(c), a single finite number, contradicting f(xnk)>nk→∞f(x_{n_k}) > n_k \to \infty. Hence ff is bounded above; the symmetric argument (applied to −f-f) shows ff is bounded below.

Step 2 — the supremum is attained. By Step 1, M=sup⁡[a,b]fM=\sup_{[a,b]} f is a finite number. By definition of supremum, for every nn there is yn∈[a,b]y_n\in[a,b] with M−1n<f(yn)≤MM-\tfrac1n < f(y_n) \le M. Again by Bolzano–Weierstrass, (yn)(y_n) has a subsequence ynk→d∈[a,b]y_{n_k}\to d\in[a,b]. Squeezing M−1nk<f(ynk)≤MM-\tfrac{1}{n_k} < f(y_{n_k}) \le M as k→∞k\to\infty gives f(ynk)→Mf(y_{n_k})\to M; but continuity also gives f(ynk)→f(d)f(y_{n_k})\to f(d), so f(d)=Mf(d)=M. Thus the maximum value MM is attained at x=dx=d.

Step 3 — the minimum is attained. Apply Steps 1–2 to −f-f (also continuous on [a,b][a,b]): −f-f attains a maximum at some c∈[a,b]c\in[a,b], which means ff attains its minimum at that same cc. This gives both cc and dd as required.

UndergraduateReal-World Applications and Worked Examples

The Intermediate Value Theorem is not just an existence statement — it is the mathematical backbone of the bisection method, one of the oldest and most reliable numerical root-finding algorithms in engineering and computer science: given f(a)f(a) and f(b)f(b) of opposite sign, repeatedly halving the interval (exactly as in the proof above) traps a root to any desired precision, and every step is guaranteed to succeed because ff never "jumps over" zero. The same theorem also justifies equilibrium arguments in physics: whenever a continuous quantity (temperature, pressure, concentration) is compared between two states or two locations, IVT guarantees an intermediate state or location where the two sides balance exactly.

Example: Locating a root with the bisection method

Show that f(x)=x3−3x+1f(x) = x^3 - 3x + 1 has a root in (0,1)(0,1), then use the bisection method to locate it to two decimal places.

Solution

Since ff is a polynomial it is continuous everywhere, and f(0)=1>0f(0) = 1 > 0 while f(1)=−1<0f(1) = -1 < 0, so f(0)f(1)<0f(0)f(1)<0; by IVT there is a root c∈(0,1)c\in(0,1).

Bisect: m=0.5m=0.5, f(0.5)=0.125−1.5+1=−0.375<0f(0.5)=0.125-1.5+1=-0.375<0. Since f(0)>0>f(0.5)f(0)>0>f(0.5), the root lies in (0,0.5)(0, 0.5).

Bisect again: m=0.25m=0.25, f(0.25)=0.015625−0.75+1=0.265625>0f(0.25)=0.015625-0.75+1=0.265625>0. Since f(0.25)>0>f(0.5)f(0.25)>0>f(0.5), the root lies in (0.25,0.5)(0.25, 0.5).

Continuing — m=0.375m=0.375 gives f(0.375)≈−0.072<0f(0.375)\approx -0.072<0 (root in (0.25,0.375)(0.25,0.375)), then m=0.3125m=0.3125 gives f(0.3125)≈0.093>0f(0.3125)\approx 0.093>0 (root in (0.3125,0.375)(0.3125,0.375)), then m=0.34375m=0.34375 gives f(0.34375)≈0.009>0f(0.34375)\approx 0.009>0 (root in (0.34375,0.375)(0.34375,0.375)) — the interval has shrunk to length under 0.0310.031 and both endpoints round to 0.340.34–0.380.38; one more step confirms the root rounds to c≈0,35c \approx 0{,}35, matching the widget's marked crossing near x≈0.35x\approx 0.35.

Example: Two antipodal points at the same temperature

Around a circular running track of circumference 2π2\pi, the ground temperature T(θ)T(\theta) (as a function of the angle θ\theta) varies continuously. Show that at some instant there are two diametrically opposite points on the track with exactly the same temperature.

Solution

Define g(x)=T(x)−T(x+π)g(x) = T(x) - T(x+\pi) for x∈[0,π]x\in[0,\pi], comparing the temperature at angle xx with the temperature at the diametrically opposite angle x+πx+\pi. Since TT is continuous, gg is continuous on [0,π][0,\pi].

Evaluate at the endpoints: g(0)=T(0)−T(π)g(0) = T(0)-T(\pi), and g(π)=T(π)−T(2π)=T(π)−T(0)=−g(0)g(\pi) = T(\pi) - T(2\pi) = T(\pi) - T(0) = -g(0) — that is, g(π)=−g(0)g(\pi) = -g(0).

If g(0)=0g(0)=0, then T(0)=T(π)T(0)=T(\pi) already, and x=0,πx=0,\pi are the two antipodal points sought. Otherwise g(0)g(0) and g(π)=−g(0)g(\pi)=-g(0) have strictly opposite signs, so g(0)g(π)<0g(0)g(\pi)<0; by the Intermediate Value Theorem there is c∈(0,π)c\in(0,\pi) with g(c)=0g(c)=0, i.e. T(c)=T(c+π)T(c) = T(c+\pi). In either case, the points at angles cc and c+πc+\pi have identical temperature — this is exactly the "thermal equilibrium" flavor of the theorem: continuity forces two opposing readings to cross.

ResearchContinuity at the research frontier

Let f(x)=x2−9x−3f(x) = \dfrac{x^2-9}{x-3} for x≠3x\neq 3 and f(3)=5f(3)=5. Is ff continuous at x0=3x_0=3?

f(x)=⌊x⌋f(x) = \lfloor x \rfloor has, at every integer x0x_0, a discontinuity of which type?

Does f(x)=x3−3x+1f(x) = x^3 - 3x + 1 have a root in the interval (1,2)(1,2)?

Applying the bisection method to f(x)=x3−3x+1f(x) = x^3 - 3x + 1 starting from [0,1][0,1], what is the new bracketing interval after the first step?

References

  1. James Stewart (2015). Calculus: Early Transcendentals
  2. Walter Rudin (1976). Principles of Mathematical Analysis
  3. Francis Edward Su (1997). A Borsuk-Ulam Equivalent that Directly Implies the Sperner Lemma