Skip to content

Mathematics · Ch 17 — Continuity

Solved Examples

17.2

Solved Examples

This section works through twelve fully solved examples and one guided activity, applying every idea from 8.1.1–8.1.11 to concrete functions. Several examples also introduce standard limit results that are quoted, without re-derivation, throughout the harder examples: lim⁡x→0ex−1x=1\displaystyle\lim_{x\to0}\frac{e^x-1}{x}=1, lim⁡x→0ax−1x=log⁡a\displaystyle\lim_{x\to0}\frac{a^x-1}{x}=\log a, lim⁡x→0(1+t)1/t=e\displaystyle\lim_{x\to0}(1+t)^{1/t}=e, lim⁡x→0(1−t)1/t=e−1=1e\displaystyle\lim_{x\to0}(1-t)^{1/t}=e^{-1}=\frac1e, lim⁡x→0log⁡(1+x)x=1\displaystyle\lim_{x\to0}\frac{\log(1+x)}{x}=1, and lim⁡x→0log⁡(1−x)x=−1\displaystyle\lim_{x\to0}\frac{\log(1-x)}{x}=-1 (these can be proved using L'Hospital's rule or power-series expansions, studied at a more advanced stage) — together with the already-familiar lim⁡θ→0sin⁡θθ=1=lim⁡θ→0tan⁡θθ\displaystyle\lim_{\theta\to0}\frac{\sin\theta}{\theta}=1=\lim_{\theta\to0}\frac{\tan\theta}{\theta}.

Example 1. Discuss the continuity of f(x)=∣x−3∣f(x)=|x-3| at x=3x=3 (Fig. 8.8). By the definition of the modulus function, f(x)=−(x−3)f(x)=-(x-3) for x<3x<3 and f(x)=x−3f(x)=x-3 for x≥3x\ge3. Here f(3)=3−3=0f(3)=3-3=0; also lim⁡x→3−f(x)=−(3−3)=0\displaystyle\lim_{x\to3^-} f(x)=-(3-3)=0 and lim⁡x→3+f(x)=3−3=0\displaystyle\lim_{x\to3^+} f(x)=3-3=0, so both one-sided limits equal 0=lim⁡x→3f(x)0=\lim_{x\to3}f(x), and lim⁡x→3f(x)=f(3)=0\displaystyle\lim_{x\to3} f(x)=f(3)=0. Therefore f(x)f(x) is continuous at x=3x=3.

Example 2. Determine whether ff is continuous on R\mathbb{R}, where f(x)=3x+1f(x)=3x+1 for x<2x<2, f(x)=7f(x)=7 for 2≤x<42\le x<4, and f(x)=x2−8f(x)=x^2-8 for x≥4x\ge4; if discontinuous, state the type. Since the function is built from polynomials on each piece, any discontinuity can only occur where the definition switches, i.e. at x=2x=2 and x=4x=4. At x=2x=2: f(2)=7f(2)=7 (given), lim⁡x→2−f(x)=lim⁡x→2(3x+1)=7\displaystyle\lim_{x\to2^-} f(x)=\lim_{x\to2}(3x+1)=7, and lim⁡x→2+f(x)=7\displaystyle\lim_{x\to2^+} f(x)=7; so lim⁡x→2f(x)=f(2)=7\displaystyle\lim_{x\to2} f(x)=f(2)=7, and ff is continuous at x=2x=2. At x=4x=4: f(4)=42−8=8f(4)=4^2-8=8; lim⁡x→4−f(x)=lim⁡x→4(7)=7\displaystyle\lim_{x\to4^-} f(x)=\lim_{x\to4}(7)=7, while lim⁡x→4+f(x)=lim⁡x→4(x2−8)=16−8=8\displaystyle\lim_{x\to4^+} f(x)=\lim_{x\to4}(x^2-8)=16-8=8. Since 7≠87\ne8, lim⁡x→4f(x)\displaystyle\lim_{x\to4} f(x) does not exist, so ff is discontinuous at x=4x=4, with a jump discontinuity there (both one-sided limits exist but differ); ff is continuous everywhere else on R\mathbb{R}.

