🎯 Taylor and Maclaurin Series
Taylor Polynomials Review
For a function f with derivatives at x=a:
Taylor polynomial of degree n:
Pn(x)=f(a)+f′(a)(x−a)+2!f′′(a)(x−a)2+⋯+n!f(n)(a)(x−a)n
=∑k=0nk!f(k)(a)(x−a)k
This is a finite polynomial that approximates f near x=a.
Taylor Series (Infinite!)
If we let n→∞, we get the Taylor series:
f(x)=∑n=0∞n!f(n)(a)(x−a)n
=f(a)+f′(a)(x−a)+2!f′′(a)(x−a)2+3!f′′′(a)(x−a)3+⋯
💡 Key Idea: Taylor series is the "best" power series representation of f centered at a!
Maclaurin Series (Special Case)
When a=0, we get a Maclaurin series:
f(x)=∑n=0∞n!f(n)(0)xn
=f(0)+f′(0)x+2!f′′(0)x2+3!f′′′(0)x3+⋯
Most common Taylor series are Maclaurin series!
Finding Taylor Series - The Recipe
Step 1: Find derivatives f′(x),f′′(x),f′′′(x),…
Step 2: Evaluate at center: f(a),f′(a),f′′(a),…
Step 3: Look for pattern in derivatives
Step 4: Write general term n!f(n)(a)(x−a)n
Step 5: Sum from n=0 to ∞
Example 1: Maclaurin Series for ex
Step 1: Find derivatives
f(x)=ex,f′(x)=ex,f′′(x)=ex,…
All derivatives are ex!
Step 2: Evaluate at a=0
f(0)=e0=1
f′(0)=1
f′′(0)=1
f(n)(0)=1 for all n
Step 3: Write Taylor series
ex=∑n=0∞n!1xn=1+x+2!x2+3!x3+4!x4+⋯
Converges for all x! (radius R=∞)
Example 2: Maclaurin Series for sinx
Step 1: Find derivatives
f(x)=sinx
f′(x)=cosx
f′′(x)=−sinx
f′′′(x)=−cosx
f(4)(x)=sinx (pattern repeats!)
Step 2: Evaluate at x=0
f(0)=sin0=0
f′(0)=cos0=1
f′′(0)=−sin0=0
f′′′(0)=−cos0=−1
f(4)(0)=sin0=0
f(5)(0)=cos0=1
Pattern: 0,1,0,−1,0,1,0,−1,…
Step 3: Only odd powers survive!
sinx=x−3!x3+5!x5−7!x7+⋯
=∑n=0∞(2n+1)!(−1)nx2n+1
Converges for all x!
Example 3: Maclaurin Series for cosx
Pattern in derivatives at x=0:
f(0)=1,f′(0)=0,f′′(0)=−1,f′′′(0)=0,f(4)(0)=1
Pattern: 1,0,−1,0,1,0,−1,0,…
Only even powers!
cosx=1−2!x2+4!x4−6!x6+⋯
=∑n=0∞(2n)!(−1)nx2n
Converges for all x!
Example 4: Taylor Series for lnx centered at a=1
Step 1: Find derivatives
f(x)=lnx
f′(x)=x1=x−1
f′′(x)=−x−2
f′′′(x)=2x−3
f(4)(x)=−6x−4=−3!x−4
f(n)(x)=xn(−1)n−1(n−1)! for n≥1
Step 2: Evaluate at x=1
f(1)=ln1=0
f′(1)=1
f′′(1)=−1
f′′′(1)=2
f(n)(1)=(−1)n−1(n−1)! for n≥1
Step 3: Write Taylor series
lnx=∑n=1∞n!(−1)n−1(n−1)!(x−1)n
=∑n=1∞n(−1)n−1(x−1)n
=(x−1)−2(x−1)2+3(x−1)3−4(x−1)4+⋯
Converges for 0<x≤2 (interval: (0,2])
Relationship Between sinx and cosx
Notice:
dxd[sinx]=cosx
Differentiate the series for sinx:
dxd[x−3!x3+5!x5−⋯]
=1−3!3x2+5!5x4−⋯
=1−2!x2+4!x4−⋯=cosx ✓
Series confirm calculus relationships!
Using Known Series (Smart Way!)
Instead of computing all derivatives, use:
- Substitution
- Differentiation/Integration
- Algebraic manipulation
Example 5: Find Series for e−x2
Start with: ex=∑n=0∞n!xn
Substitute x→−x2:
e−x2=∑n=0∞n!(−x2)n=∑n=0∞n!(−1)nx2n
=1−x2+2!x4−3!x6+4!x8−⋯
Much easier than computing derivatives!
Example 6: Find Series for xsinx
Start with: sinx=∑n=0∞(2n+1)!(−1)nx2n+1
Multiply by x:
xsinx=x⋅∑n=0∞(2n+1)!(−1)nx2n+1
=∑n=0∞(2n+1)!(−1)nx2n+2
=x2−3!x4+5!x6−7!x8+⋯
Example 7: Find Series for ∫e−x2dx
From Example 5: e−x2=∑n=0∞n!(−1)nx2n
Integrate term by term:
∫e−x2dx=C+∑n=0∞n!(2n+1)(−1)nx2n+1
=C+x−1!⋅3x3+2!⋅5x5−3!⋅7x7+⋯
Note: This integral has no elementary antiderivative, but we can express it as a series!
Taylor Series Centered at a=0
Example: Find Taylor series for ex centered at a=2.
All derivatives of ex are ex, so:
f(n)(2)=e2 for all n
Taylor series:
ex=∑n=0∞n!e2(x−2)n
=e2[1+(x−2)+2!(x−2)2+3!(x−2)3+⋯]
=e2∑n=0∞n!(x−2)n
When Does Taylor Series Equal the Function?
The Taylor series equals f(x) when:
limn→∞Rn(x)=0
where Rn(x) is the remainder (error) after n terms.
For most common functions (like ex,sinx,cosx,ln(1+x)), this happens on their interval of convergence.
⚠️ Common Mistakes
Mistake 1: Wrong Factorial in General Term
For sinx=x−3!x3+5!x5−⋯:
WRONG: General term is n!(−1)nxn
RIGHT: General term is (2n+1)!(−1)nx2n+1 (only odd powers!)
Mistake 2: Wrong Starting Index
For sinx, first nonzero term is x (when n=0).
WRONG: Sum starts at n=1
RIGHT: ∑n=0∞(2n+1)!(−1)nx2n+1 (starts at n=0)
Mistake 3: Forgetting Center for Taylor Series
For lnx centered at a=1:
WRONG: lnx=∑n(−1)n−1xn
RIGHT: lnx=∑n(−1)n−1(x−1)n (must use (x−1)n!)
Mistake 4: Computing All Derivatives Unnecessarily
To find series for e3x:
WRONG: Compute f′(x),f′′(x),f′′′(x),…
RIGHT: Use ex=∑n!xn, substitute x→3x:
e3x=∑n=0∞n!(3x)n=∑n=0∞n!3nxn
📝 Practice Strategy
- Memorize basic series: ex,sinx,cosx,1−x1,ln(1+x)
- Use substitution: Replace x with f(x) in known series
- Multiply/divide by powers: For xkf(x), just multiply series by xk
- Differentiate/integrate: Term by term when needed
- For derivatives at a: Look for patterns to avoid computing all
- Check first few terms: Make sure they match Taylor polynomial
- Odd/even functions: sinx has only odd powers, cosx only even
- Write general term: Essential for summation notation