Chapter 4 — Exercises
36 problems on continuity, classifying discontinuities, the Intermediate Value Theorem, the bisection method, and the Extreme Value Theorem. Worked solutions to starred problems appear in
appendices/answers-to-selected.md.
How to use these. Work the ⭐ problems until the three-condition definition (Section 4.2) is automatic, then push into the classification (Section 4.3), IVT (Section 4.6), and bisection (Section 4.7) tiers. The ⭐⭐⭐⭐ problems ask for genuine proofs and reward patience over speed.
Part A — Recognizing Continuity (⭐)
4.1 State the three conditions (Section 4.2) for $f$ to be continuous at a point $a$, and give a one-line example in which each single condition fails while the other two hold.
4.2 Sketch a function that is continuous everywhere except at $x = 2$, where it has a removable discontinuity. Mark the hole and the value $f(2)$ clearly.
4.3 Sketch a single function that has a jump discontinuity at $x = 0$ and an infinite discontinuity at $x = 3$.
4.4 Explain, using the three conditions, why $\ln x$ is continuous on $(0, \infty)$ but is not even defined at $x = 0$ — and why that makes "$\ln x$ is discontinuous at $0$" a sloppy statement.
4.5 Using only the classical-function list and the combination theorems (Section 4.5), state where each function is continuous (no computation of limits needed): (a) $f(x) = \dfrac{x^2 + 1}{x - 5}$ (b) $g(x) = \sqrt{x - 3}$ (c) $h(x) = \dfrac{\cos x}{\,e^x\,}$ (d) $p(x) = \tan x$.
Part B — Classifying Discontinuities (⭐⭐)
4.6 Classify the discontinuity of each function at the indicated point as removable, jump, infinite, or oscillating:
(a) $f(x) = \dfrac{x^2 - 4}{x - 2}$ at $x = 2$ (b) $f(x) = \dfrac{x + 1}{x^2 - 1}$ at $x = 1$ (c) $f(x) = \lfloor x \rfloor$ at $x = 0$ (d) $f(x) = \sin(1/x)$ at $x = 0$ (e) $f(x) = \begin{cases} x^2 & x \leq 1 \\ 2x - 2 & x > 1 \end{cases}$ at $x = 1$ (f) $f(x) = \dfrac{|x - 3|}{x - 3}$ at $x = 3$
4.7 For the function in 4.6(a), can the discontinuity be removed? If so, what value should $f(2)$ be defined as, and what is the resulting graph?
4.8 Find every value of $x$ at which $f(x) = \dfrac{x^2 - x - 6}{x^2 - 4}$ is discontinuous, and classify each. (Factor first.)
4.9 Give a function with a removable discontinuity at $x = -1$, a jump at $x = 0$, and an infinite discontinuity at $x = 2$, all at once. Write it as a single piecewise/rational expression and justify each classification.
4.10 The function $f(x) = x\sin(1/x)$ for $x \ne 0$ is left undefined at $0$. Is the discontinuity at $0$ removable? Decide, and if so give the repairing value. (Use the squeeze idea from Chapter 3: $-|x| \le x\sin(1/x) \le |x|$.)
Part C — Continuity of Piecewise Functions (⭐⭐)
4.11 For what value of $c$ is the following function continuous everywhere? $$f(x) = \begin{cases} x^2 - c & x \leq 1 \\ 2cx & x > 1 \end{cases}$$
4.12 Determine where each function is continuous: (a) $f(x) = \begin{cases} \sin(x)/x & x \neq 0 \\ 1 & x = 0 \end{cases}$ (b) $g(x) = \begin{cases} x^2 + 1 & x < 0 \\ x + 1 & 0 \leq x < 2 \\ 5 - x & x \geq 2 \end{cases}$
4.13 Find values of $a$ and $b$ that make $$f(x) = \begin{cases} x + 1 & x < 1 \\ ax + b & 1 \leq x \leq 3 \\ 7 & x > 3 \end{cases}$$ continuous everywhere. Is the solution unique?
4.14 A shipping company charges \$8 for the first 2 kg and \$3 for each additional whole kilogram (or fraction thereof). Write the cost $C(w)$ as a piecewise function for $0 < w \le 5$, identify every discontinuity, and classify them. Is the function right-continuous or left-continuous at each jump (Section 4.8)?
Part D — Intermediate Value Theorem (⭐⭐⭐)
4.15 Use IVT (Section 4.6) to show that $f(x) = x^3 + x - 1$ has a root in $[0, 1]$. State the two endpoint values you used.
4.16 Show that the equation $\cos x = x$ has a solution in $[0, \pi/2]$.
4.17 Show that $e^x = 3 - x$ has at least one real solution, and pin it to an interval of length $1$.
4.18 Show that every polynomial of odd degree has at least one real root. (Hint: argue about the sign of $p(x)$ as $x \to +\infty$ and $x \to -\infty$, then invoke IVT on a large interval. This is a clean payoff of Section 4.6.)
4.19 Suppose $f$ is continuous on $[0, 1]$ with $f(0) = f(1)$. Prove there exists $c \in [0, 1/2]$ with $f(c) = f(c + 1/2)$. (Apply IVT to $g(x) = f(x + 1/2) - f(x)$ on $[0, 1/2]$.)
4.20 A hiker climbs a mountain trail, starting at 7 a.m. and reaching the summit at 7 p.m. The next day she descends the same trail, again 7 a.m. to 7 p.m. Prove there is a clock time at which she was at the same elevation on both days. (Hint: let $u(t)$ and $d(t)$ be the two elevation profiles and apply IVT to $u - d$.)
Part E — The Bisection Method (computational, ⭐⭐⭐)
4.21 Implement bisection(f, a, b, tol) in Python (Section 4.7) and use it to find the root of $x^3 + x - 1 = 0$ in $[0, 1]$ to $10^{-8}$. Compare with scipy.optimize.brentq.
4.22 Use bisection to solve $x = \cos x$ on $[0, 1]$. Report the root to eight decimals and the number of iterations your tolerance required.
4.23 Use bisection to compute $\sqrt[3]{2}$ — the root of $x^3 - 2 = 0$ — starting from $[1, 2]$. How many iterations are needed to guarantee $8$ correct decimals? Compare your predicted iteration count to $\log_2\!\big((b-a)/\tau\big)$.
4.24 (Hand bisection.) Carry out four steps of bisection by hand on $f(x) = x^2 - 2$ over $[1, 2]$. Record a table with columns $[a,b]$, midpoint $m$, $f(m)$, sign, and the kept half. What interval brackets $\sqrt 2$ after four steps, and what is its width?
4.25 The function $g(x) = \tan x$ is discontinuous at $x = \pi/2 + k\pi$. Explain what goes wrong if you blindly apply bisection to $g$ on $[1, 2]$ (which straddles $\pi/2 \approx 1.5708$): the endpoints $g(1) > 0$ and $g(2) < 0$ have opposite signs, yet there is no root in $(1,2)$. Which IVT hypothesis (Section 4.6) is violated, and what does bisection converge to instead?
4.26 Modify your bisection code to also return the number of iterations and a list of successive bracket widths. Plot the bracket width on a log scale against the iteration number for $x^3 - 2 = 0$. Confirm the straight line (geometric/linear convergence) predicted in Section 4.7.
Part F — Continuity Theorems and Combinations (⭐⭐)
4.27 Use the combination and composition theorems (Section 4.5) to argue, by structure rather than by limits, that $f(x) = e^{\sin x}\cdot \ln(1 + x^2)$ is continuous on all of $\mathbb{R}$.
4.28 Find and classify every discontinuity of $f(x) = \dfrac{\sin x}{x^2 - 4}$.
4.29 Decide whether $f(x) = \sqrt{\,\cos(x^2) + 3\,}$ is continuous everywhere, and justify by tracking the composition of continuous pieces (Section 4.5). Where, if anywhere, could the radicand threaten continuity?
4.30 True or false (justify each): (a) The sum of two continuous functions is always continuous. (b) The quotient of two continuous functions is always continuous. (c) The composition of two continuous functions is always continuous. (d) If $f$ and $g$ are each discontinuous at $a$, then $f + g$ is discontinuous at $a$.
Part G — Extreme Value Theorem (⭐⭐⭐)
4.31 Explain, citing EVT (Section 4.9), why no continuous function on the closed bounded interval $[0,1]$ can fail to attain its maximum. Then exhibit a continuous function on the open interval $(0,1)$ that attains neither a max nor a min, and identify where the would-be extremes "escape."
4.32 Give a function on $[0,1]$ that has a single discontinuity and fails EVT (attains no maximum). Identify the type of discontinuity and explain how it lets the function run off to $+\infty$.
4.33 Let $f$ be continuous on $[0, 1]$ with $0 \le f(x) \le 1$ for all $x$ (so $f$ maps $[0,1]$ into itself). Prove $f$ has a fixed point: some $c$ with $f(c) = c$. (Apply IVT to $g(x) = f(x) - x$. This is the 1-D Brouwer fixed-point theorem.)
Part H — Proofs and Deeper Reflection (⭐⭐⭐⭐)
4.34 (IVT over $\mathbb{Q}$ fails.) Exhibit a function $f:\mathbb{Q}\to\mathbb{Q}$, continuous in the rational world, with $f(1) < 0 < f(2)$ but no rational $c$ where $f(c) = 0$. Explain precisely which property of $\mathbb{R}$ — absent in $\mathbb{Q}$ — IVT secretly relies on (Section 4.6).
4.35 (Continuity via the sequential criterion.) Using the sequential criterion of Section 4.11 — $f$ is continuous at $a$ iff $x_n \to a$ forces $f(x_n)\to f(a)$ — prove that $f(x) = \sin(1/x)$ (with $f(0)$ defined to be any value) is discontinuous at $0$. Construct two explicit sequences $x_n \to 0$ and $y_n \to 0$ whose images converge to different numbers.
4.36 (A composition subtlety.) It is true that if $g$ is continuous at $a$ and $f$ is continuous at $g(a)$ then $f\circ g$ is continuous at $a$ (Section 4.5). Show by counterexample that the hypothesis "$f$ continuous at $g(a)$" cannot be weakened to merely "$\lim_{y\to g(a)} f(y)$ exists." (Hint: let $g$ be constant equal to $0$ near $a$ but with a removable-style wrinkle, and let $f$ have a removable discontinuity at $0$.)
Difficulty Distribution
| Tier | Count | Problems |
|---|---|---|
| ⭐ | 5 | 4.1–4.5 |
| ⭐⭐ | 13 | 4.6–4.14 (Parts B, C), 4.27–4.30 (Part F) |
| ⭐⭐⭐ | 15 | 4.15–4.26 (Parts D, E), 4.31–4.33 (Part G) |
| ⭐⭐⭐⭐ | 3 | 4.34–4.36 (Part H) |
Total: 36 problems, roughly 3–4 hours. Computational problems (Part E) require Python with numpy and scipy; everything else is by hand. Solutions to selected problems (marked in appendices/answers-to-selected.md): 4.6, 4.8, 4.11, 4.13, 4.15, 4.18, 4.19, 4.23, 4.24, 4.31, 4.33, 4.34, 4.35.