Example 3. Test whether f(x)=x2+16x+48x+4f(x)=\dfrac{x^2+16x+48}{x+4} for x≠−4x\ne-4, f(−4)=8f(-4)=8, is continuous at x=−4x=-4. Here f(−4)=8f(-4)=8 is defined. Factorising, x2+16x+48=(x+4)(x+12)x^2+16x+48=(x+4)(x+12), so for x≠−4x\ne-4,

lim⁡x→−4f(x)=lim⁡x→−4(x+4)(x+12)x+4=lim⁡x→−4(x+12)=−4+12=8.\lim_{x\to-4} f(x)=\lim_{x\to-4}\frac{(x+4)(x+12)}{x+4}=\lim_{x\to-4}(x+12)=-4+12=8.

So lim⁡x→−4f(x)=f(−4)=8\displaystyle\lim_{x\to-4} f(x)=f(-4)=8, and by definition f(x)f(x) is continuous at x=−4x=-4.

Example 4. Discuss the continuity of f(x)=9−x2f(x)=\sqrt{9-x^2} on the interval [−3,3][-3,3]. The domain of ff is exactly [−3,3][-3,3], since ff needs 9−x2≥09-x^2\ge0. For any a∈(−3,3)a\in(-3,3), lim⁡x→af(x)=lim⁡x→a9−x2=9−a2=f(a)\displaystyle\lim_{x\to a} f(x)=\lim_{x\to a}\sqrt{9-x^2}=\sqrt{9-a^2}=f(a), so ff is continuous at every interior point. At the endpoints, f(3)=0f(3)=0 and f(−3)=0f(-3)=0; also lim⁡x→3−f(x)=f(3)=0\displaystyle\lim_{x\to3^-} f(x)=f(3)=0 and lim⁡x→−3+f(x)=f(−3)=0\displaystyle\lim_{x\to-3^+} f(x)=f(-3)=0. So ff is continuous on (−3,3)(-3,3), continuous to the right at x=−3x=-3, and continuous to the left at x=3x=3; hence f(x)=9−x2f(x)=\sqrt{9-x^2} is continuous on the closed interval [−3,3][-3,3].

Example 5. Show that f(x)=⌊x⌋f(x)=\lfloor x\rfloor is not continuous at x=0,1x=0,1 on the interval [−1,2)[-1,2) (Fig. 8.9): f(x)=−1f(x)=-1 for x∈[−1,0)x\in[-1,0), f(x)=0f(x)=0 for x∈[0,1)x\in[0,1), and f(x)=1f(x)=1 for x∈[1,2)x\in[1,2). At x=0x=0: f(0)=0f(0)=0, but lim⁡x→0−f(x)=−1\displaystyle\lim_{x\to0^-} f(x)=-1 while lim⁡x→0+f(x)=0\displaystyle\lim_{x\to0^+} f(x)=0; since these differ, ff is discontinuous at x=0x=0. At x=1x=1: f(1)=1f(1)=1, but lim⁡x→1−f(x)=0\displaystyle\lim_{x\to1^-} f(x)=0 while lim⁡x→1+f(x)=1\displaystyle\lim_{x\to1^+} f(x)=1; since these differ too, ff is discontinuous at x=1x=1. Hence f(x)=⌊x⌋f(x)=\lfloor x\rfloor is not continuous at x=0x=0 or x=1x=1 within [−1,2)[-1,2) (each is a jump discontinuity, visible as the two steps in Fig. 8.9).

Example 6. Discuss the continuity of f(x)=x2sin⁡ ⁣(1x)f(x)=x^2\sin\!\left(\dfrac1x\right) for x≠0x\ne0, f(0)=0f(0)=0, at x=0x=0. Since −1≤sin⁡ ⁣(1x)≤1-1\le\sin\!\left(\dfrac1x\right)\le1 for every x≠0x\ne0, multiplying throughout by x2 (≥0)x^2\ (\ge0) gives −x2≤x2sin⁡ ⁣(1x)≤x2-x^2\le x^2\sin\!\left(\dfrac1x\right)\le x^2. Taking the limit as x→0x\to0 throughout, both outer bounds −x2-x^2 and x2x^2 go to 00, so by the Squeeze Theorem, lim⁡x→0x2sin⁡ ⁣(1x)=0\displaystyle\lim_{x\to0} x^2\sin\!\left(\dfrac1x\right)=0, i.e. lim⁡x→0f(x)=0=f(0)\displaystyle\lim_{x\to0} f(x)=0=f(0). Hence f(x)f(x) is continuous at x=0x=0.

