TAYLOR AND MACLAURIN SERIES. Introduction Last time, we were able to represent a certain restricted class of functions as power series. This leads us to the question: can we represent more general functions as power series? Let us suppose that f is any function that can be represented by a power series with some radius of convergence x a < R, () f(x) c 0 + c (x a) + c 2 (x a) 2 + c 3 (x a) 3 + c 4 (x a) 4 + we are going to try and determine what the coefficients c n must be in terms of f. Clearly if we put x a in Equation, all of the higher order terms vanish, leaving f(a) c 0. Since we are able to differentiate the power series in (), term by term, the first derivative gives (2) f (x) c + 2c 2 (x a) + 3c 3 (x a) 2 + 4c 4 (x a) 3 + x a < R and so, setting x a gives f (a) c. Differentiating both sides in (2) (3) f (x) 2c 2 + 2 3c 3 (x a) + 3 4c 4 (x a) 2 + x a < R, and setting x a this implies f (a) 2c @ To illustrate the pattern, we repeat this once more, (4) f (x) 2 3c 3 + 2 3 4c 4 (x a) + x a < R, with x a this gives f (a) 2 3c 3 c 3. This pattern will continue as we differentiate and substitute x a, that is, f (n) (a) 2 3 4 nc n c n. Solving this equation for the n th coefficient c n we have c n f (n) (a)
2 TAYLOR AND MACLAURIN SERIES 2. Taylor Series: Existence and Representation Using the convention 0! and f (0) f the formula will remain valid and we have the theorem Theorem 2.. If f has a power series representation (expansion) at a, that is, if f(x) c n (x a) n, x a < R then its coefficients are given by the formula c n f (n) (a) If we replace each of the coefficients in the power series with their formulae we see that if f has a power series expansion at a must be of the form (5) f(x) f (n) (a) (x a) n f(a) + f (a) (x a) + f (a) (x a) 2 + f (a) (x a) 3 +! 2! The series in equation (5) is called the Taylor series of the function f at a (or about a, or centered at a). For the special case a 0 the Taylor series becomes (6) f(x) f (n) (a) x n f(a) + f (a)! x + f (a) 2! x 2 + f (a) x 3 + Example 2.2. Find the Maclaurin series of the function f(x) e x and its radius of convergence. Proof. Writing f(x) e x, then f (n) (x) e x also, and f (n) (0) e 0 for all n. Thus, the Taylor series for f at 0, or Maclaurin series is f (n) (a) x n x n + x! + x2 2! + x3 + Use the Ratio test to determine the radius of convergence, with a n xn then a n+ a n x n+ (n + )! x n x n + 0 < The series converges for all x and the radius of convergence is R. The conclusion from Theorem (2.) and this example is that if e x has a power series expansion at 0, then it has the form e x x n. How do we know that e x does have a power series representation? More generally, under what circumstances is a function equal to the sum of its Taylor series? If f has derivatives of all orders, when is it true that f(x) f (n) (a) (x a) n.
TAYLOR AND MACLAURIN SERIES 3 If this is a convergent series, then f(x) is the limit of the sequence of partial sums. In the case of the Taylor series, the partial sums i f (i) (a) T n (x) (x a) i i! f(a) + f (a) (x a) + f (a) (x a) 2 + f (n) (a) (x a) n.! 2! T n is a polynomial of degree n, and we call this n th - degree Taylor polynomial of f at a. For example, for the function f(x) e x, the Taylor polynomials at 0 with n,2,and 3 are T (x) + x, T 2 (x) + x + x2 2!, T 3(x) + x + x2 x! + x3 In general, f(x) is the sum of its Taylor series if if we let f(x) lim n T n(x) R n (x) f(x) T n (x), so that f(x) T n (x) + R n (x) we have the following theorem Theorem 2.3. If f(x) T n (x) + R n (x) where T n is the n th -degree Taylor polynomial of f at a and lim R n(x) 0 n for x a < R then f is equal to the sum of its Taylor series on the interval x a < R. To show that lim n R n (x) 0 for a specific function f use the following theorem and omit the proof: Theorem 2.4. Taylor s Inequality If f (n+) (x) M for x a d then the remainder R n (x) of the Taylor series satisfies the inequality R n (x) M (n + )! x a n+ for x a d To help apply Theorems (2.3) and and (2.4) it will help to know that x n (7) lim n 0 x R 3. Some Examples Example 3.. Prove that e x is equal to the sum of its Maclaurin series. Proof. As f (n) (x) e x for all n, if d is any positive number, and x d then f (n+) (c) e x e d. Taylor s Inequality, with a 0 and M e d implies R n (x) e d (n + )! x n+, for x d The constant M e d works for every value of n, and (7) implies lim n e d (n + )! x n+ e d lim n x n+ (n + )! 0.
4 TAYLOR AND MACLAURIN SERIES The Squeeze Theorem implies that lim n R n (x) 0 and so R n (x) 0 as n for all values of x. Thus e x is equal to the sum of its Maclaurin series: e x x n (8), x R Setting x in Equation (8), we find an expression for the number e as a sum of an infinite series e x x n +! + 2! + + Example 3.2. Find the Taylor series for f(x) e x at x a. Proof. For all n f (n) (2) e 2, and so replacing a 2 in the definition of a Taylor series we find f (n) (x) (x a) n e 2 (x 2)n This Taylor series can be shown to have a radius of convergence R, and that lim n R n (x) 0 implying e x e 2 (9) (x 2)n, x R We have two power series representations for e x, one centered at the origin and the other centered at x 2. The first will be better if we are interested in values of x near 0, and the second is better if x is near 2. Example 3.3. Find the Maclaurin series for sin x and prove that it represents sin x for all x. Proof. Computing the derivatives of sin x and their values at a 0 we have f(x) sin x, f(0) 0 f (x) cos x, f (0) f (x) sin x, f (0) 0 f (x) cos x, f (0) f 4 (x) sin x, f (4) (0) 0 and the derivatives repeat in a cycle of four. The Maclaurin series is then f(0) + f (0)! x + f (0) 2! x x3 x3 x7 x 2 + f (0) x 3 + 7! + ( ) n x2n+ (2n + )!. As f (n+) (x) equals ± sin x or ± cos x then f (n+) (x), for all x, and so we can choose M for Taylor s Inequality: R n (x) M (n + )! xn+ x n+ (n + )!.
TAYLOR AND MACLAURIN SERIES 5 Equation (7) implies that as n the right hand side approaches 0, and hence R n (x) 0 by the Squeeze theorem. Therefore R n (x) 0 as n and sin x is equal to the sum of its Maclaurin series by theorem (2.3), i.e., (0) sin x ( ) n x2n+ (2n + )! Example 3.4. Find the Maclaurin series for cos x. Proof. Instead of repeating the calculation in the previous example, we can differentiate the Maclaurin series for sin x to find cos x ( ) n d ( ) x 2n+ 3x2 + 5x4 + dx (2n + )! 5! 7x6 7! x2 2! + x4 4! x6 6! + As the Maclaurin series sin x converges for all x, we know the differentiated series for cos x will also converge for all x, and so () cos x ( ) n x2n (2n)!, x R Example 3.5. Find the Maclaurin series for the function f(x) x 5 cos x Proof. We can avoid computing derivatives of this function and evaluating them at 0 by using the formula for cosine in () and multiply it by x 5 : x 5 cos x x 5 ( ) n x2n (2n)! ( ) n x2n+5 (2n)! Example 3.6. Find the Maclaurin series for f(x) ( + x) k, where k is any real number. Proof. Arranging the derivatives of f(x) and their values at x a 0 f(x) ( + x) k, f(0) f (x) k( + x) k, f (0) k f (x) k(k )( + x) k 2, f (0) k(k ) f (x) k(k )(k 2)( + x) k 3, f (0) k(k )(k 2). f (n) (x) k(k )(k 2) (k n + )( + x) k n, f (n) (0) k(k )(k 2) (k n + ). The Maclaurin series of f(x) ( + x) k is f (n) (0) k(k ) (k n + ) x n This series is called the binomial series. When k is a positive integer we recover the usual finite formula we would expect by expanding the expression. For other
6 TAYLOR AND MACLAURIN SERIES values of k, this will be an infinite series as none of the terms will reach zero. To determine convergence, we use the ratio test a n+ a n k(k ) (k n + )(k n)x n+ (n + )! k(k ) (k n + )x n k n n k x x, as n n + n + By the Ratio Test, the binomial series converges if x < and diverges if x >. It is possible to prove that ( + x) k is equal to the sum of the Maclaurin series - see Exercise 75 in section.0 of the textbook. However we will omit the proof and state this as an unproven theorem Theorem 3.7. If k is any real number and x <, then ( ) k ( + x) k x n n Where the coefficients of the binomial series are written in their traditional form: ( ) k k(k )(k 2) (k n + ) n these numbers are called binomial coefficients. In the case that n and k are natural numbers such that 0 n k then ( ) k n k! (n k)!. The question of whether a function can be represented as a power series is a subtle one. A power series can always be derived from a function, but one must prove that the power series actually equals the function. For convenience we state the power series representation of several common functions. Proposition 3.8. If there is a series representation for a function, then it is unique. The following functions are represented by the given series with their interval of convergence x (, ) x xn x R x R x R x (, ) x (, ] e x xn sin x x2n+ ( )n (2n+)! cos x x2n ( )n (2n)! ( + x) k ( k n) x n, k R ln( + x) n ( )n xn n x (, ] arctan x x2n+ ( )n 2n+ With the knowledge that there is only one possible series representation for a function we can derive power series representations for new functions by relating them to other known series, and resorting to computing the Taylor series expression when necessary.
TAYLOR AND MACLAURIN SERIES 7 Example 3.9. i) Evaluate the indefinite integral e x2 dx as an infinite series. ii) Evaluate 0 e x2 dx correct to within an error of 0.00. Proof. () To determine the Maclaurin series for this function in a quick manner, use the power series expression for e x and replace x with x 2 : ( x 2 ) n e x2 ( ) n x2n x2! + x4 2! x6 + integrating term by term gives ) e x2 dx ( x2! + x4 2! x6 + dx C + x x3 3! + x5 5 2! x7 7 + + ( )n x 2n+ (2n + ) + This series converges for all x as the original series for e x2 converges for all x. (2) The Fundamental Theorem of Calculus implies 0 ] e x2 dx [x x3 3! + x5 5 2! x7 7 + x9 9 4! 0 3 + 0 42 + 26 3 + 0 42 + 26 0.7475 Using the Alternating Series Estimation Theorem, the error involved in this approximation is less than 5! 320 < 0.00 Example 3.0. Use series to evaluate the limit x ln( + x) lim x 0 x 2 Proof. Using the power series representation for ln x this becomes x ln( + x) x n lim x 0 x 2 lim ( )n xn n x 0 x 2 n xn 2 lim ( ) x 0 n ( ) 2 2 n2 Example 3.. Find the sum of the series ( ) n π 2n+ 4 2n+ (2n+)! Proof. This series is similar to the Maclaurin series for the sine function: sin x ( ) n x2n+ (2n + )!.
8 TAYLOR AND MACLAURIN SERIES If we replace x with π 4 is sin π 4 2 we recover the original series, therefore the sum of the series 4. Multiplication and Division of Power Series If power series are added or subtracted like polynomials, it is worthwhile to consider if they can be multiplied or divided like polynomials. It can be shown that if both f(x) c n x n and g(x) b n x n converge for x < R that the series may be multiplied as if they were polynomials and the resulting series will also converge for x < R and represent f(x)g(x). For division, one requires additionally that b 0 0, and the resulting series converge for sufficiently small x. Example 4.. Find the first three non-zero terms in the Laclaurin series for () e x sin x (2) tan x. Proof. () Using the Maclaurin series for e x and sin x in Proposition 3.8, e x sin x ( + x! + x2 2! + x3 + ) ) (x x3 Multiplying these expressions and collecting like terms as if they were finite gives e x sin x x + x 2 + x3 3 + (2) Using the Maclaurin series in Proposition 3.8, we find tan x sin x cos x x x 3 + x5 5! x2 2! + x4 4! We can employ a procedure like long division And so, x + 2 x3 + 2 5 x5 + 2 x2 + 24 x4 )x 6 x3 + 20 x5 x 2 x3 + 24 x5 3 x3 30 x5 + 3 x3 6 x5 + 2 5 x5 + tan x x + 2 x3 + 2 5 x5 +