Functions as Power Series, Taylor`s Theorem III

Using Taylor’s Theorem
This lecture will be about finding power series for all of the common
functions we know about. The way that we accomplish this is by using the
fact that for any smooth function f (x) we can find it’s power series
centered at x = a by computing all the derivatives at a and dividing by a
(k)
factorial, i.e., ak = f k !(a)
Let’s start with, what turns out, to be the easiest one to compute.
(k)
f (x) = e x . Remember, once we find a formula for f k !(0) Taylor’s theorem
says
∞
X
f (k) (0) k
f (x) =
x
k!
k=0
Math 9C Fall 2011 (UCR)
Pro-Notes
October 29, 2011
1 / 18
Example 1
Find a power series for the function f (x) = e x centered at x = 0
The first thing we need to do is find all the derivatives of f (x) and then
evaluate them at x = 0. This is easy though because the derivatives of
f (x) = e x are just e x . So this says
f (k) (x) = e x
. In other words
e0
1
f (k) (0)
=
=
k!
k!
k!
. So by Taylor’s Theorem
ex =
∞
X
xk
k=0
Math 9C Fall 2011 (UCR)
k!
= 1 + x + x 2 /2! + x 3 /3! + x 4 /4! + · · ·
Pro-Notes
October 29, 2011
2 / 18
Example 2
Find a power series expansion for f (x) = sin(x) centered at x = 0.
We need to know all the derivatives of sin(x) evaluated at 0. So let’s start
f (x) = sin(x)
f 0 (x) = − cos(x)
f 00 (x) = − sin(x)
f 000 (x) = − cos(x)
This is all we need to compute because after the 3rd derivative it just
repeats. Now let’s evaluate at 0.
Math 9C Fall 2011 (UCR)
Pro-Notes
October 29, 2011
3 / 18
f (0) = sin(0) = 0
f 0 (0) = cos(0) = 1
f 00 (0) = − sin(0) = 0
f 000 (0) = − cos(0) = −1
So Notice that the 0, 2, 4, 6, 8, . . . derivatives are all zero. While the
1, 3, 5, 7, . . . derivatives start at 1 and alternate between 1 and -1.
Math 9C Fall 2011 (UCR)
Pro-Notes
October 29, 2011
4 / 18
Another way to say this is the even derivatives are 0, i.e.,
f (2k) (0) = 0
and the odd derivatives start at 1 and alternate between 1 and -1, i.e.,
f (2k+1) (0) = (−1)k
Now Taylor’s theorem says
f (x) =
∞
X
f (n) (0)
n!
n=0
xn
We can split this into the even terms and the odd terms and get
f (x) =
∞
X
f (2k) (0)
n=0
Math 9C Fall 2011 (UCR)
(2k)!
x
2k
+
∞
X
f (2k+1) (0)
n=0
Pro-Notes
(2k + 1)!
x 2k+1
October 29, 2011
5 / 18
Using that the even derivatives are 0 and the odds are alternating we get
our power series for sin(x) as
sin(x) =
∞
X
(−1)k x 2k+1
k=0
Math 9C Fall 2011 (UCR)
(2k + 1)!
Pro-Notes
=x−
x3 x5
+
− ···
3!
5!
October 29, 2011
6 / 18
Example 3
Find a power series expansion for f (x) = cos(x) centered at x = 0.
Again we need to know all the derivatives of cos(x) evaluated at 0. So
let’s start
f (x) = cos(x)
f 0 (x) = − sin(x)
f 00 (x) = − cos(x)
f 000 (x) = sin(x)
As before, it just then repeats. Now let’s evaluate at 0.
Math 9C Fall 2011 (UCR)
Pro-Notes
October 29, 2011
7 / 18
f (0) = cos(0) = 1
f 0 (0) = − sin(0) = 0
f 00 (0) = − cos(0) = −1
f 000 (0) = sin(0) = 0
This time the pattern is reversed between the evens and odds. The even
derivatives, when evaluated at 0, start at 1 and alternate between 1 and -1
. While the odd derivatives 1, 3, 5, 7, . . . are all 0.
Math 9C Fall 2011 (UCR)
Pro-Notes
October 29, 2011
8 / 18
Another way to say this is the even derivatives are alternating as (−1)k i.e.,
f (2k) (0) = (−1)k
and the odd derivatives are 0, i.e.,
f (2k+1) (0) = 0
Putting this all together, we see as in the previous example
sin(x) =
∞
X
(−1)k x 2k+1
k=0
Math 9C Fall 2011 (UCR)
(2k + 1)!
Pro-Notes
=x−
x3 x5
+
− ···
3!
5!
October 29, 2011
9 / 18
Example 4
Find a power series expansion for f (x) = sin(x) centered at x = π/3.
This time we need to know all the derivatives of sin(x) evaluated at π/3.
So let’s start
f (x) = sin(x)
f 0 (x) = − cos(x)
f 00 (x) = − sin(x)
f 000 (x) = − cos(x)
Now let’s evaluate at π/3.
Math 9C Fall 2011 (UCR)
Pro-Notes
October 29, 2011
10 / 18
f (0) = sin(π/3) =
p
(3)/2
f 0 (0) = cos(π/3) = 1/2
p
f 00 (0) = − sin(π/3) = − (3)/2
f 000 (0) = − cos(π/3) = −1/2
√
So Notice√that the 0, √
2, 4, 6, 8, . . . derivatives start at 3/2 and alternate
between 3/2 and − 3/2. While the 1, 3, 5, 7, . . . derivatives start at 1/2
and alternate between 1/2 and −1/2.
Math 9C Fall 2011 (UCR)
Pro-Notes
October 29, 2011
11 / 18
Another way to say this is the even derivatives are (−1)k
√
f (2k) (0) = (−1)k 3/2
p
(3)/2, i.e.,
and the odd derivatives are (−1)k 1/2, i.e.,
f (2k+1) (0) = (−1)k /2
We split Taylor’s theorem
f (x) =
∞
X
f (n) (0)
n!
n=0
xn
again into the even terms and the odd terms and get
f (x) =
∞
X
f (2k) (0)
n=0
Math 9C Fall 2011 (UCR)
(2k)!
x
2k
+
∞
X
f (2k+1) (0)
n=0
Pro-Notes
(2k + 1)!
x 2k+1
October 29, 2011
12 / 18
Using our formulas for the even derivatives and odd derivatives we get a
power series for sin(x) centered at π/3 as
√
∞
∞
X
(−1)k 3 2k X (−1)k
sin(x) =
x +
x 2k+1
2(2k)!
2(2k + 1)!
k=0
Math 9C Fall 2011 (UCR)
k=0
Pro-Notes
October 29, 2011
13 / 18
Example 5
Find a power series centered at x = 0 for the function
f (x) = (1 + x)n
where n is any real numbers
Again we just need to find all the derivatives of f (x) and evaluate them at
x = 0. So let’s start
Math 9C Fall 2011 (UCR)
Pro-Notes
October 29, 2011
14 / 18
f (x) = (1 + x)n
f 0 (x) = n(1 + x)n−1
f 00 (x) = n(n − 1)(1 + x)n−2
f 000 (x) = n(n − 1)(n − 2)(1 + x)n−3
..
.
f (k) (x) = n(n − 1)(n − 2) · · · (n − k + 1)(1 + x)n−k
Math 9C Fall 2011 (UCR)
Pro-Notes
October 29, 2011
15 / 18
So by replacing x by 0, we have the formula
n(n − 1)(n − 2) · · · (n − k + 1)
f (k) (0)
=
k!
k!
The numbers
n
k
=
n(n − 1)(n − 2) · · · (n − k + 1)
k!
are called binomial coefficients are arise all over the place in nature.
Taylor’s theorem says
∞ X
n
(1 + x) =
xk
k
n
k=0
Math 9C Fall 2011 (UCR)
Pro-Notes
October 29, 2011
16 / 18