Power, Taylor, and Maclaurin Series Survival Guide

advertisement
Math 222-02
Calc 2
Power, Taylor, and Maclaurin Series Survival Guide
One of the harder concepts that we have to become comfortable with during this semester is
that of sequences and series. We are working with infinite sums of complicated functions and are
answering questions about convergence.
There are a large number of functions that we can express as one of these series and we must
start by looking at the one we go into this chapter already knowing.
Power Series
We already know how to express one function as a series. Take a look at following equation:
∞
!
1
=
rn .
1 − r n=0
We all know this as the geometric series and know that it converges for all r such that
1
−1 < r < 1. Since the geometric series converges
"∞ nover this interval we may think about f (x) = 1−x
and conclude that this also converges to n=0 x over −1 < x < 1.
It is to our benefit, then, to start recognizing when an expression we wish to evaluate is already in this form or when it can be made into this form. Let us look at the following few examples.
Example 1: f (x) =
1
1+x2
This function can be rewritten as
geometric series. We therefore have
1
1−(−x2 )
and thus we may substitute −x2 for x in our original
∞
∞
!
!
1
1
2 n
=
=
(−x
)
=
(−1)n x2n .
2
2
1+x
1 − (−x ) n=0
n=0
We are not quite done working with this. We have to make sure the function we have placed into
our original position for x is within the right interval for convergence. We need | −"
x2 | = |x2 | < 1.
n
This is true when |x| < 1. The endpoints, −1 and 1, make for the divergent sum ∞
n=0 (−1) , so
our interval of convergence is −1 < x < 1.
Example 2: g(x) =
x
2−3x3
This expression can be rewritten as
of this expression,
1
.
1− 32 x3
%
( x2 )
#
1
1− 32 x3
$
. We’re going to deal with the right hand side
Let’s replace x in our original power series with 32 x3 .
1
1 − 32 x3
&
=
∞ %
!
3
n=0
2
x
3
&n
=
∞ % &n
!
3
n=0
1
2
3 n
(x ) =
∞ % &n
!
3
n=0
2
x3n
Remember that this equation only holds over the interval
' of
(n convergence, so we need to now
figure out what that interval is. Keeping in mind that an = 32 x3n , let us apply the ratio test.
)
) ' (n+1
)' (
)
)
)
) )
)
)
) 3
) 3 x3n+3 )
3(n+1) )
) an+1 )
)
)
)
)
x
3
3
)
)
)
)
2
) = lim ) 2 ' (n
) x3 ) = ) x3 )
lim ))
=
lim
=
lim
)
)
)
3
n→∞
an ) n→∞ )
x3n ) n→∞ ) x3n ) n→∞ ) 2 ) ) 2 )
2
*
)
)
Note that ) 32 x3 ) < 1 when |x3 | < 23 . Thus the radius of convergence is 3 23 and the interval of
*
*
convergence is − 3 23 < x < 3 23 .
*
"
n
But wait! We still need to check the endpoints. Putting in − 3 23 for x we get ∞
n=0 (−1) and
*
"
n
putting in 3 23 for x we get ∞
n=0 1 both of which are divergent series. Therefore our interval of
*
*
convergence is − 3 23 < x < 3 23 .
We’re not done, however! We still need to multiply our power series by x2 . Doing this will give
us our final result, over the interval of convergence:
∞ % &n
∞
∞
x
x! 3
x ! 3n x3n ! 3n x3n+1
3n
=
=
.
x =
2 − 3x3
2 n=0 2
2 n=0 2n
2n+1
n=0
Example 3: h(x) = ln (1 + x2 )
While h(x) does not immediately look like what we’ve been working with, all hope is not lost.
2x
Let us take the first derivative, h$ (x) = 1+x
2 . Using the series from Example 1 and our rules for
multiplication in Example 2, we can say that over the correct interval of convergence
h$ (x) = (2x)
∞
∞
!
!
1
n 2n
=
(2x)
(−1)
x
=
2
(−1)n x2n+1 .
1 + x2
n=0
n=0
Try to remember that this is only the series for the derivative! We’re not nearly done yet! We
still need to integrate h$ (x) to get h(x).
+
2
∞
!
n=0
n 2n+1
(−1) x
=2
+ !
∞
n=0
n 2n+1
(−1) x
=2
∞
!
n=0
n
(−1)
+
x
2n+1
=2
,∞
!
x2n+2
(−1)
2n + 2
n=0
n
-
+c
We need to catch up and figure a few things out at this point. First, let us calculate our value
for c. It’s in our best interest to choose a value for x #that will be easy $to take this infinite sum
"∞
n 02n+2
for, say x = 0. Then we have ln (1 + 02 ) = ln 1 = 0 = 2
n=0 (−1) 2n+2 +c = 0+c and so c = 0.
We need to determine our radius and interval of convergence. Observe that an =
)
)
)
)
) 2
)
) an+1 )
) (−1)n+1 x2(n+1)+2 (2n + 2) )
) x (2n + 2) )
)
)
)
) = |x2 |
)
)
lim
= lim )
= lim )
n→∞ ) an )
n→∞ (2(n + 1) + 2)(−1)n x2n+2 )
n→∞
2n + 4 )
2
(−1)n x2n+2
.
2n+2
It is true that |x2 | < 1 when |x| < 1, so our radius of convergence is 1. We need to check our
endpoints, −1 and 1. At x = −1 we have
∞
!
n=0
2n+2
n (−1)
(−1)
2n + 2
=
∞
!
(−1)3n+2
n=0
∞
!
(−1)n
=
2n + 2
2n + 2
n=0
which is a convergent alternating series. Likewise, at x = 1 we have
∞
!
∞
!
(−1)n
=
(−1)
2n + 2
2n + 2
n=0
n=0
2n+2
n (1)
which is the same convergent alternating series. Thus, our interval of convergence is −1 ≤ x ≤ 1.
Taylor and Maclaurin Series
Now we are pretty good at working with power series, however there are only a few types
of functions that we. can represent using the techniques that we’ve developed. Let’s look at the
2
2
following equation: −2 e4−x . There is no way that we’ve seen to evaluate this integral.
2
If we could write the function e4−x as a series (a polynomial in terms of x, moreover), then we
could integrate it (like our power series). Likewise, we could come up with some rules to approximate these integrals within arbitrary degrees of accuracy.
Let us assume that a function f (x) which is infinitely differentiable (that is, the nth derivative
exists for all n ∈ N) can be written as a polynomial in the following form:
f (x) = c0 + c1 (x − a) + c2 (x − a)2 + c3 (x − a)3 + . . .
We wish to ask ourselves: ”What could possibly fill in the coefficients ci ?” If we evaluate f (x)
at a then we have the following
f (a) = c0 + c1 (a − a) + c2 (a − a)2 + . . . = c0 + c1 0 + c2 02 + . . . = c0
Therefore c0 = f (a). Let us note this is equivalent to c0 =
f (a)
0!
since 0! = 1 by definition.
Then what are we to do about c1 ? Taking the first derivative of f (x), f $ (x) = c1 + 2c2 (x − a) +
3c3 (x − a)2 + . . .. From this observe that when evaluate f $ (x) at a we get the following
f $ (a) = c1 + 2c2 (a − a) + 3c3 (a − a)2 + . . . = c1 + 2c2 0 + 3c3 02 + . . . = c1
As before we note that c1 = f $ (a) =
f ! (a)
.
1!
Well, f (a) can be written as f (0) (a), and f $ (a) can be
written as f (1) (a). This observation helps us obtain the following relation: ci =
we may write f (x) as follows:
∞
!
f (n) (a)(x − a)n
f (x) =
n!
n=0
3
f (i) (a)
.
i!
Therefore
This series is known as the Taylor Series for f (x) centered at a. We say that f (x) is centered
at a because the series is exactly accurate at x = a, and the radius of convergence will be centered
at a as well. If the a we choose is 0, then we call this series the Maclaurin Series of f (x), a
special enough case to earn a separate name.
It will benefit us to work with a function and compute the corresponding series. Let us use
f (x) = ex and center it around a = 0. This is the Maclaurin Series for ex .
Example 4: f (x) = ex , a = 0
Our first goal is to try to find an explicit formula for f (n) (0). This is fairly easy in this case,
since (ex )$ = ex . Thus f (n) (0) = e0 = 1, and we find the Maclaurin Series (good over the interval
of convergence)
∞
!
xn
x
.
f (x) = e =
n!
n=0
Our second goal is to try to find the radius of convergence, and the interval of convergence.
Let us apply the ratio test:
) n+1
)
)
)
) x (n)! )
) x )
)
)
)
) = 0.
lim
= lim )
n→∞ ) xn (n + 1)! )
n→∞ n + 1 )
Since our limit does not depend on our choice of x, we say that this series converges for all x
and that the radius of convergence is ∞. Furthermore, the interval of convergence is −∞ < x < ∞.
This is great
Our Maclaurin Series for ex converges for all choices for x. This means the
"∞news!
xn
infinite sum n=0 n! equals ex for all x.
2
Example 5: g(x) = e4−x , a = 0
We first want to try to get g(x) into a form we’ve seen before, or to find an easy to use formula
for g (n) (0). If we look at the first few derivatives it will become painfully obvious that an easy
formula is not going to be possible.
2
Instead let’s note that g(x) = e4 e−x . If we put −x2 in for x in f (x) from Example 4 we will
"
"
2
(−x2 )n
(−1)n x2n
get that e−x = ∞
= ∞
.
n=0
n=0
n!
n!
The interval of convergence for this sum is also −∞ < x < ∞, so we can now obtain our final
series.
4−x2
g(x) = e
=
∞
!
(−1)n x2n e4
n=0
n!
Example 6: h(x) = sin(x), centered at a = π
Let’s list at the derivatives for sin(x), and evaluate them at π.
4
h(x)
sin(x)
h(π) 0
$
h (x)
cos(x)
h$ (π) -1
h$$ (x) − sin(x) h$$ (π) 0
h$$$ (x) − cos(x) h$$$ (π) 1
There is an obvious pattern to the derivatives, so finding an explicit formula for the nth derivative should be fairly easy. This will be the route we’ll go. Hopefully this list leads us to realize
that only the odd derivatives will give us any coefficients in our series.
A formula for the series can be obtained with this information, which will be true over the
interval of convergence:
∞
!
(−1)n+1 (x − π)2n+1
.
h(x) = sin(x) =
(2n
+
1)!
n=0
Now we’ll talk about convergence of the series, by again applying the ratio test:
)
)
)
)
) (−1)n+2 (x − π)2(n+1)+1 (2n + 1)! )
) −1(x − π)2 )
) = 0.
) = lim )
lim )
n→∞ ) (2(n + 1) + 1)!(−1)n+1 (x − π)2n+1 )
n→∞ ) (2n + 3)(2n + 2) )
Again, we have a series which converges for all x ∈ R. The radius of convergence is ∞, and
the interval of convergence is −∞ < x < ∞.
This is again excellent! We have an alternating series which converges for all x ∈ R. This will
become helpful when we talk about remainder, which is now.
Taylor and Maclaurin Series with Remainder
There’s one last thing we should talk about, that’s the concept of remainder. It’s not always
convenient for us to look at an infinite sum; sometimes we just want to get a number to work with.
A remainder is how much different the infinite sum is from a finite sum evaluated at a certain
point. Conceptually this is similar to how much is left when we divide a number into another. The
remainder in that process tells us how close to a multiple of our divisor the dividend is.
"
(n)
n
Let Ti = in=0 f (a)(x−a)
. We will call this the ith partial Taylor polynomial. It’s a polyn!
nomial of degree at most i (since f (i) (a) could certainly be 0).
Let’s look at the first few partial Taylor polynomials. T0 is just f (a), which is certainly a good
estimate for f (x) at a, but not likely to be a good estimate for the entire function.
Next, T1 = f (a) + f $ (a)(x − a). This expression is equal to the tangent line at x = a. This is
also equal to f (a) at x = a, but even better, it is much closer to f (x) for values very near to a. It
should also be reminiscent of the mean value theorem.
The series continues, each partial polynomial giving us a better and better approximation over
the interval of convergence for the entire series. We want to be able to answer a few questions,
however.
5
1. Over our interval of convergence or a subinterval, how far off is a partial Taylor Polynomial
from the value of the full Taylor Series?
2. Over our interval of convergence, over a subinterval, or at a specific value near the center of
our series, how many terms do we need to get within a specific range of the correct answer?
These are both questions about error, or remainder. If we are lucky enough to have an alternating series, then our questions are fairly easily answered.
If Ti =
"i
f n (a)(x−a)n
is an alternating
n!)
)
) f i+1 (a)(x−a)i+1 )
term is )
).
(i+1)!
n=0
itly, the error
series, then the error term is |Ti+1 − Ti |. More explic-
Example 7: Remainder for h(x) = sin x
Looking at Example 5 we have an alternating series for sin(x). Let’s say we want to know the
, when we are looking at the 5th degree partial
largest error possible over the interval π2 < x < 3π
2
Taylor polynomial.
3
5
The corresponding 5th degree Taylor polynomial,) centered
at π, is −(x − π) + (x−π)
− (x−π)
.
3!
5!
)
) 1(x−π)7 )
This actually is T2 , so the error term is |T3 − T2 | = ) 7! ).
)
)
) (x−π)7 )
We want to look at how this behaves over the entire interval π2 < x < 3π
.
is largest when
2 ) 7! )
) 3π 7 ) )
)
) ( −π) )
x is furthest to the right from π, so the error is at most ) 2 7! ) = )( π2 )7 7!1 ) which is roughly .00468.
However, if we are not lucky enough to have an alternating series then we have to resort to
other means. The remainder on the ith partial Taylor polynomial is defined in the following way.
Over an interval I containing both a and the x we wish to evaluate, we can find an x̂ (called
x-hat) between x and a that makes the following function exactly equal to the remainder for Ti
evaluated at x:
f (i+1) (x̂)(x − a)i+1
Ri =
.
(i + 1)!
Plainly, when we want to figure out f (x) for an x not equal to a, then we can estimate the
value by using a partial Taylor polynomial, plus or minus the remainder. We won’t know exactly
what the remainder will be (if we did we wouldn’t have to estimate!), so we want to figure at worst
how far off we’ll be.
We do this by centering our series at an easy to evaluate value a near the x we want, then
trying to bound Ri using information about the interval (x, a) or (a, x).
Example 8: Remainder for f (x) = ex
Let’s use Example 4 to take a look at the 3rd partial Maclaurin polynomial for ex , over the
interval −1 < x < 1. Further let’s figure out how bad our 3rd partial Maclaurin polynomial will
6
estimate ex over the entire interval. This polynomial, T3 , is written as T3 = 1 + x +
x̂ 4
know that there exists an x̂ ∈ (−1, 1) so that R3 = e 4!x .
x2
2
+
x3
.
3!
We
So to find the remainder we need to figure out how bad we can make |R3 | using possible choices
for x and x̂ in our interval. We want to look at |R3 | rather than R3 because we want to look at
the magnitude of our error.
Clearly |R3 | is largest when x = x̂ = 1, making R3 = 4!1 . So our remainder for anything over
1
this interval is at most 24
for the 3rd Taylor polynomial for ex .
Example 9: Remainder for g(x) = ln(x)
Let us try one problem which asks the second question from above. If g(x) = ln(x), how many
terms do we need to compute ln(3) to within .001 of the correct answer?
It is beneficial for us to center our Taylor series for ln(x) around e so that our polynomial is
fairly accurate at 3.
Computing the nth derivative of ln(x): g (n) (x) =
(−1)n+1 (n−1)!
xn
for n > 0.
Again, this is magnificent! We have another alternating series, so our error is given by
) (n+1)
) )
) )
)
)g
(3)(3 − e)n+1 )) )) (−1)n+2 n!(3 − e)n+1 )) )) (3 − e)n+1 ))
)
|Rn | = )
)=)
) = ) 3n+1 (n + 1) ) .
(n + 1)!
3n+1 (n + 1)!
1
Remember that what we want is for |Rn | < 1000
. Simple trial and error will show that this
happens for the first time for n = 2 where |Rn | is approximately .0000279.
Conclusion
Hopefully this guide has given you some insight into power, Taylor, and Maclaurin series as
well as some strategies to approach problems you will see involving them. Remember the following
steps when it comes to a series problem:
1
1. Determine if the expression you wish to evaluate is in the form f (x) 1−g(x)
. If it is, then you
"∞
can make a power series! The power series will be in the form f (x) n=0 (g(x))n and will
converge when |g(x)| < 1.
1
2. If the expression isn’t obviously in the form f (x) 1−g(x)
, can it instead be integrated or differentiated to get into that form? If it can, take the appropriate integral or derivative to get
it into that form.
Once in that form, find the power series for it. Remember: this is the power series for the
integral or the derivative! We have to undo the damage by differentiating or integrating.
7
If we previously integrated, then we don’t have to figure out the constant, since differentiating
will cancel it out. If however we are integrating, then we need to remember to evaluate the
function to find the constant. It is important to choose an x that will evaluate cleanly.
3. If those steps fail, then we can almost always construct a Taylor or Maclaurin Series for
the expression. If our expression is h(x), try to find an explicit formula for h(n) (x) (the nth
derivative of h(x)). It will allow you to work more abstractly with the sum, and to write
out the infinite sum concretely. Otherwise, you will be left to work with a partial Taylor
polynomial.
4. If the question is asking about remainder, then remember to check if this is an alternating
series. If it is then the remainder is given as being less than or equal to the absolute value
of the next term evaluated at the specific x that the question asks about.
If it’s not alternating, then remember we have to play with x and x̂ within our interval to
figure out just how large our error can be. Remember that x is what we wish to evaluate,
that our series should be centered at a nearby a that’s easy to evaluate, and that our x̂ lives
between x and a. Also remember to make the expressions in the numerator large, and the
expressions in the denominator as close to 0 as possible to make the remainder large over
our interval.
Some things to think about
1. Calculate a power series for ln (1 + x4 ), its radius of convergence, and its interval of convergence.
2. Calculate a power series for
1
,
(1−x)2
its radius of convergence, and its interval of convergence.
3. Using the Maclaurin series for ex , show that (ex )$ = ex .
4. Using the Maclaurin series for sin(x), show that (sin(x))$ = cos(x).
5. Calculate sin(6) using a Taylor series centered around 2π. Be accurate within .001.
6. Over the interval 3 < x < 5, how poorly does the tangent line at x = 4 approximate
How about the quadratic Taylor polynomial?
7. Find an explicit formula for the nth derivative of x1 .
8
√
3 + x?
Download