Example 7. Find kk if f(x)=xex+tan⁡xsin⁡3xf(x)=\dfrac{xe^x+\tan x}{\sin 3x} for x≠0x\ne0, f(0)=kf(0)=k, is continuous at x=0x=0. Since ff must equal its own limit at 00,

k=lim⁡x→0xex+tan⁡xsin⁡3x=lim⁡x→0ex+tan⁡xxsin⁡3xx=lim⁡x→0ex+lim⁡x→0tan⁡xx3lim⁡x→0sin⁡3x3x=1+11×3=23,k=\lim_{x\to0}\frac{xe^x+\tan x}{\sin 3x}=\lim_{x\to0}\frac{e^x+\dfrac{\tan x}{x}}{\dfrac{\sin 3x}{x}}=\frac{\lim_{x\to0}e^x+\lim_{x\to0}\dfrac{\tan x}{x}}{3\lim_{x\to0}\dfrac{\sin 3x}{3x}}=\frac{1+1}{1\times3}=\frac23,

using lim⁡x→0sin⁡θθ=1=lim⁡x→0tan⁡θθ\lim_{x\to0}\frac{\sin\theta}{\theta}=1=\lim_{x\to0}\frac{\tan\theta}{\theta} as x→0, 3x→0x\to0,\,3x\to0. So k=23k=\dfrac23.

Example 8. If ff is continuous at x=1x=1, where f(x)=sin⁡(πx)x−1+af(x)=\dfrac{\sin(\pi x)}{x-1}+a for x<1x<1, f(1)=2πf(1)=2\pi, and f(x)=1+cos⁡(πx)π(1−x)2+bf(x)=\dfrac{1+\cos(\pi x)}{\pi(1-x)^2}+b for x>1x>1, find aa and bb. Continuity at x=1x=1 requires lim⁡x→1−f(x)=lim⁡x→1+f(x)=f(1)\displaystyle\lim_{x\to1^-} f(x)=\lim_{x\to1^+} f(x)=f(1). For the left limit, put x−1=tx-1=t so x=1+tx=1+t, t→0−t\to0^-: sin⁡(πx)=sin⁡(π+πt)=−sin⁡(πt)\sin(\pi x)=\sin(\pi+\pi t)=-\sin(\pi t), so

lim⁡t→0(−sin⁡(πt)t+a)=2π  ⟹  −πlim⁡t→0sin⁡(πt)πt+a=2π  ⟹  −π(1)+a=2π  ⟹  a=3π.\lim_{t\to0}\left(\frac{-\sin(\pi t)}{t}+a\right)=2\pi \implies -\pi\lim_{t\to0}\frac{\sin(\pi t)}{\pi t}+a=2\pi \implies -\pi(1)+a=2\pi \implies a=3\pi.

For the right limit, put 1−x=θ1-x=\theta so x=1−θx=1-\theta, θ→0+\theta\to0^+; using 1+cos⁡(πx)=1−cos⁡(πθ)=2sin⁡2 ⁣(πθ2)1+\cos(\pi x)=1-\cos(\pi\theta)=2\sin^2\!\left(\frac{\pi\theta}{2}\right),

lim⁡θ→0(2sin⁡2(πθ2)πθ2+b)=2π  ⟹  2π(π2)2lim⁡θ→0[sin⁡(πθ2)πθ2]2+b=2π  ⟹  π2(1)+b=2π  ⟹  b=3π2.\lim_{\theta\to0}\left(\frac{2\sin^2\left(\frac{\pi\theta}{2}\right)}{\pi\theta^2}+b\right)=2\pi \implies \frac{2}{\pi}\left(\frac{\pi}{2}\right)^2\lim_{\theta\to0}\left[\frac{\sin\left(\frac{\pi\theta}{2}\right)}{\frac{\pi\theta}{2}}\right]^2+b=2\pi \implies \frac{\pi}{2}(1)+b=2\pi \implies b=\frac{3\pi}{2}.

So a=3πa=3\pi, b=3π2b=\dfrac{3\pi}{2}.

Example 9. Identify discontinuities for the following as either jump or removable, on R\mathbb{R}:

