Skip to content
Tutorials Center
My learning

Topics

Lesson 34 of 37 · Projects and Practice

Practice: Continuity and Differentiation

A practice set on epsilon-delta proofs, the IVT, uniform continuity, the mean value theorem and Taylor bounds, with worked solutions and code to check your answers.

Analysis is learned by writing proofs. This practice set gives you ten problems from chapters 5 and 6. Try each one on paper first: write the claim, find the idea, then write the proof. Solutions follow each group so you can compare, and the code blocks let you test numerical claims before you trust them. Remember that code can refute a wrong guess but never prove a theorem.

Part A: Continuity

A1. Prove from the ε-δ definition that f(x) = 3x + 2 is continuous at every a.

A2. Prove that f(x) = 1/x is continuous at a = 2 by finding δ as a function of ε.

A3. Show f(x) = x sin(1/x) (with f(0) = 0) is continuous at 0, but g(x) = sin(1/x) (with g(0) = 0) is not.

A4. Prove that x³ - 3x + 1 = 0 has a root in (0, 1) and in (1, 2).

A5. Is f(x) = x³ uniformly continuous on ℝ? On [0, 5]?

Solutions A

A1. |f(x) - f(a)| = 3|x - a|, so for ε > 0 take δ = ε/3.

A2. Scratch: |1/x - 1/2| = |x - 2|/(2|x|). If |x - 2| < 1 then x > 1, so 1/(2|x|) < 1/2, giving |1/x - 1/2| < |x - 2|/2. Take δ = min(1, 2ε). Then |x - 2| < δ gives |1/x - 1/2| < δ/2 ≤ ε.

A3. |x sin(1/x)| ≤ |x|, so δ = ε works. For g, the sequences 1/(π/2 + 2πn) and 1/(3π/2 + 2πn) tend to 0 but g takes values 1 and -1 along them (see epsilon-delta continuity).

A4. Let p(x) = x³ - 3x + 1. Then p(0) = 1 > 0, p(1) = -1 < 0, p(2) = 3 > 0. p is continuous, so the IVT gives a root in (0, 1) and another in (1, 2).

A5. Not uniformly continuous on ℝ: take xₙ = n and yₙ = n + 1/n; yₙ³ - xₙ³ = 3n + 3/n + 1/n³ ≥ 3, while |xₙ - yₙ| → 0. On [0, 5] it is uniformly continuous by Heine-Cantor (see uniform continuity).

Python Check the roots of x^3 - 3x + 1 and the failure of uniform continuity

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Part B: Differentiation

B1. Using the definition, find f'(0) for f(x) = x|x|.

B2. Let f be differentiable with f'(x) = 0 for all x ∈ (a, b). Prove f is constant on (a, b).

B3. Prove that |sin x - sin y| ≤ |x - y| and |arctan x - arctan y| ≤ |x - y|.

B4. Show that eˣ > 1 + x for every real x ≠ 0.

B5. Use Taylor's theorem to show |cos x - (1 - x²/2)| ≤ x⁴/24 for all real x.

Solutions B

B1. f(h)/h = |h|, which tends to 0. So f'(0) = 0. (Interesting: f' (x) = 2|x| everywhere, which is continuous.)

B2. For x < y in (a, b), the MVT gives c with f(y) - f(x) = f'(c)(y - x) = 0.

B3. MVT: sin x - sin y = cos(c)(x - y) with |cos c| ≤ 1. For arctan: arctan' = 1/(1 + t²) ≤ 1.

B4. Let g(x) = eˣ - 1 - x. Then g(0) = 0 and g'(x) = eˣ - 1, which is positive for x > 0 and negative for x < 0. So g is strictly increasing on [0, ∞) and strictly decreasing on (-∞, 0], giving g(x) > 0 for x ≠ 0.

B5. Taylor of cos at 0 of degree 3 (the polynomial 1 - x²/2, the cubic term is zero) has remainder cos⁗(ξ) x⁴/4! , and |cos⁗| = |cos| ≤ 1.

Python Numerical sanity checks for B3 to B5

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Strategies worth remembering

  • Find δ backwards. Start from |f(x) - f(a)|, factor out |x - a|, and bound what remains by restricting δ ≤ 1.
  • Disprove with sequences. For "not continuous", "not uniformly continuous" or "limit does not exist", two sequences usually do it.
  • Reach for the MVT whenever a statement compares f(y) - f(x) with f'.
  • Check hypotheses. Closed interval? Differentiable at every interior point? A counterexample often comes from violating exactly one.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. For f(x) = 1/x at a = 2, which delta works for a given epsilon?

    Requiring |x - 2| < 1 gives 1/(2|x|) < 1/2, so |1/x - 1/2| < |x - 2|/2, and delta = min(1, 2 epsilon) keeps it below epsilon.
  2. 2. What does the proof that x^3 - 3x + 1 has a root in (0, 1) use?

    p(0) = 1 and p(1) = -1, and p is continuous.
  3. 3. Which tool proves exp(x) > 1 + x for x not 0?

    g(x) = e^x - 1 - x has g(0) = 0 and g' changes sign at 0, so 0 is a strict global minimum.
  4. 4. For f(x) = x|x|, f'(0) equals:

    The difference quotient is |h|, which tends to 0.

Summary

  • ε-δ proofs: find δ backwards, cap it, then write the clean forward argument.
  • Roots: sign change plus IVT; uniform continuity fails when slopes grow without bound.
  • Derivative inequalities: MVT, monotonicity from f', and Taylor remainder bounds.
  • Use code to test claims, never as a replacement for the proof.

Next: Practice: Integration and Sequences of Functions