Chapter 6 — Exercises
38 problems spanning the derivative from the definition, graphing $f'$ from $f$, non-differentiability (corners, cusps, vertical tangents), higher-order derivatives, applications across four fields, and gradient descent. Tiered ⭐ (warm-up) through ⭐⭐⭐⭐ (synthesis). Selected answers appear in
appendices/answers-to-selected.md.
Difficulty legend: ⭐ recall/one-step · ⭐⭐ standard practice · ⭐⭐⭐ multi-step or conceptual · ⭐⭐⭐⭐ synthesis, open-ended, or programming.
Part A — Reading the Definition (⭐)
6.1 State, without computing, what each symbol means in one sentence: $f'(x)$, $f'(a)$, $\dfrac{df}{dx}$, $\dfrac{d^2f}{dx^2}$, $Df$, $\dot{x}$.
6.2 Write down the four-step ritual for computing a derivative from the limit definition (§6.2), in your own words.
6.3 True or false, with a one-line reason each: (a) Every continuous function is differentiable. (b) Every differentiable function is continuous. (c) If $f'(a)$ exists then the graph of $f$ has a non-vertical tangent line at $x = a$. (d) The derivative of a function is always another function with the same domain.
6.4 For $f(x) = x^2$, the difference quotient simplifies to $2x + h$ (you may take this as given). What is $f'(x)$, and which step of the ritual does "let $h \to 0$" correspond to?
Part B — From the Definition (⭐⭐)
6.5 Use the limit definition to find $f'(x)$: (a) $f(x) = 3x + 7$ (b) $f(x) = x^2 + 5x$ (c) $f(x) = 1/x$ (d) $f(x) = \sqrt{x + 1}$ (e) $f(x) = x^4$
6.6 For $f(x) = 1/(x + 1)$, find $f'(2)$ directly from the definition.
6.7 Use the limit definition to find $f'(x)$ for $f(x) = x^3 - x$. Confirm that your answer is consistent with the catalog of §6.2 (derivative of a sum is the sum of derivatives).
6.8 Compute $f'(x)$ from the definition for $f(x) = \dfrac{1}{\sqrt{x}}$ (for $x > 0$). Hint: rationalize, as in Worked Example 2 of §6.2.
6.9 Let $f(x) = c$ be constant. Carry out the definition explicitly and explain in one sentence why the answer is $0$ — connect it to the geometric meaning of the derivative.
Part C — Graphing $f'$ from $f$ (⭐⭐)
6.10 A function $f$ has the graph of a single smooth "hill": it rises from the left, reaches a peak at $x = 2$, then falls. Following the routine in §6.4, sketch $f'$. Mark where $f'$ is zero, positive, and negative.
6.11 Let $g$ be a sine-like wave with peaks at $x = \tfrac{\pi}{2}$ and troughs at $x = \tfrac{3\pi}{2}$ on $[0, 2\pi]$. Sketch $g'$. At which $x$-values does $g'$ cross zero, and what is the sign of $g'$ on each subinterval?
6.12 A function $h$ satisfies: $h(0) = 1$, $h(2) = -1$, $h$ is decreasing on $(0, 2)$ and increasing on $(2, 5)$, with $h'(0) = -3$, $h'(2) = 0$, $h'(5) = 4$. Sketch a function consistent with all of this, then sketch its derivative.
6.13 The graph of $f'$ (the derivative, not $f$) is the line $f'(x) = x - 1$. (a) On what interval is $f$ increasing? Decreasing? (b) Where does $f$ have a horizontal tangent? (c) Is that point a local max or local min of $f$? Justify using the sign of $f'$.
6.14 Sketch any continuous function $f$ whose derivative graph is the step function $f'(x) = 1$ for $x < 0$ and $f'(x) = -1$ for $x > 0$. What feature must $f$ have at $x = 0$, and is $f$ differentiable there?
Part D — Where Derivatives Fail (⭐⭐⭐)
6.15 For each function, find every point where it fails to be differentiable and classify the failure (corner, cusp, vertical tangent, or discontinuity), per §6.7: (a) $f(x) = |x^2 - 1|$ (b) $f(x) = x^{2/3}$ at $x = 0$ (c) $f(x) = x^{1/3}$ at $x = 0$ (d) $f(x) = \lfloor x \rfloor$ (greatest-integer function)
6.16 Show that $f(x) = |x - 3|$ is differentiable everywhere except $x = 3$. Give $f'(x)$ for $x > 3$ and for $x < 3$, and explain in terms of one-sided slopes why $f'(3)$ does not exist.
6.17 Consider $$f(x) = \begin{cases} x^2 & x \le 1, \\ 2x - 1 & x > 1. \end{cases}$$ (a) Is $f$ continuous at $x = 1$? (b) Compute the left-hand and right-hand slopes at $x = 1$. (c) Is $f$ differentiable at $x = 1$? This is a case where continuity holds but the graph could still have a corner — check carefully.
6.18 Using the theorem of §6.3 (differentiable $\Rightarrow$ continuous), explain why each of the following cannot be differentiable at the stated point, without any computation: (a) a function with a jump at $x = 0$; (b) $f(x) = 1/x$ at $x = 0$; (c) a function with a removable hole at $x = 5$.
6.19 The function $f(x) = x\sin(1/x)$ with $f(0) = 0$ is continuous at $0$. Is it differentiable at $0$? Examine $\dfrac{f(h) - f(0)}{h} = \sin(1/h)$ as $h \to 0$ and explain what goes wrong. Contrast with the $x^2\sin(1/x)$ example of §6.9.
Part E — Higher-Order Derivatives (⭐⭐⭐)
6.20 For $f(x) = x^5$, compute $f'$, $f''$, $f'''$, $f^{(4)}$, $f^{(5)}$, $f^{(6)}$. At which order does the derivative become identically zero, and why (§6.6)?
6.21 For $f(x) = e^{2x}$, conjecture a formula for $f^{(n)}(x)$. (Differentiate a few times to spot the pattern; Chapter 7 proves the rule.)
6.22 (Physics) A particle's position is $s(t) = t^3 - 6t^2 + 12t$ for $t \in [0, 5]$. (a) Find the velocity $v(t) = s'(t)$ and acceleration $a(t) = s''(t)$. (b) When is the velocity zero? (c) When is the acceleration zero? (d) Describe the motion in words, naming where the particle speeds up and slows down.
6.23 (Concavity) For $f(x) = x^3 - 3x$, find $f''(x)$, determine where $f$ is concave up and concave down, and locate the inflection point (§6.6, Interpretation 2).
6.24 Find a polynomial $f$ of degree exactly $3$ for which $f''(x) = 6x$ and $f'(0) = 2$ and $f(0) = 5$. (Work backward one derivative at a time.)
Part F — Applications Across Fields (⭐⭐⭐)
6.25 (Economics) A firm's total cost is $C(q) = 0.01q^2 + 5q + 200$ dollars to produce $q$ units. (a) Find the marginal cost $C'(q)$ (§6.5). (b) What is the approximate cost of the $51$st unit? (c) Is marginal cost increasing or decreasing, and what does the sign of $C''(q)$ tell you?
6.26 (Biology) A bacterial population is modeled by $P(t) = 100\,e^{0.4t}$ (thousands of cells, $t$ in hours). Using the catalog fact $\frac{d}{dx}e^x = e^x$ and the pattern you found in 6.21, find $P'(t)$. What is the instantaneous growth rate at $t = 0$ and at $t = 3$? Interpret.
6.27 (Engineering — jerk) An elevator's vertical position is $s(t)$. Explain in one paragraph why a comfortable ride limits the third derivative $s'''(t)$ (jerk), not merely the second (acceleration). Use the elevator application of §6.6.
6.28 (Medicine) A patient's blood pressure trace $B(t)$ has $B'(t) < 0$ and $B''(t) > 0$ over a one-minute window. Is the patient's pressure rising or falling? Is the fall accelerating or decelerating? What might a monitoring algorithm conclude?
6.29 (Data science) The squared-error loss for fitting a slope to two data points $(1, 3)$ and $(2, 5)$ is $L(m) = (3 - m)^2 + (5 - 2m)^2$. (a) Compute $L'(m)$. (b) Solve $L'(m) = 0$ for the best-fit slope. (c) Confirm $L''(m) > 0$, so the critical point is a minimum.
Part G — Gradient Descent (⭐⭐⭐)
6.30 Implement gradient descent in Python for $f(x) = x^2 - 6x + 10$, starting at $x_0 = 0$ with learning rate $\alpha = 0.1$ for $50$ steps. Where does it converge, and what is the analytical minimum (set $f'(x) = 0$)?
def f(x): return x**2 - 6*x + 10
def fprime(x): return 2*x - 6 # f'(x) = 0 => x = 3
x = 0.0
for _ in range(50):
x = x - 0.1 * fprime(x) # step against the slope (§6.8)
print(x) # should be near 3
6.31 Re-run 6.30 with a large learning rate $\alpha = 1.1$. Describe what happens to the iterates and explain it using the convergence condition $|1 - 2\alpha| < 1$ from §6.8.
6.32 Apply gradient descent to $f(x) = x^4 - 4x^2 + 5$ starting at $x_0 = 0.1$, then again at $x_0 = -0.1$. This function has two local minima; report which one each run finds and explain why the starting point decides the outcome.
6.33 By hand, perform three steps of gradient descent on $f(x) = (x - 5)^2$ starting at $x_0 = 0$ with $\alpha = 0.25$. Tabulate $x_n$, $f'(x_n)$, and $x_{n+1}$ as in the §6.8 worked example. To what value is the sequence heading?
Part H — Synthesis, Open-Ended, and Programming (⭐⭐⭐⭐)
6.34 Reflect on "differentiability is strictly stronger than continuity." Give one function that is continuous everywhere but differentiable nowhere (name it), one that is continuous everywhere but non-differentiable at exactly one point, and one that is differentiable everywhere but not continuously differentiable ($C^1$). Reference §6.3 and §6.9.
6.35 Many real functions have many local minima, and gradient descent converges only to a nearby one — not necessarily the global minimum. Describe at least two practical strategies to cope (e.g., random restarts, momentum, stochastic gradient descent, simulated annealing). Look up one and summarize it in three sentences.
6.36 Write a Python function numerical_derivative(f, a, h=1e-5) using the symmetric central difference $\dfrac{f(a+h) - f(a-h)}{2h}$ (§6.2 Computational Note). Test it on $f(x) = \sin x$ at $a = 1$ (exact answer $\cos 1 \approx 0.5403$), on $f(x) = x^3$ at $a = 2$ (exact $12$), and on $f(x) = e^x$ at $a = 0$ (exact $1$). Compare with the forward difference $\dfrac{f(a+h) - f(a)}{h}$ and report which is more accurate.
6.37 Using sympy, compute and verify the derivatives you found by hand in 6.5 and 6.7. Then plot $f(x) = x^3 - 6x^2 + 9x$, its derivative $f'(x) = 3x^2 - 12x + 9$, and its second derivative $f''(x) = 6x - 12$ on one set of axes for $x \in [-1, 5]$. Confirm visually that $f'$ crosses zero at the turning points of $f$ and that $f''$ crosses zero at the inflection point of $f$ (§6.4, §6.6).
import sympy as sp
x = sp.symbols('x')
f = x**3 - 6*x**2 + 9*x
print(sp.diff(f, x)) # f'(x)
print(sp.diff(f, x, 2)) # f''(x)
6.38 Implement gradient descent for $f(x) = \sum_{k=1}^{10}(x - k)^2$. (a) Show analytically that $f'(x) = 2\sum_{k=1}^{10}(x - k)$ and that the minimizer is the mean $x = 5.5$. (b) Confirm with gradient descent ($x_0 = 0$, $\alpha = 0.01$, a few hundred steps). (c) Add to Your Modeling Portfolio: identify the single free parameter in your track's model and write the squared-error loss you would minimize over it.
Tier Summary
| Tier | Problems | Count |
|---|---|---|
| ⭐ | 6.1–6.4 | 4 |
| ⭐⭐ | 6.5–6.14 | 10 |
| ⭐⭐⭐ | 6.15–6.33 | 19 |
| ⭐⭐⭐⭐ | 6.34–6.38 | 5 |
Total: 38 problems. Selected answers (6.5, 6.6, 6.16, 6.20, 6.22, 6.23, 6.25, 6.29, 6.30, 6.38) are in appendices/answers-to-selected.md.