(1) f(x)=x2−3x−18x−6f(x)=\dfrac{x^2-3x-18}{x-6}: this rational function is continuous for every x≠6x\ne6, so f(6)f(6) is not defined. Factorising, x2−3x−18=(x−6)(x+3)x^2-3x-18=(x-6)(x+3), so lim⁡x→6f(x)=lim⁡x→6(x+3)=9\displaystyle\lim_{x\to6} f(x)=\lim_{x\to6}(x+3)=9. Since f(6)f(6) is undefined but the limit exists, ff has a removable discontinuity at x=6x=6.

(2) g(x)=3x+1g(x)=3x+1 for x<3x<3, g(x)=2−3xg(x)=2-3x for x≥3x\ge3: this is built from two different polynomials meeting at x=3x=3. Here g(3)=2−3(3)=−7g(3)=2-3(3)=-7; lim⁡x→3−g(x)=lim⁡x→3(3x+1)=10\displaystyle\lim_{x\to3^-} g(x)=\lim_{x\to3}(3x+1)=10, while lim⁡x→3+g(x)=lim⁡x→3(2−3x)=−7\displaystyle\lim_{x\to3^+} g(x)=\lim_{x\to3}(2-3x)=-7. Since 10≠−710\ne-7, lim⁡x→3g(x)\displaystyle\lim_{x\to3} g(x) does not exist, so gg has a jump discontinuity at x=3x=3.

(3) h(x)=13−x2h(x)=13-x^2 for x<5x<5, h(x)=13−5xh(x)=13-5x for x>5x>5: h(5)h(5) is not defined by either piece. lim⁡x→5−h(x)=13−25=−12\displaystyle\lim_{x\to5^-} h(x)=13-25=-12 and lim⁡x→5+h(x)=13−25=−12\displaystyle\lim_{x\to5^+} h(x)=13-25=-12 agree, so lim⁡x→5h(x)=−12\displaystyle\lim_{x\to5} h(x)=-12 exists even though h(5)h(5) is undefined — a removable discontinuity at x=5x=5.

Note: the standard limits lim⁡x→0ex−1x=1\lim_{x\to0}\frac{e^x-1}{x}=1, lim⁡x→0ax−1x=log⁡a\lim_{x\to0}\frac{a^x-1}{x}=\log a, lim⁡x→0(1+t)1/t=e\lim_{x\to0}(1+t)^{1/t}=e, lim⁡x→0(1−t)1/t=e−1=1e\lim_{x\to0}(1-t)^{1/t}=e^{-1}=\frac1e, lim⁡x→0log⁡(1+x)x=1\lim_{x\to0}\frac{\log(1+x)}{x}=1 and lim⁡x→0log⁡(1−x)x=−1\lim_{x\to0}\frac{\log(1-x)}{x}=-1 are used from here on without re-proof; they can be established using L'Hospital's rule or a power-series expansion, taken up at a more advanced stage.

Example 10. Show that f(x)=5cos⁡x−e(π/2−x)cot⁡xf(x)=\dfrac{5^{\cos x}-e^{(\pi/2-x)}}{\cot x} for x≠π/2x\ne\pi/2, f(π/2)=log⁡5−ef(\pi/2)=\log5-e, has a removable discontinuity at x=π/2x=\pi/2, and redefine it to be continuous there. Here f(π/2)=log⁡5−ef(\pi/2)=\log5-e is defined. Put π2−x=t\dfrac\pi2-x=t, so x=π2−tx=\dfrac\pi2-t, t→0t\to0 as x→π2x\to\dfrac\pi2: then cos⁡x=sin⁡t\cos x=\sin t, cot⁡x=tan⁡t\cot x=\tan t, so

lim⁡x→π/2f(x)=lim⁡t→05sin⁡t−ettan⁡t=lim⁡t→0(5sin⁡t−1)−(et−1)tan⁡t=lim⁡t→0[5sin⁡t−1sin⁡t⋅sin⁡t−et−1t⋅ttan⁡tt⋅t],\lim_{x\to\pi/2} f(x)=\lim_{t\to0}\frac{5^{\sin t}-e^t}{\tan t}=\lim_{t\to0}\frac{(5^{\sin t}-1)-(e^t-1)}{\tan t}=\lim_{t\to0}\left[\frac{\dfrac{5^{\sin t}-1}{\sin t}\cdot\sin t-\dfrac{e^t-1}{t}\cdot t}{\dfrac{\tan t}{t}\cdot t}\right],

