Intuition What this page is
The parent note told you how to build a Taylor polynomial. This page stress-tests that machinery against every situation it can face: nice functions and nasty ones, expanding at zero and away from zero, points inside the safe zone and outside it, a physics word problem, and an exam trap. If a scenario exists, it appears in the matrix below and gets a fully worked example.
Recall Quick reminder: what does
n ! (factorial) mean?
n ! means "multiply all whole numbers from 1 up to n ": 3 ! = 1 ⋅ 2 ⋅ 3 = 6 , 4 ! = 24 , 5 ! = 120 . By convention 0 ! = 1 . It shows up in every Taylor coefficient because differentiating ( x − a ) n exactly n times spits out n ⋅ ( n − 1 ) ⋯ 1 = n ! , and we divide by it to cancel that factor.
4 ! = ::: 24
0 ! = ::: 1 (by convention)
Every Taylor problem lives in one of these case classes . Each row is a distinct thing that can go right or wrong; the last column says which worked example nails it.
#
Case class
What makes it special
Example
C1
Expand at a = 0 , converges everywhere
all derivatives finite, series = function for all x
Ex 1 (cos x )
C2
Expand at a = 0
must re-anchor derivatives at the new point
Ex 2 (ln x at a = 1 )
C3
Inside radius of convergence
series truly rebuilds f
Ex 3 (geometric, x = 0.5 )
C4
Outside radius — series diverges
function is fine, series explodes
Ex 3 (same, x = 2 )
C5
Degenerate / pathological
all derivatives = 0 but f = 0
Ex 4 (e − 1/ x 2 )
C6
Error estimate (remainder bound)
how many terms for target accuracy
Ex 5 (e x to 3 decimals)
C7
Real-world word problem
physical quantity + units
Ex 6 (pendulum period)
C8
Multivariable / ML core
gradient + Hessian, matrix step
Ex 7 (Newton step on a quadratic)
C9
Exam-style twist
reuse a known series cleverly instead of grinding derivatives
Ex 8 (lim via series)
Prerequisites you may want open: Derivatives and gradients , Approximation error and Big-O , Hessian matrix , Convex functions .
Worked example Maclaurin series of
cos x , and estimate cos ( 0.3 )
Forecast: guess — will the series have only even powers, only odd, or both? And is cos ( 0.3 ) closer to 0.955 or 0.85 ?
Step 1 — List the derivative cycle at a = 0 .
cos , − sin , − cos , sin , cos , … evaluated at 0 give 1 , 0 , − 1 , 0 , 1 , …
Why this step? The Taylor coefficient is f ( n ) ( 0 ) / n ! , so we literally need each derivative's value at 0 — nothing else feeds the formula.
Step 2 — Kill the zero terms.
Every odd derivative is ± sin 0 = 0 , so only even powers survive:
cos x = 1 − 2 ! x 2 + 4 ! x 4 − 6 ! x 6 + …
Why this step? A term with a zero coefficient contributes nothing; dropping them shows why cos is built from even powers only (it's an even function — cos ( − x ) = cos x ).
Step 3 — Plug in x = 0.3 , first two terms.
1 − 2 0. 3 2 = 1 − 2 0.09 = 1 − 0.045 = 0.955.
Why this step? Near 0 , x 4 /24 = 0.0034/24 ≈ 0.00003 is tiny, so two terms already nail 4 decimals.
Verify: true cos ( 0.3 ) = 0.955336... ; our 0.955 matches to 3 decimals. ✓ (This is C1 : valid for every x , we just chose a small one.)
Worked example Taylor series of
ln x around a = 1 , and approximate ln ( 1.1 )
Forecast: why can't we use a = 0 here? (Look at ln 0 .)
Step 1 — Explain the anchor choice.
ln 0 = − ∞ : the function isn't even defined at 0 , so a Maclaurin (a = 0 ) series is impossible. We anchor at a = 1 where ln 1 = 0 is clean.
Why this step? Rule: expand near where you'll evaluate, and where f and its derivatives exist. Here we evaluate at 1.1 , close to 1 .
Step 2 — Derivatives at a = 1 .
f = ln x , f ′ = 1/ x , f ′′ = − 1/ x 2 , f ′′′ = 2/ x 3 , f ( 4 ) = − 6/ x 4 . At x = 1 : 0 , 1 , − 1 , 2 , − 6 .
Why this step? These plug straight into f ( n ) ( 1 ) / n ! .
Step 3 — Deduce the general coefficient (don't just guess it).
Differentiating 1/ x repeatedly gives f ( n ) ( x ) = ( − 1 ) n − 1 ( n − 1 )! x − n for n ≥ 1 , so at x = 1 : f ( n ) ( 1 ) = ( − 1 ) n − 1 ( n − 1 )! . The Taylor coefficient is therefore
c n = n ! f ( n ) ( 1 ) = n ! ( − 1 ) n − 1 ( n − 1 )! = n ( − 1 ) n − 1 .
Why this step? This is where the alternating sign ( − 1 ) n − 1 and the 1/ n come from — the ( n − 1 )! from repeated differentiation cancels almost all of the n ! , leaving just 1/ n . Now the pattern is derived , not inferred. Check: c 1 = 1 , c 2 = − 2 1 , c 3 = + 3 1 , c 4 = − 4 1 — matching Step 2's raw derivatives.
Step 4 — Assemble in powers of ( x − 1 ) .
ln x = ( x − 1 ) − 2 ( x − 1 ) 2 + 3 ( x − 1 ) 3 − 4 ( x − 1 ) 4 + ⋯ = ∑ n = 1 ∞ n ( − 1 ) n − 1 ( x − 1 ) n .
Why this step? Because we anchored at 1 , the natural variable is ( x − 1 ) (distance from the anchor), not x .
Step 5 — State the radius of convergence.
This series only equals ln x for ∣ x − 1∣ < 1 , i.e. 0 < x < 2 . Beyond x = 2 the series diverges even though ln x stays finite.
Why this step? The nearest "trouble spot" of ln x is x = 0 (where ln blows up), a distance 1 from the anchor a = 1 — and that distance is the radius. Naming it tells the reader how far from 1 they're allowed to trust the formula (our target 1.1 is comfortably inside).
Step 6 — Evaluate at x = 1.1 , so ( x − 1 ) = 0.1 .
0.1 − 2 0.01 + 3 0.001 = 0.1 − 0.005 + 0.000333 = 0.095333.
Why this step? With ∣ x − 1∣ = 0.1 well inside the radius of 1 , three terms already give strong accuracy; each higher power of 0.1 shrinks fast.
Verify: true ln ( 1.1 ) = 0.0953102... ; our 0.095333 is right to 4 decimals. ✓
This one example shows both the safe and the broken case, because they use the same series.
Intuition What the figure shows
The solid black curve is the true function f ( x ) = 1/ ( 1 − x ) , drawn in two pieces because it blows up at x = 1 . The two vertical red dashed lines at x = − 1 and x = + 1 are the edges of the radius of convergence, and the pale red band between them is the "safe zone" where the series equals f . One black dot sits at x = 0.5 inside the band (partial sums climb toward f = 2 ); another sits at x = 2 outside it, where a red arrow highlights the clash — the series runs off to + ∞ while f is only − 1 .
Worked example Geometric series
1 − x 1 = 1 + x + x 2 + … at x = 0.5 (inside) and x = 2 (outside)
Forecast: the function 1/ ( 1 − x ) is perfectly finite at x = 2 (it equals − 1 ). Will its series also give − 1 ? Guess yes/no before reading.
Step 1 — Radius of convergence.
The ratio of consecutive terms is x ; the sum only settles when ∣ x ∣ < 1 . So the radius is 1 — see the red dashed boundary in the figure above, with the safe zone shaded red.
Why this step? A geometric sum ∑ x n converges iff ∣ x ∣ < 1 ; outside that the partial sums blow up regardless of what f does.
Step 2 — Inside (C3): x = 0.5 .
Partial sums: 1 , 1.5 , 1.75 , 1.875 , 1.9375 , ⋯ → 2 .
True value 1/ ( 1 − 0.5 ) = 2 . ✓ The series rebuilds the function — this is the black dot inside the red band in the figure, climbing toward f .
Why this step? We pick a point strictly inside the radius to see convergence actually happen: each added term halves the remaining gap to 2 .
Step 3 — Outside (C4): x = 2 .
Partial sums: 1 , 3 , 7 , 15 , 31 , ⋯ → + ∞ .
But true value 1/ ( 1 − 2 ) = − 1 . The series diverges to + ∞ while the function sits calmly at − 1 (the red arrow in the figure points to this clash).
Why this step? This is the headline warning from the parent note made concrete: Taylor is local . Beyond the radius the series says nothing.
Verify: at x = 0.5 , 5 terms give 1.9375 (heading to 2 ✓); at x = 2 , 5 terms give 31 while f = − 1 ✗-by-design. Both confirmed. See Approximation error and Big-O .
f ( x ) = e − 1/ x 2 with f ( 0 ) = 0 — a smooth function whose Taylor series is wrong
Forecast: if I compute the Maclaurin series of this function, what do I get? (Trick: think about how fast e − 1/ x 2 → 0 .)
Step 1 — Behaviour near 0 .
As x → 0 , 1/ x 2 → + ∞ , so e − 1/ x 2 → e − ∞ = 0 — and it does so faster than any power of x .
Why this step? This "flatter than every polynomial" behaviour is exactly what makes derivatives vanish.
Step 2 — Every derivative at 0 is 0 .
Each derivative is (polynomial in 1/ x ) × e − 1/ x 2 ; the exponential crushes the polynomial, giving limit 0 . So f ( n ) ( 0 ) = 0 for all n .
Why this step? The Taylor coefficient f ( n ) ( 0 ) / n ! is therefore 0 for every n .
Step 3 — The verdict.
Maclaurin series = 0 + 0 ⋅ x + 0 ⋅ x 2 + ⋯ = 0.
Yet f ( 0.5 ) = e − 4 ≈ 0.0183 = 0 .
Why this step? The series says "f is identically zero"; the function disagrees everywhere but 0 . Smoothness does NOT guarantee series = function (case C5).
Verify: f ( 0.5 ) = e − 1/0.25 = e − 4 = 0.018316... while its series gives 0 . Mismatch confirmed. ✓
Worked example Approximate
e 0.5 to within 1 0 − 3 using the remainder bound
Forecast: guess how many terms — 3, 4, or 6?
Step 1 — Recall the Lagrange remainder.
R k = ( k + 1 )! f ( k + 1 ) ( ξ ) x k + 1 , ξ ∈ ( 0 , x ) .
For e x , f ( k + 1 ) = e ξ , and on [ 0 , 0.5 ] we have e ξ ≤ e 0.5 < 2 .
Why this step? We bound the unknown ξ by the largest possible value so the error estimate is a guarantee, not a guess. See Approximation error and Big-O .
Step 2 — Bound the error at x = 0.5 .
∣ R k ∣ ≤ ( k + 1 )! 2 ⋅ 0. 5 k + 1 .
Why this step? Plugging the worst-case e ξ < 2 turns a mystery into a computable ceiling.
Step 3 — Find smallest k with ∣ R k ∣ < 1 0 − 3 .
k = 3 : 4 ! 2 ⋅ 0. 5 4 = 24 2 ⋅ 0.0625 = 0.00521 — too big.
k = 4 : 5 ! 2 ⋅ 0. 5 5 = 120 2 ⋅ 0.03125 = 0.000521 — under 1 0 − 3 . ✓
So we need terms up to n = 4 (order-4 polynomial, 5 terms ).
Why this step? We test k upward and stop at the first one that clears the target, because using more terms than needed wastes work — the smallest sufficient k is the answer the question asks for.
Step 4 — Compute the estimate.
1 + 0.5 + 2 0.25 + 6 0.125 + 24 0.0625 = 1 + 0.5 + 0.125 + 0.020833 + 0.002604 = 1.648437.
Why this step? Now that Step 3 guarantees the truncation error is below 1 0 − 3 , we actually sum those 5 terms to produce the number — the bound told us how many , this step delivers the value .
Verify: true e 0.5 = 1.648721... ; error = 0.000284 < 1 0 − 3 . ✓ Bound respected.
Intuition What the figure shows
The solid black curve is the exact sin ψ over small angles; the red dashed straight line is the small-angle approximation ψ (a 4 5 ∘ line). They hug tightly near the origin and slowly peel apart. At ψ = 0.1 a short red vertical segment marks the gap between the two curves — that gap is exactly the dropped Taylor term ψ 3 /6 , with a labelled arrow pointing to it.
Worked example Pendulum period for a small swing
A pendulum of length L = 1 m swinging with amplitude θ 0 has period
T = 4 g L ∫ 0 π /2 1 − s i n 2 ( θ 0 /2 ) s i n 2 ϕ d ϕ ,
where g = 9.81 m/s 2 is the acceleration due to gravity. The messy integral hides a factor sin ( θ 0 /2 ) ; physicists approximate using sin ψ ≈ ψ for small angles to collapse it to the familiar T ≈ 2 π L / g . Justify this small-angle move with Taylor and estimate its error at θ 0 = 0.2 rad (≈ 11. 5 ∘ ), so ψ = θ 0 /2 = 0.1 rad .
Forecast: guess the relative error of sin ψ ≈ ψ at ψ = 0.1 : about 0.02% , 0.2% , or 2% ?
Step 1 — The relevant series.
sin ψ = ψ − 6 ψ 3 + … Here ψ = θ 0 /2 = 0.1 rad . In the figure above, the black curve is the exact sin ψ and the red dashed line is the approximation ψ .
Why this step? The small-angle rule is the first Taylor term; the dropped ψ 3 /6 is the error — the vertical red gap in the figure.
Step 2 — Size the dropped term.
6 ψ 3 = 6 0. 1 3 = 6 0.001 = 0.0001 6 .
Why this step? This absolute error (in radians) tells us how far the straight red line overshoots the true sin curve at ψ = 0.1 .
Step 3 — Relative error.
ψ ψ 3 /6 = 6 ψ 2 = 6 0.01 = 0.001 6 = 0.167%.
Why this step? Relative error is dimensionless — the radians cancel top and bottom — so it directly answers the forecast and tells the engineer the approximation is safe at this amplitude regardless of unit choice.
Verify: sin ( 0.1 ) = 0.0998334... , and ψ = 0.1 , so relative error = 0.0998334 0.1 − 0.0998334 = 0.001668 = 0.167% . ✓ Matches the ψ 2 /6 prediction — closest to 0.2% . (Units sanity: L / g has units m / ( m/s 2 ) = s 2 = s , so T is in seconds as a period must be.)
Worked example One Newton step lands exactly on the minimum of a quadratic
Let L ( θ ) = θ 1 2 + 2 θ 2 2 − 2 θ 1 − 8 θ 2 + 9 , starting at θ 0 = ( 0 , 0 ) . Write Δ for the step we take — the vector we add to θ 0 to get the next point, i.e. the change in θ .
Forecast: for a pure quadratic, how many Newton steps to reach the minimum — 1, 5, or "depends"?
Step 1 — Gradient at θ 0 .
∇ L = ( 2 θ 1 − 2 , 4 θ 2 − 8 ) . At ( 0 , 0 ) : ∇ L ( θ 0 ) = ( − 2 , − 8 ) .
Why this step? The 1st-order Taylor term needs the gradient — the direction of steepest ascent. See Derivatives and gradients .
Step 2 — Hessian (curvature).
H = ( 2 0 0 4 ) , H − 1 = ( 2 1 0 0 4 1 ) .
Why this step? The 2nd-order Taylor term 2 1 Δ ⊤ H Δ — where Δ is the step defined above — is the parabola we fit; H is its curvature. Since H ⪰ 0 , L is convex . See Hessian matrix .
Step 3 — Newton step.
Δ = − H − 1 ∇ L = − ( 2 1 0 0 4 1 ) ( − 2 − 8 ) = ( 1 2 ) .
New point: θ 1 = ( 0 , 0 ) + ( 1 , 2 ) = ( 1 , 2 ) .
Why this step? Newton minimizes the exact 2nd-order Taylor model. For a genuine quadratic the model is the function, so one step is exact. See Newton's Method .
Verify: minimize directly — ∂ L / ∂ θ 1 = 2 θ 1 − 2 = 0 ⇒ θ 1 = 1 ; ∂ L / ∂ θ 2 = 4 θ 2 − 8 = 0 ⇒ θ 2 = 2 . Minimum at ( 1 , 2 ) , exactly where Newton landed. ✓ Answer to forecast: 1 step .
x → 0 lim x 2 1 − cos x using series
Forecast: guess the limit — 0 , 2 1 , or 1 ? (Both top and bottom go to 0 .)
Step 1 — Substitute the known cos series.
From Example 1, cos x = 1 − 2 x 2 + 24 x 4 − … , so
1 − cos x = 1 − ( 1 − 2 x 2 + 24 x 4 − … ) = 2 x 2 − 24 x 4 + …
Why this step? The exam trap is to grind L'Hôpital twice; reusing the Maclaurin series is faster and shows why the answer appears. The two 1 's cancel, leaving a series that starts at x 2 .
Step 2 — Divide by x 2 .
x 2 1 − c o s x = x 2 2 x 2 − 24 x 4 + … = 2 1 − 24 x 2 + …
Why this step? Dividing the leading x 2 term reveals a constant 2 1 plus terms that each still carry a positive power of x .
Step 3 — Take x → 0 .
As x → 0 every remaining term (− x 2 /24 , and higher) vanishes, leaving just the constant:
lim x → 0 x 2 1 − c o s x = 2 1 .
Why this step? Once the expression is a clean power series 2 1 − 24 x 2 + … , the 0/0 form is gone — taking the limit is just reading off the constant term, which is the whole payoff of the series trick.
Verify: at x = 0.01 , 0.0001 1 − cos ( 0.01 ) = 1 0 − 4 4.99996 × 1 0 − 5 = 0.499996 ≈ 0.5 . ✓
Recall Which case did each example hit?
Ex1 covers ::: C1 (converges everywhere)
Ex2 covers ::: C2 (anchor at a = 0 )
Ex3 covers ::: C3 and C4 (inside vs outside radius)
Ex4 covers ::: C5 (pathological, series = function)
Ex5 covers ::: C6 (remainder / accuracy count)
Ex6 covers ::: C7 (word problem with units)
Ex7 covers ::: C8 (multivariable Newton step)
Ex8 covers ::: C9 (exam twist via known series)
"Anchor near, count your error, mind the radius." Every failure on this page came from breaking one of those three — expanding at the wrong a , using too few terms, or stepping outside the safe circle.