Calculus I · Building a Function From Its Derivatives

Where this is heading

Three doors open from here, and you can already see through each.

The second-derivative test (Chapter 8). At a critical point, where f′(a)=0f'(a) = 0, the quadratic approximation collapses to f(x)≈f(a)+12f″(a)(x−a)2f(x) \approx f(a) + \tfrac12 f''(a)(x-a)^2 — a pure parabola. If f″(a)>0f''(a) > 0 it opens upward and aa is a minimum; if f″(a)<0f''(a) < 0 it opens downward and aa is a maximum. The whole second-derivative test is just reading the leading Taylor term at a critical point.

Convexity (Chapter 8). The error of the tangent-line approximation is R1=12f″(c)(x−a)2R_1 = \tfrac12 f''(c)(x-a)^2. When f″≥0f'' \ge 0, that remainder is never negative, so ff never dips below its tangent line — it stays above all of them. A function that stays above all its tangents is convex, and convex is exactly the condition under which gradient descent is guaranteed to find the true bottom. The inequality ex≥1+xe^x \ge 1+x you proved in Chapter 6 was this story’s first instance.

Newton’s quadratic convergence (Chapter 9). Newton’s method replaces ff with its tangent line T1T_1 and solves. The error it leaves behind is governed by the T1T_1 remainder, 12f″(c)(x−a)2\tfrac12 f''(c)(x-a)^2 — proportional to the square of how far off you were. That square is the reason Newton’s correct digits double each step.

A curve is a line, then a parabola, then a polynomial. Once you can choose how close, the rest of calculus is deciding how close you need.


Problems

Six tiers. Fluency and Practice are doing* — compute Taylor polynomials until the machine is automatic, then apply and estimate. Concept & counterexample and ◆ Diamond are thinking — the convergence subtleties and the proofs (the remainder is the real content). Teach it is teaching. Looking ahead opens Chapters 8 and 9. Do all of Fluency; the Concept tier here guards against the most common Taylor mistakes.*