and dividing every piece by tt (valid since t≠0t\ne0) and using sin⁡t≠0\sin t\ne0 near 00, this reduces, using lim⁡t→0sin⁡tt=1=lim⁡t→0tan⁡tt\lim_{t\to0}\frac{\sin t}t=1=\lim_{t\to0}\frac{\tan t}t, lim⁡t→0et−1t=1\lim_{t\to0}\frac{e^t-1}t=1 and lim⁡t→0at−1t=log⁡a\lim_{t\to0}\frac{a^t-1}t=\log a, to

lim⁡x→π/2f(x)=(1)(log⁡5)−11=log⁡5−1.\lim_{x\to\pi/2} f(x)=\frac{(1)(\log5)-1}{1}=\log5-1.

Since f(π/2)=log⁡5−ef(\pi/2)=\log5-e is defined and lim⁡x→π/2f(x)=log⁡5−1\displaystyle\lim_{x\to\pi/2} f(x)=\log5-1 exists, but log⁡5−1≠log⁡5−e\log5-1\ne\log5-e, the function has a removable discontinuity at x=π/2x=\pi/2; it is repaired by redefining f(π/2)=log⁡5−1f(\pi/2)=\log5-1, giving the continuous function

f(x)=5cos⁡x−e(π/2−x)cot⁡x for x≠π2,f ⁣(π2)=log⁡5−1.f(x)=\frac{5^{\cos x}-e^{(\pi/2-x)}}{\cot x} \text{ for } x\ne\frac\pi2, \qquad f\!\left(\frac\pi2\right)=\log5-1.

Example 11. If f(x)=(3x+22−5x)1/xf(x)=\left(\dfrac{3x+2}{2-5x}\right)^{1/x} for x≠0x\ne0 is continuous at x=0x=0, find f(0)f(0). Since ff must equal its limit at 00, write 3x+22−5x=2(1+3x2)2(1−5x2)=(1+3x2)1/x(1−5x2)1/x\dfrac{3x+2}{2-5x}=\dfrac{2\left(1+\frac{3x}2\right)}{2\left(1-\frac{5x}2\right)}=\dfrac{\left(1+\frac{3x}2\right)^{1/x}}{\left(1-\frac{5x}2\right)^{1/x}}, so

f(0)=lim⁡x→0(1+3x2)1/x(1−5x2)1/x=[lim⁡x→0(1+3x2)2/(3x)]3/2[lim⁡x→0(1−5x2)−2/(5x)]−5/2=e3/2e−5/2=e3/2+5/2=e4,f(0)=\lim_{x\to0}\frac{\left(1+\frac{3x}2\right)^{1/x}}{\left(1-\frac{5x}2\right)^{1/x}}=\frac{\left[\lim_{x\to0}\left(1+\frac{3x}2\right)^{2/(3x)}\right]^{3/2}}{\left[\lim_{x\to0}\left(1-\frac{5x}2\right)^{-2/(5x)}\right]^{-5/2}}=\frac{e^{3/2}}{e^{-5/2}}=e^{3/2+5/2}=e^4,

using lim⁡x→0(1+kx)1/(kx)=e\lim_{x\to0}(1+kx)^{1/(kx)}=e. So f(0)=e4f(0)=e^4. …

Figure 8.8Fig. 8.8 – the graph of f(x) = |x-3| (Example 1)

What this figure shows. A V-shaped graph with its vertex sitting on the X-axis at x=3x=3: the left arm is the falling line y=−(x−3)y=-(x-3) approaching zero as xx increases towards 3, and the right arm is the rising line y=x−3y=x-3 moving away from zero as xx increases past 3, the two arms meeting cleanly at the vertex with no gap – used in Example 1 to confirm continuity a …

Figure 8.9Fig. 8.9 – the floor function on [-1,2) (Example 5)

What this figure shows. A three-step staircase graph over the domain [−1,2)[-1,2): a segment at height −1-1 from x=−1x=-1 (solid dot) to just before x=0x=0 (open circle), a segment at height 00 from x=0x=0 (solid dot) to just before x=1x=1 (open circle), and a segment at height 11 from x=1x=1 (solid dot) to just before x=2x=2 (open circle) – the two visible vertical steps at x=0x=0 and x=1x=1 are exactly the discontinuities Example 5 asks the stude …