Representation of functions as power series Dr. Philippe B. Laval Kennesaw State University November 9, 008 Abstract This document is a summary of the theory and techniques used to represent functions as power series. Representation of Functions as Power Series (8.6). Theory In this section, we develop several techniques to help us represent a function as a power series. More precisely, given a function f (x), we will try to nd a power series c n (x a) n such that f (x) c n (x a) n. Part of the work will involve nding the values of x for which this is valid. Part of the reason for doing this is that a power series looks like a polynomial (except that it has in nitely many terms). Polynomials are among the easiest functions to work with. They are easy to di erentiate, integrate,... So, if f is a complicated function, replacing it with a power series amounts to replacing it with a polynomial. Therefore, working with f becomes easier. There are some technical di culties to resolve, we will address those as we develop the technique. First, we will look at techniques which will allow us to obtain a series representation by using known series representations. The techniques involved are substitution, di erentiation and integration. Then, we will learn a technique which will allow us to nd a series representation for a given function f directly, without having to use known series. We now look at each technique (substitution, di erentiation and integration) in details, using examples. At this point, we only know the following series representation: x + x + x + + ::: in ( ; ) x n
When nding the power series of a function, you must nd both the series representation and when this representation is valid (its domain).. Substitution We derive the series for a given function using another function for which we already have a power series representation. Then, we do the following:. Figure out which substitution can be applied to transform the function for which we know the series representation to the function for which we want a series representation.. Apply the same substitution to the known series. This will give us the series representation we wanted. 3. The domain of the new function is obtained by applying the same substitution to the domain of the known series. Example Find a power series representation for f (x) and its domain. + x We use the representation of, replacing x by x. We obtain: x + x ( x) + ( x) + ( x) + ( x) 3 + ::: x + x + ::: ( ) n x n The series representation for was valid if jxj <. If we apply the same x substitution, we see that this representation is valid if j xj < or jxj <. In other words, the interval of convergence is also ( ; ). Example Find a power series representation for f (x) x. Proceeding as above and remembering that x X x n, we have: x x n x n + x + x 4 + :::
This is a geometric series which converges when x < that is when x < or < x <. Example 3 Find a power series representation for and nd its domain. + x First, we rewrite + x + x. Now, we nd a power series representation for + x, then we will multiply it by. + x can be obtained from x by x replacing x by. Since x X x n, we have: Therefore, x n + x ( ) n x n + x ( ) n x n ( ) n x n n+ x converges when jxj <, so this series converges when x < ) jxj <. So, the interval of convergence is ( ; ), the radius of convergence is. Remark 4 In the rst of these two examples, we applied the substitution to the expanded form of. In the second, we applied it to the compact form. You x can do it either way, it is simply a matter of choice. Example 5 Suppose that you are given that a series repersentation for e x is e x x n in ( ; ). What is a series representation for e x and what is its domain? We go from e x to e x using the substitution x! x. Thus e x x n x n also valid in ( ; ) 3
.3 Di erentiation and Integration The driving force behind the integration and di erentiation techniques is the theorem below which we state without proof. Theorem 6 If the power series c n (x R > 0 then the function de ned by f (x) a) n has a radius of convergence c n (x a) n c 0 + c (x a) + c (x a) + ::: is di erentiable (hence) continuous on (a R; a + R) and. f 0 (x) c + c (x a) + 3c 3 (x a) + ::: In other words, the series can be di erentiated term by term.. R (x a) (x a) 3 f (x) dx C + c 0 (x a) + c + c + ::: In other words, 3 the series can be integrated term by term. 3. Note that whether we di erentiate or integrate, the radius of convergence is preserved. However, convergence at the endpoints must be investigated every time. Remark 7 This theorem simply says that the sum rule for derivatives and integrals also applies to power series. Remember that a power series is a sum, but it is an in nite sums. So, in general, the results we know for nite sums do not apply to in nite sums. The theorem above says that it does in the case of in nite series. Remark 8 The formula in part of the theorem is obtained simply by di erentiating the series term by term. Since f (x) c 0 + c (x a) + c (x a) + ::: then 0 f 0 (x) c 0 + c (x a) + c (x a) + ::: (c 0 ) 0 + (c (x a)) 0 + c (x a) 0 + ::: 0 + c + c (x a) + 3c 3 (x a) + ::: () Alternatively, one can also di erentiate the general formula. Since f (x) c n (x a) n 4
then f 0 (x)! 0 c n (x a) n (c n (x a) n ) 0 by the theorem nc n (x a) n The rst term of this series (when n 0) is 0, thus we can start summation at n. Hence, we have f 0 (x) nc n (x a) n () n The reader should check that formulas and are identical. Remark 9 The formula in part of the theorem is obtained by integrating term by term. It can also be obtained by integrating the general formula. Since f (x) c n (x a) n then Z f (x) dx Z X c n (x a) n! dx Z (c n (x a) n ) dx by the theorem Since an antiderivative of c n (x a) n is C + c n (x a) n+, we have n + Z If we expand this, we get Z f (x) dx C + c n (x a) n+ n + f (x) dx C + c 0 (x a) + c (x a) Which is the formula which appears in the theorem. + c (x a) 3 3 + ::: 5
Example 0 Given that a power series representation for f (x) is f (x) + x + x + + ::: nd a power series representation for f 0 (x) and R f (x) dx. x n First, we nd f 0 (x). From the theorem, we know it is enough to di erentiate term by term. Thus, f 0 (x) 0 + + x + 3x + ::: + x + 3x + ::: Note that we can also obtain the same result by using the general formula. In this case, f (x) x n Thus f 0 (x) Which gives us the same answer. (x n ) 0 n nx n nx n Next, we nd R f (x) dx. From the theorem, it is enough to integrate term by term. Thus since f (x) + x + x + + :::, we have: Z f (x) dx C + x + x + x3 3 + x4 4 + ::: Alternatively, we can work from the general formula. Since f (x) we have Which is the same formula. Z f (x) dx Z (x n ) dx C + x n+ n + x n, 6
.3. Di erentiation This time, we nd the series representation of a given series by di erentiating the power series of a known function. More precisely, if f 0 (x) g (x), and if we have a series representation for f and need one for g, we simply di erentiate the series representation of f. The theorem above tells us that the radius of convergence will be the same. However, we will have to check the endpoints. Example Find a series representation for convergence. We begin by noting that we have:, nd the interval of ( x) 0 x ( x). Since x +x+x + +::::, ( x) + x + x + + ::: 0 + x + 3x + 4 + :::: nx n n The radius of convergence is still. Since converges for x in ( ; ), we x know that will also converge in ( ; ). It might also converge at the ( x) endpoints, so we need to check them. Do it as an exercise. Remark If you prefer to work from the compact form of the series, it can be done. x X x n ( x)! 0 x n (x n ) 0 n nx n However, you have to be careful with the starting value of n. Example 3 Suppose you know that a series representation for sin x is sin x x 3! + x5 5! x 7 7! + ::: ( ) n x n+ (n + )! 7
Find a power series representation for cos x. cos x (sin x) 0 x 3! + x5 5! x! + x4 4! ( ) n x n (n)! x 7 0 7! + ::: x 6 6! + ::: Example 4 Find a power series representation for xe x repersentation for e x is e x x n in ( ; ). We can do this problem two ways. given that a series Method Using substitution, we can nd a power series representation for e x, then multiply what we nd by x. The rst part was done earlier, x n and we found that e x on ( ; ). Thus, xe x xx n x n+ also in ( ; ). Method We note that xe x e x 0. So, using substitution, we can nd a power series representation for e x, then di erentiate it to get a series 8
representation for xe x. xe x e x 0 n n! 0 x n nx n nx n x n (n )! x n+ when n 0, nxn 0 So, either way, we nd the same answer..3. Integration This time we nd the power series representation of a function by integrating the power series representation of a known function. If g (x) R f (x) dx and we know a power series representation for f (x), we can get a series representation for g (x) by integrating the series representation of f. Example 5 Find a power series representation for ln ( x). We know that ln ( x) R dx. By our earlier work, we found that x x + x + x + + ::: in ( ; ), so ln ( x) C + x + x + x3 3 + ::: We also know that ln 0, From the above equation, we get that C 0 by letting x 0. Therefore ln ( x) x + x + x3 3 + ::: x n+ n + Therefore, ln ( x) x n+ n + 9
Since the original series converges in ( ; ), this one will also converge there. The end points should be checked, we leave it as an exercise. Example 6 Find a power series rpresentation for tan x. We use the fact that tan x R se see that dx + x. First, since x +x+x + +:::, + x x + x 4 x 6 + ::: and therefore tan x C + x 3 + x5 5 Using the fact that tan 0 0 gives us C 0. Thus tan x x.4 Things to Know 3 + x5 5 x 7 7 + ::: x 7 7 + ::: Be able to nd the series representation of a function by substitution, integration or di erentiation. Problems assigned: #, 3, 5, 7,, 3,, 35 on pages 604, 605 Taylor and Maclaurin s Series (8.7). Introduction The previous section showed us how to nd the series representation of some functions by using the series representation of known functions. The methods we studied are limited since they require us to relate the function to which we want a series representation with one for which we already know a series representation. In this section, we develop a more direct approach. When dealing with functions and their power series representation, there are three fundamental questions one has to answer:. Does a given function have a power series representation?. If it does, how do we nd it? 3. What is the domain in other words, for which values of x is the representation valid? Question is more theoretical, we won t address it. We will concentrate on questions and 3. Assuming f has a power series representation that is f (x) c 0 +c (x a)+ c (x a) + :::, we want to nd what the power series representation is, that is we need to nd the coe cients c 0 ; c ; c ; :::. It turns out that it is not very di cult. The technique used is worth remembering. We rst nd c 0. Having found c 0 we next nd c. Then, we nd c and so on. 0
Finding c 0. Since f (x) c 0 + c (x a) + c (x a) + c 3 (x a) 3 + c 4 (x a) 4 + ::: (3) it follows that f (a) c 0 + c (0) + c (0) + ::: c 0 Finding c. Di erentiating equation 3 gives us f 0 (x) c + c (x a) + 3c 3 (x a) + 4c 4 (x a) 3 + ::: Therefore, f 0 (a) c Finding c. We proceed the same way. First, we compute f 00 (x), then f 00 (a). Therefore or f 00 (x) c + () (3) c 3 (x a) + (3) (4) c 4 (x a) + ::: f 00 (a) c c f 00 (a) In general. Continuing this way, we can see that. De nitions and Theorems c n f (n) (a) Theorem 7 If the function f has a power series representation, that is if f (x) c n (x a) n c 0 + c (x a) + c (x a) + ::: for jx aj < R then its coe cients are given by: In other words c n f (n) (a) f (x) f (a) + f 0 (a) (x a) + f 00 (a) (x a) De nition 8. The series in the previous theorem is called the Taylor series of the function f at a. + f 000 (a) (x a)3 3! f (n) (a) + ::: (x a) n!
. The nth partial sum is called the nth order Taylor polynomial It is denoted T n : So, nx f (i) (a) T n (x) (x a) i i! i0 3. In the special case a 0, the series is called a Maclaurin s Series. So, a f (n) (0) Maclaurin s series is of the form x n and the Maclaurin s series for a function f is given by f (x).3 Examples f (n) (0) x n f (0) + f 0 (0) x + f 00 (0) x + f 000 (0) x3 3! + ::: We now look how to nd the Taylor and Maclaurin s series of some functions. Example 9 Find the Maclaurin s series for f (x) e x, nd its domain. f (n) (0) The series will be of the form x n, we simply need to nd the coef cients f (n) (0). This is easy. Since all the derivatives of e x are e x, it follows that f (n (x) e x, thus f (n) (0) e 0, hence e x f (n) (0) x n x n To nd where this series converges, we use the ration test and compute: lim a n+ a n lim Thus the domain is all real numbers. x n+ (n + )! x n jxj n+ lim (n + )! jxj n jxj lim n + 0
Example 0 Find a Taylor series for f (x) e x centered at. f (n) () The series will be of the form (x ) n, we simply need to nd the coe cients f (n) (). This is easy. Since all the derivatives of e x are e x, it follows that f (n (x) e x, thus f (n) () e, hence e x f (n) () e (x )n (x ) n Example Find the n th order Taylor polynomial for e x centered at 0 and centered at. Plot these polynomials for n ; ; 3; 4; 5. What do you notice? We already computed the power series corresponding to these two situations. We found that and e x + x + x! + x3 3! + x4 4! + x5 5! + x6 6! + ::: e x e + e (x ) (x )3 (x ) + e + e + :::! 3! e + (x ) + (x )! + (x )3 3! + (x )4 4! + (x )5 5! + :::! If we denote T n the n th order Taylor polynomial for e x centered at 0 and Q n the n th order Taylor polynomial for e x centered at, we have: n th order Taylor polynomials for e x centered at 0. T (x) + x T (x) + x + x! T 3 (x) + x + x! + x3 3! T 4 (x) + x + x! + x3 3! + x4 4! T 5 (x) + x + x! + x3 3! + x4 4! + x5 5! The graphs is shown on the next page. 3
Graphs of e x and the rst 5 Taylor polynomials centered at 0. The functions have the following colors: e x : black T : blue T : red T 3 : green T 4 : purple T 5 : yellow 4
n th order Taylor polynomial for e x centered at : Q (x) e ( + (x )) Q (x) e + (x ) + Q 3 (x) e + (x ) + Q 4 (x) e + (x ) + Q 5 (x) e + (x ) +! (x )! (x )! (x )! (x )! The graphs are shown on the next page.. + + +! (x )3 3! (x )3 3! (x )3 3! + +! (x )4 4! (x )4 4! +! (x )5 5! 5
Graphs of e x and the rst 5 Taylor polynomials centered at. The functions have the following colors: e x : black Q : blue Q : red Q 3 : green Q 4 : purple Q 5 : yellow We can see the following: The Taylor polynomial approximates the functions well near the point at which the series is centered. As we move away from this point, the approximation deteriorates very quickly. The approximation is better the higher the degree of the Taylor polynomial. More speci cally, the Taylor polynomial stay closer to the function over a larger interval, the higher its degree. 6
Example Find a Maclaurin s series for f (x) sin x and nd its domain f (n) (0) The series will be of the form x n, we simply need to nd the coe - cients f (n) (0). That is we need to nd all the derivatives of sin x and evaluate them at x 0. We summarize our ndings in the table below: n f (n) (x) f (n) (0) 0 sin x 0 cos x sin x 0 3 cos x 4 sin x 0 So, we see that we will have coe cients only for odd values of n. In addition, the sign of the coe cients will alternate. Thus, since we have f (x) f (0) + f 0 (0) x + f 00 (0) x + f 000 (0) x3 3! + f (4) (0) x4 4! + ::: sin x 0 + x + 0 x 3! + x5 5! 3! + 0 + x5 5! x 7 7! + ::: ( ) n x n+ (n + )! To nd where this series converges, we use the ration test and compute lim a n+ a n. Since a n xn+ (n + )!, a n+ xn+3 (n + 3)!. Therefore, x n+3 lim a n+ a n lim (n + 3)! x n+ (n + )! jxj n+3 (n + )! lim jxj n+ (n + 3)! jxj lim (n + )! (n + 3)! ::: jxj lim (n + ) (n + 3) 0 Thus the series representation is valid for all x. 7
Here are some important functions and their corresponding Maclaurin s series x + x + x + + x 4 + ::: ( ; ) e x + x + x! + x3 + ::: ( ; ) 3! sin x x cos x tan x x 3! + x5 5! x! + x4 4! 3 + x5 5 x 7 7! x 6 + ::: ( ; ) + ::: 6! ( ; ) x 7 + ::: 7 [ ; ] Remark 3 The n th order Taylor polynomial (T n ) associated with the series expansion of a function f is the n th degree polynomial obtained by truncating the series expansion and keeping only the terms of degree less than or equal to n. In the case of sin x, since It follows that and so on. sin x x 3! + x5 5! T x T x T 3 x T 4 x T 5 x T 6 x 3! 3! 3! + x5 5! 3! + x5 5! x 7 7! + :::.4 Summary We now have four di erent techniques to nd a series representation for a function. These techniques are:. Substitution. Di erentiation 3. Integration 8
4. Taylor/Maclaurin s series. It may appear that the last technique is much more powerful, as it gives us a direct way to derive the series representation. In contrast, the rst three techniques require we start from a known series representation. However, the rst three techniques should not be ignored. In many cases, they make the work easier. We illustrate this with a few examples. Example 4 Find a Maclaurin s series for f (x) e x. Of course, this can be done directly. But consider the problem of nding all the derivative of e x. One can also start from e x and substitute x for x. Since it follows that e x x n + x + x + x3 3! + x4 4! e x x n ( ) n x n This was pretty painless. To convince yourself that this is the way to do it, try the direct approach instead! Example 5 Find a Maclaurin s series for cos x. Again, one can try the direct approach as in example. It is not too di cult. One can also realize that (sin x) 0 cos x. Thus, one can start with the series for sin x (which we already derived) and nd the series for cos x by di erentiating it. We get cos x (sin x) 0 ( ) n x n+ (n + )! ( ) n x n+ ( ) n x n (n)! x + x4 4! (n + )! x 6 6!! 0 0 9
.5 Things to Remember Given a function, be able to nd its Taylor or Maclaurin s series. Be able to nd the radius and interval of convergence of Taylor or Maclaurin s series. Section 8.7: # 3, 5, 7, 9,, 3, 9,, 3, 5, 3 on pages 65, 66. 3 Applications The purpose of this section is to show the reader how Taylor series can be used to approximate functions. The approximation can then be used to either evaluate a function at speci c values of x, to integrate or to di erentiate the function. Of course, we would only use this technique with functions for which the traditional calculus methods do not work. For example, we may need to compute Z 0 e x dx. This cannot be done using the integration techniques learned in a traditional calculus class since e x does not have an antiderivative which can be expressed in terms of elementary functions. Another application might be to approximate sin (0:0), without a calculator. The di culty does not lie in the series representation of a given function, we now know how to represent functions as power series. However, series have in nitely many terms, for practical purposes, we can only use a nite number of them. Thus, we replace the in - nite series by the corresponding Taylor polynomial (see de nition 8) of order n (T n ), for some n. We then use the Taylor polynomial instead of the function. This can be used to evaluate a function, integrate a function or di erentiate a function. However, when we perform the following approximation f (x) f (a) + f 0 (a) (x a) + f 00 (a)! (x a) + ::: + f (n) (a) there are several questions to answer before we can carry it out: (x a) n. How do we pick a, the number around which the series is centered?. How do we pick n so the Taylor polynomial T n approximates the given function f within the desired accuracy? Answer to question There are several factors to take under consideration. First, since we have to evaluate f (n) (a), a must be picked so we can do this evaluation easily. Second, you will recall that the accuracy of the approximation decreases as x gets further away from a. Therefore, we need to pick a so that the values at which f (x) will be approximated are in the domain of the series, and not too far from a. For example, if we had to approximate sin (:00), then a 0 would be a good choice because it satis es both criteria. 0
Answer to question Once we have selected a and have a series representation for f, we use the techniques studied to approximate a series and nd the error. The examples below illustrate these applications. Example 6 Find the nth order Taylor polynomial for f (x) cos x when n ; 3; 4; 5; 6. Sketch the graph of cos x as well as the Taylor polynomials found. We already know the power series for cos x. So, cos x P (x) P 3 (x) P 4 (x) P 5 (x) P 6 (x) x! + x4 4! x! x! x! + x4 4! x! + x4 4! x! + x4 4! x 6 6! + x8 8! :::: You will note that because every other coe cient in the series expansion of cos x is 0; P 3 P, P 5 P 4. The graph of these polynomials is shown on gure. Remark 7 You will notice that as n increases, P n gets closer to the graph of cos x. In other words, the accuracy of our approximation increases with n. However, P n is a good approximation for cos x in a neighborhood of 0, as we move away from 0, P n gets further and further away from cos x. This is important. When one approximates a function with a Taylor polynomial about a, the approximation is good only for values of x close to a. Example 8 Approximate cos 0:0 with an error less than 0 0. First, we note that since :0 is close to 0, we can use a Taylor polynomial centered at 0 to approximate cos (:0). Therefore, using the Taylor polynomial for cos x centered at 0, and replacing x by 0:0, we get: cos 0:0 nx i0 ( ) i 0:0 i (i)! We need to nd n so that if we approximate ( ) i 0:0 i nx by ( ) i 0:0 i (i)! (i)!, i0 i0 the error is less than 0 0. We notice that ( ) i 0:0 i is an alternating (i)! i0 x 6 6!
Figure : Graph of cos x and some Taylor polynomials series with b n 0:0n, so we know how to estimate its error. The error is (n)! always less than b n+. So, if we want the error to be less than 0 0, it is enough to solve: 0:0 (n+) (n + )! b n+ < 0 0 < 0 0 We solve this by trying various values of n. The table below shows this procedure:
0:0 (n+) n (n + )! 4 0 0 0 5 3 0 We see that n 3 is enough. Therefore: cos 0:0 3X ( ) n 0:0 n (n)! 0:99995000046665 Example 9 Approximate R 0 e x dx with an error less than 0:00. First, we nd a series representation for e x. Since e x x n it follows that Therefore and therefore Z 0 Z e x e x dx e x dx ( ) n x n ( ) n x n+ (n + ) ( ) n x n+ (n + ) 0 ( ) n (n + ) This is an alternating series ( ) n b n with b n. From our (n + ) knowledge of alternating series, we know that if we approximate ( ) i (i + ) i! i0 nx by ( ) i (i + ) i!, the error will be less than b n+ (n + 3) (n + )!. So, i0 we nd n such that (n + 3) (n + )! < :00 3
We try several values of n, we nd that when n 3, and when n 4, :0007576. So, (n + 3) (n + )! 4X gives us the desired approximation. ( ) n 0:747 49 (n + ) (n + 3) (n + )! :00463 3. Problems The problems assigned for power series, Taylor series and representation of functions as power series were: Section 8.6: #, 3, 5, 7,, 3,, 35 on pages 60, 6. Section 8.7: # 3, 5, 7, 9,, 3, 9,, 3, 5, 3 on pages 65, 66. In addition, for the applications discussed in this section, do # 3, 5, 7 on page 68. 4