Fluency — do these fast, until the machine is automatic

  1. Find the degree-2 Taylor polynomial at 00 for: (a) exe^x; (b) e2xe^{2x}; (c) e−xe^{-x}; (d) ex/3e^{x/3}.
  2. Write the first three nonzero terms at 00 for: (a) sin⁡x\sin x; (b) cos⁡x\cos x; (c) sin⁡(2x)\sin(2x); (d) cos⁡x2\cos\tfrac{x}{2}.
  3. Find the degree-3 Taylor polynomial at 00 for: (a) 11−x\tfrac{1}{1-x}; (b) 11+x\tfrac{1}{1+x}; (c) 11−2x\tfrac{1}{1-2x}. State the coefficient pattern in each.
  4. Write the degree-2 polynomial that matches each at 00 (compute f(0),f′(0),f″(0)f(0),f'(0),f''(0) first): (a) 1+x\sqrt{1+x}; (b) (1+x)1/3(1+x)^{1/3}; (c) ln⁡(1+x)\ln(1+x); (d) ln⁡(1−x)\ln(1-x).
  5. By substituting or multiplying known series, write the first three nonzero terms at 00 for: (a) 11+x2\tfrac{1}{1+x^2}; (b) ex2e^{x^2}; (c) xexx\,e^{x}.
  6. Compute f(k)(0)f^{(k)}(0) for k=0,1,2,3k=0,1,2,3 and write the coefficient ckc_k for: (a) exe^x; (b) cos⁡x\cos x.
  7. Estimate with the first few series terms, then compare to a calculator: (a) e0.2e^{0.2}; (b) cos⁡(0.1)\cos(0.1); (c) sin⁡(0.3)\sin(0.3); (d) 1.1\sqrt{1.1} via (1+x)1/2(1+x)^{1/2}.
  8. Taylor at a center other than 00, so (x−a)(x-a) powers matter: find the degree-2 Taylor polynomial of (a) exe^x at a=1a=1; (b) x\sqrt{x} at a=4a=4.

Practice — apply, estimate, and bound the error

  1. Find the general-term series of e−xe^{-x} at 00 and check it against exe^x’s with the signs flipped.
  2. Derive the geometric series as the Taylor series of 11−x\tfrac{1}{1-x} by computing f(k)(0)f^{(k)}(0), and state where the equality is valid.
  3. Find the first three nonzero terms of ln⁡(1+x)\ln(1+x), and explain in one line how the leading term explains the Chapter 1 fact ln⁡(1+t)t→1\tfrac{\ln(1+t)}{t}\to 1.
  4. Estimate e0.1e^{0.1} with T2T_2, then bound the error using |f‴|≤1.2|f'''|\le 1.2 on [0,0.1][0,0.1]. Confirm the true value falls inside your bound.
  5. Estimate cos⁡(0.2)\cos(0.2) with 1−x221 - \tfrac{x^2}{2}. Then bound the error using the next nonzero term x424\tfrac{x^4}{24}, and explain why — for an even function like cos\cos — the error jumps by two powers, not one.
  6. The arctangent series. Given ddxarctan⁡x=11+x2=1−x2+x4−⋯\tfrac{d}{dx}\arctan x = \tfrac{1}{1+x^2} = 1 - x^2 + x^4 - \cdots, find the first three nonzero terms of arctan⁡x\arctan x at 00 (each term is an antiderivative of one above; match arctan⁡0=0\arctan 0 = 0). Set x=1x=1 to glimpse π4=1−13+15−⋯\tfrac{\pi}{4} = 1 - \tfrac13 + \tfrac15 - \cdots.
  7. Find the first three terms of the binomial series for (1+x)1/2(1+x)^{1/2} and (1+x)−1(1+x)^{-1}, and check the second against the geometric series.
  8. Multiply series: find the first three nonzero terms of excos⁡xe^x\cos x by multiplying the two series. (Notice which power drops out.)
  9. The Gaussian. By substituting −x2-x^2 into the series for eue^u, find the first three nonzero terms of e−x2e^{-x^2} — the bell curve at the heart of probability and machine learning. Is it an even or odd function, and where is it largest?
  10. (Notebook) Plot sin⁡x\sin x with its 11-, 33-, 55-, and 77-term Taylor polynomials on [−2π,2π][-2\pi, 2\pi], and describe how many humps each captures before peeling off.

Concept & counterexample — think; true/false with justification, or build the example

    1. TnT_n matches ff and its first nn derivatives at the center. (b) A larger nn always gives a better approximation at every xx. (c) The Taylor series of a polynomial is itself. (d) If two functions share the same Taylor polynomial of every degree at aa, they’re equal. (Part (d) is subtle — see problem 31.)
  1. Find the error. A student writes: “11−x=1+x+x2+⋯\tfrac{1}{1-x} = 1 + x + x^2 + \cdots, so at x=2x = 2, −1=1+2+4+⋯\;-1 = 1 + 2 + 4 + \cdots.” Identify the precise mistake.
  2. Explain why sin⁡x\sin x’s series has only odd powers and cos⁡x\cos x’s has only even powers, by connecting each to the function’s symmetry.
  3. Construct a function whose degree-1 Taylor approximation at 00 is exactly 1+3x1 + 3x, then a different one with the same approximation. What do all such functions share, and where do they differ?
  4. In one or two sentences, explain why the factorial appears, by reference to what kk derivatives do to (x−a)k(x-a)^k.
  5. Is it possible? A function whose tangent-line error shrinks like (x−a)2(x-a)^2, and another whose error shrinks only like |x−a||x-a|. What property separates them?
  6. The series for ln⁡(1+x)\ln(1+x) is x−x22+⋯x - \tfrac{x^2}{2} + \cdots. Without computing the radius of convergence formally, predict the value of xx at which it must start to fail, and why. (Where does ln⁡(1+x)\ln(1+x) itself misbehave?)

◆ Diamond — the remainder, and the deep identities, are the real content

  1. ◆ Derive the coefficient formula: for P(x)=∑ck(x−a)kP(x)=\sum c_k(x-a)^k, show P(k)(a)=k!ckP^{(k)}(a)=k!\,c_k, hence ck=f(k)(a)k!c_k=\tfrac{f^{(k)}(a)}{k!}. (The “everything but one term dies” argument.)
  2. ◆ Prove the quadratic Taylor polynomial is the unique parabola matching ff’s value, slope, and curvature at aa.
  3. ◆ Show the n=0n=0 case of Taylor’s remainder is exactly the Mean Value Theorem, and the n=1n=1 case is the second-order MVT from Chapter 6.
  4. ◆ Prove cos⁡x\cos x is an even function and sin⁡x\sin x an odd function directly from their series (every power even, resp. odd).
  5. ◆◆ Derive Euler’s formula eix=cos⁡x+isin⁡xe^{ix}=\cos x + i\sin x by substituting x→ixx\to ix into exe^x’s series, using i2=−1i^2=-1 to sort the terms into real and imaginary groups. Then set x=πx=\pi to obtain eiπ=−1e^{i\pi}=-1.
  6. ◆◆ Prove Taylor’s theorem with Lagrange remainder by the auxiliary-function method: fix xx, choose MM with f(x)=Tn(x)+M(x−a)n+1f(x)=T_n(x)+M(x-a)^{n+1}, define g(t)=f(x)−∑k=0nf(k)(t)k!(x−t)k−M(x−t)n+1g(t)=f(x)-\sum_{k=0}^n\tfrac{f^{(k)}(t)}{k!}(x-t)^k-M(x-t)^{n+1}, show g(a)=g(x)=0g(a)=g(x)=0, apply Rolle, and finish via the telescoping derivative.
  7. ◆◆ Prove sin⁡x\sin x’s Taylor series converges to sin⁡x\sin x for every xx, using |f(n+1)|≤1|f^{(n+1)}|\le 1 to bound |Rn(x)|≤|x|n+1(n+1)!→0|R_n(x)|\le\tfrac{|x|^{n+1}}{(n+1)!}\to 0. Note why this is cleaner than the exe^x case.
  8. ◆◆ The famous warning. Let f(x)=e−1/x2f(x)=e^{-1/x^2} for x≠0x\ne0, f(0)=0f(0)=0; accept that f(k)(0)=0f^{(k)}(0)=0 for all kk. Write its Taylor series at 00, note it converges everywhere but not to ff, and explain what this proves about 19(d).

Teach it — explain it, write it up, or fix it

  1. In three or four sentences to a friend, teach “the derivative is the best linear approximation,” and how Taylor extends it to the best quadratic, cubic, and beyond.
  2. Debug your classmate. They write: “ex=1+x+x2+x3+⋯e^x = 1 + x + x^2 + x^3 + \cdots, since every derivative of exe^x is exe^x.” Pinpoint the missing ingredient and give the correct series, with a one-line reason for the 1k!\tfrac1{k!}.
  3. Write a complete worked solution estimating ln⁡(1.1)\ln(1.1) from a Taylor polynomial of ln⁡(1+x)\ln(1+x), with an error bound, narrated so a peer could redo it for ln⁡(1.2)\ln(1.2).
  4. Design a problem. Choose a function (try a trig one) and a center aa, and write a problem asking for its degree-2 (or first three nonzero) Taylor terms, with a clean key.
  5. In a few sentences, teach Euler’s formula to someone who knows the three series but has never seen them combined — what single substitution does all the work, and why is the result surprising?
  6. In a few sentences, teach the difference between a Taylor polynomial (finite, carrying a remainder) and a Taylor series (infinite, equal to the function only where it converges and the remainder vanishes).

Looking ahead — Chapters 8 and 9 in your hands early

  1. At a critical point (f′(a)=0f'(a)=0), the quadratic approximation is f(x)≈f(a)+12f″(a)(x−a)2f(x)\approx f(a)+\tfrac12 f''(a)(x-a)^2. Predict: f″(a)>0f''(a)>0 — min or max? f″(a)<0f''(a)<0? (You’ve derived the second-derivative test.)
  2. The tangent-line error is R1=12f″(c)(x−a)2R_1=\tfrac12 f''(c)(x-a)^2. Predict the sign condition on f″f'' that makes R1≥0R_1\ge0 always — i.e., makes ff stay above all its tangents. (That’s convexity, Chapter 8.)
  3. Newton’s method (Chapter 9) replaces ff by its tangent line and solves. Using the T1T_1 remainder, predict why the error after a Newton step is proportional to the square of the error before.
  4. In problem 17 you found the series of the Gaussian e−x2e^{-x^2}. Its cousin e−x2/2e^{-x^2/2} is the bell curve of probability (Book 4). From the series, predict its symmetry and its single maximum — and notice you now understand the most important curve in statistics as nothing but a reshuffled exponential.

Questions to talk about

No answer key. These are for arguing over, with someone who read the same chapter.

  1. A function is — almost — nothing more than its derivatives at a single point, reassembled. What is doing the work in that 'almost'?
  2. The remainder term is described as honest accounting of the error. Why does an approximation become far more useful once you know how wrong it is?
  3. The Taylor series of e to the x falls out as inevitable precisely because e to the x is its own derivative. Trace that: why does the self-slope property force those particular coefficients?

All 12 chapters of Calculus I · Foundations · All courses