๐ฏ 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=0nโk!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!1โxn=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)nโx2n+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)nโx2n
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