Taylor Series

Taylor Series

How to solve the Taylor series problems: Taylor's theorem, Taylor series, Maclaurin series, examples, and their solutions.

Taylor's Theorem

Taylor's theorem shows how to approximate a function by rewriting the function into a polynomial function.

Taylor's theorem shows
how to approximate a function
by rewriting the function into a polynomial function.

By making a non-polynomial function
into a polynomial function,
you can approximate the function easily.

Even by using the first two terms,
y = f(a) + f'(a)(x - a),
which is the tangent line,
you can approximate the function quite accurate
near x = a.

So, by using the Taylor's theorem,
you can approximate f(x) quite accurate
near x = a.

Taylor Series

As n goes to infinity, the remainder term goes to 0. Then a function can be expressed as an infinite series: the Taylor series.

As n → ∞,
the error of the right side goes to 0.

So the last remainder term, Rn(x), goes to 0.

Then the right side can be expressed
as an infinite series.

This infinite series is the Taylor series.

f(0)(a) in the summation means f(a).

Maclaurin Series

The Maclaurin series is the special case of a Taylor series when x = 0.

The Maclaurin series
is the special case of a Taylor series
when a = 0.

The Maclaurin series is simpler.

So you'll most likely to see
the Maclaurin series problems.

Example 1: ex

Find the Taylor series for f(x) near x = 0. f(x) = e^x

When solving the Taylor series problems,
try to find a pattern between the derivative parts.

f(0) = 1
f'(0) = 1
f''(0) = 1
f'''(0) = 1
...

So the derivative parts are all 1.

Derivative of ex

So f(x) = [1/0!]⋅x0 + [1/1!]⋅x1 + [1/2!]⋅x2 + [1/3!]⋅x3 + ... .

The exponent parts and the permutation parts
both show 0, 1, 2, 3, ... .

So f(x) is
the sum of [1/n!]⋅xn
as n goes from 0 to infinity.

So ex can be expressed as
1 + x + [1/2!]x2 + [1/3!]x3 + ... .

Example 2: sin x

Find the Taylor series for f(x) near x = 0. f(x) = sin x

f(0) = 0
f'(0) = 1
f''(0) = 0
f'''(0) = -1
f''''(0) = 0
...

So the derivative parts show this pattern: 0, 1, 0, -1.

Derivative of sin x

Derivative of cos x

So f(x) = [0/0!]⋅x0 + [1/1!]⋅x1 + [0/2!]⋅x2 + [(-1)/3!]⋅x3
= [0/4!]⋅x4 + [1/5!]⋅x5 + [0/6!]⋅x6 + [(-1)/7!]⋅x7 + ... .

Cancel the 0 terms. (dark gray)

Then f(x) = [1/1!]⋅x1 + [(-1)/3!]⋅x3 + [1/5!]⋅x5 + [(-1)/7!]⋅x7 + ... .

The derivative parts show 1, -1, 1, -1, ... .
So the n-th part is (-1)n.
(n goes from 0.)

The exponent parts and the permutation parts
both show 1, 3, 5, 7, ... .
So the n-th part is 2n - 1.

So f(x) is
the sum of [(-1)n/(2n - 1)!]⋅x2n - 1
as n goes from 0 to infinity.

So sin x can be expressed as
x - [1/3!]x3 + [1/5!]x5 - [1/7!]x7 + ... .

Example 3: cos x

Find the Taylor series for f(x) near x = 0. f(x) = cos x

f(0) = 1
f'(0) = 0
f''(0) = -1
f'''(0) = 0
f''''(0) = 1
...

So the derivative parts show this pattern: 1, 0, -1, 0.

Derivative of cos x

Derivative of sin x

So f(x) = [1/0!]⋅x0 + [0/1!]⋅x1 + [(-1)/2!]⋅x2 + [0/3!]⋅x3
= [1/4!]⋅x4 + [0/5!]⋅x5 + [(-1)/6!]⋅x6 + [0/7!]⋅x7 + ... .

Cancel the 0 terms. (dark gray)

Then f(x) = [1/0!]⋅x0 + [(-1)/2!]⋅x2 + [1/4!]⋅x4 + [(-1)/6!]⋅x6 + ... .

The derivative parts show 1, -1, 1, -1, ... .
So the n-th part is (-1)n.
(n goes from 0.)

The exponent parts and the permutation parts
both show 0, 2, 4, 6, ... .
So the n-th part is 2n.

So f(x) is
the sum of [(-1)n/2n!]⋅x2n
as n goes from 0 to infinity.

So cos x can be expressed as
1 - [1/2!]x2 + [1/4!]x4 - [1/6!]x6 + ... .