Taylor and Maclaurin Series PDF

Summary

This document introduces Taylor and Maclaurin series, which are used to approximate functions by polynomials. It walks through the definition and shows examples for specific functions using Taylor/Maclaurin polynomials. This document contains mathematical concepts and is of an undergraduate level.

Full Transcript

11.10 Taylor and Maclaurin Series The idea is to obtain a good approximation to a function f ( x ) among all polynomials of degree n. There are many sensible notions of what ‘good approximation’ could mean. The notion here is that we want our approximating polynomial to share the value and first...

11.10 Taylor and Maclaurin Series The idea is to obtain a good approximation to a function f ( x ) among all polynomials of degree n. There are many sensible notions of what ‘good approximation’ could mean. The notion here is that we want our approximating polynomial to share the value and first n derivatives with f ( x ) at a point x = a. Definition. Suppose that f is a function which is n-times differentiable at x = a. The nth Taylor polynomial of f centered at x = a is the polynomial n f (k) ( a ) f 00 ( a) f 000 ( a) Tn ( x ) = ∑ k! ( x − a)k = f ( a) + f 0 ( a)( x − a) + 2! ( x − a )2 + 3! ( x − a )3 + · · · k =0 f ( n −1) ( a ) f (n) ( a ) ···+ ( x − a ) n −1 + ( x − a)n ( n − 1) ! n! Observe the following: Tn is a polynomial of degree ≤ n (it is possible to have f (n) ( a) = 0 so that Tn has degree < n). T0 ( x ) = f ( a) T1 ( x ) = f ( a) + f 0 ( a)( x − a) is the linear approximation/tangent line to y = f ( x ) at x = a. The Taylor polynomials are, essentially, higher order versions of the linear approximation. 1 1 k 1 1 k Example Let f ( x ) = e 2 x. Then f (k) ( x ) = e 2 x , so f (k) (0) = 2. The first few Taylor polynomi-   2 als of f centered at zero are therefore 1 1 1 1 1 T0 ( x ) = 1, T1 ( x ) = 1 + x, T2 ( x ) = 1 + x + 2 x2 = 1 + x + x2 2 2 2 · 2! 2 8 1 1 2 1 1 1 1 T3 ( x ) = 1 + x + x + 3 x3 = 1 + x + x2 + x3 2 8 2 · 3! 2 8 48 y More generally, 3 n 1 y = e2x 1 Tn ( x ) = ∑ 2k k! xk k =0 n=0 2 The animation shows the Taylor polyno- 1 y = Tn ( x ) mials of f ( x ) = e 2 x centered at x = 0 for n = 0, 1, 2, 3 and 4. 1 −2 −1 0 1 2 x 1 Example Let us repeat the example with f ( x ) = sin x, first centered at x = 0 and then at x = 2. π First we compute a few derivatives and spot a pattern: f 0 ( x ) = cos x, f 00 ( x ) = − sin x, f 000 ( x ) = − cos x, f (4) ( x ) = sin x,... With a little thinking, it should be clear that we have ( ( ( f (2n) ( x ) = (−1)n sin x f (2n) (0) = 0 f (2n) ( π2 ) = (−1)n =⇒ and f (2n+1) ( x ) = (−1)n cos x f (2n+1) (0) = (−1)n f (2n+1) ( π2 ) = 0 The first few Taylor polynomials centered at x = 0 are therefore 1 3 1 3 T0 ( x ) = 0, T1 ( x ) = x, T2 ( x ) = x, T3 ( x ) = x − x , T4 ( x ) = x − x 3! 3! Indeed, if 2n ≥ 2 is even, then T2n ( x ) = T2n−1 ( x ) has degree 2n − 1. In general we have n (−1)k 2k+1 1 1 1 T2n+1 ( x ) = ∑ (2k + 1)! x = x − 3! x3 + 5! x5 − 7! x7 + · · · , T2n+2 ( x ) = T2n+1 ( x ) k =0 Repeating the exercise centered at x = π 2 we obtain n (−1)k 2k 1 2 1 4 1 6 T2n ( x ) = ∑ (2k)! x − π2 = 1− 2! x − π2 + 4! x − π2 − 6! x − π2 + · · · k =0 The first few of these polynomials are animated below. y 2 y 2 y = sin x y = sin x y = T1 ( x ) 1 1 x x − π2 π π − π2 π 2 π 2 −1 −1 y = T0 ( x ) −2 −2 Centered at x = 0 Centered at x = π 2 From the pictures, it certainly seems that successive Taylor polynomials provide better approxi- mations to the original functions, with the approximation improving the closer x is to the center a. Indeed one might say that Taylor polynomials appear to fit more snugly into the curvature of the original blue curve as n increases. This reflects the fact that the first n derivatives of Tn ( x ) at x = a match those of f ( x ) and, as the following Theorem shows, this property completely characterises the Taylor polynomials. 2 Theorem (Equality of derivatives). Let Tn ( x ) be the nth Taylor polynomial of f ( x ) centered at x = a. Then: 1. The value and first n derivatives of Tn ( x ) equal those of f ( x ) at x = a. That is, for any m = 0, 1, 2,... , n, we have (m)  dm dm  Tn ( a) = f (m) ( a) alternately T n ( x ) = f ( x ) dx m x=a dx m x=a 2. Tn ( x ) is the unique degree ≤ n polynomial with the above property. Proof. 1. Note that ( dm k (k − 1) · · · (k − m + 1)( x − a)k−m if m ≤ k ( x − a)k = dx m 0 if m > k ( dm k! if m = k =⇒ ( x − a)k = dx m x=a 0 otherwise f (k) ( a ) Since the Taylor polynomial Tn ( x ) is a finite sum, and each coefficient k! is a constant, it is now immediate that n dm dm f (k) ( a ) dx m Tn ( x ) = ∑ dx m k! ( x − a )k = f (k) ( a ) x=a k =0 x=a as required. 2. Suppose that p( x ) is a degree ≤ n polynomial which shares its value and first n derivatives at x = a with f ( x ). It is a fact1 that p( x ) may be written in the form n p( x ) = ∑ ck ( x − a)k k =0 for some constants c0 ,... , cn. Similarly to our calculations above, it follows that n p(m) ( x ) = ∑ ck k(k − 1) · · · (k − m + 1)(x − a)k−m =⇒ p(m) ( a) = cm m! k=m f (m) ( a ) If p(m) ( a) = f (m) ( a) for all m ≤ n, then cm = m! and so p( x ) = Tn ( x ) is the nth Taylor polynomial of f ( x ) centered at x = a. Now that we understand Taylor polynomials, it is a small matter to consider the power series obtained by letting n → ∞. Definition. Suppose that f is infinitely differentiable at x = a. The Taylor series of f centered at x = a is the power series ∞ f (n) ( a ) T (x) = ∑ n! ( x − a)n n =0 If the center is a = 0, the Taylor series is commonly referred to as the Maclaurin Series of f. 1 To be absolutely convinced of this, you need some linear algebra... 3 Example Find the Maclaurin series of f ( x ) = sin 2x and compute its interval of convergence. This is very similar to the computation of the Taylor polynomials of y = sin x above. Just be careful of the factor of 2... If f ( x ) = sin 2x, then the derivatives of f ( x ) follow a pattern f 0 ( x ) = 2 cos 2x, f 00 ( x ) = −22 sin 2x, f 000 ( x ) = 23 cos 2x, f (4) ( x ) = −24 sin 2x,... With a little thinking, it should be clear that we have ( ( f (2n) ( x ) = (−1)n 22n sin 2x f (2n) (0) = 0 =⇒ f (2n+1) ( x ) = (−1)n 22n+1 cos 2x f (2n+1) (0) = (−1)n 22n+1 It follows that the Maclaurin series of sin 2x is ∞ ∞ f (2n+1) (0) 2n+1 (−1)n 22n+1 2n+1 T (x) = ∑ (2n + 1)! x = ∑ x n =0 n=0 (2n + 1) ! Its radius of convergence may be computed using the Ratio Test: (−1)n 22n+1 (2n + 3)! (2n + 3)(2n + 2) R = lim · = lim =∞ n→∞ n (2n + 1)! (−1) 2 + 1 2n + 3 n → ∞ 22 It follows that the Taylor series converges for all real numbers and the interval of convergence is (−∞, ∞). Common Maclaurin Series All of the following may be computed and checked exactly as in the above example. Function Maclaurin Series Interval of Convergence ∞ 1 1−x ∑ x n = 1 + x + x2 + x3 + · · · −1 < x < 1 n =0 ∞ xn 1 1 ex ∑ n! = 1 + x + x2 + x3 + · · · 2 6 (−∞, ∞) n =0 ∞ (−1)n 2n+1 1 1 5 sin x ∑ (2n + 1)! x = x − x3 + 6 120 x +··· (−∞, ∞) n =0 ∞ (−1)n 2n 1 1 cos x ∑ (2n)! x = 1 − 2 x2 + 24 x4 + · · · (−∞, ∞) n =0 ∞ (−1)n−1 n 1 1 1 ln(1 + x ) ∑ n x = x − 2 x2 + 3 x3 − 4 x4 · · · [−1, 1) n =1 Using these, you can easily find power series representations for similar functions. For example f ( x ) = e2x−4 has the following Taylor series centered at x = 2: ∞ ∞ (2x − 4)n 2n 22 23 ∑ n! = ∑ ( x − 2) n = 1 + 2( x − 2) + ( x − 2)2 + ( x − 2)3 + · · · 2 6 n =0 n=0 n! 4 Similarly, sin( x2 ) has the following Maclaurin series: ∞ ∞ (−1)n (−1)n 4n+2 1 1 10 ∑ ( 2n + 1 ) ! ( x2 )2n+1 = ∑ ( 2n + 1 ) ! x = x2 − x6 + 6 120 x +··· n =0 n =0 Both of these examples converge on the entire real line. Moreover, it is a Theorem that if a function equals a power series, then that series is the Taylor series for said function. Looking back at the previous section, we see, for example, that ∞ (−1)n 2n+1 tan−1 x = ∑ x n=0 2n + 1 where the series has interval of convergence (−1, 1]. This must be the Maclaurin series of tan−1 x. More advanced ideas There are many outstanding questions regarding Taylor polynomials and series, some of which will be addressed in later courses. For example: Does a function equal its Taylor series on the interval of convergence? How good an approximation does a Taylor polynomial provide? The answer to the first question depends on the function. For all of our common examples, the answer is yes, the argument requiring nothing more than a little differential equations. However there are plenty functions which do not equal their Taylor series. For example, a little playing with l’Hôpital’s rule should convince you that the function 2 ( e−1/x if x 6= 0 f (x) = 0 if x = 0 has every derivative f (n) (0) = 0, whence its Maclaurin series is simply T ( x ) = 0. It follows that f only equals it Maclaurin series at x = 0. An Engineer might use a Taylor polynomial approach to approximately solve a particular equa- tion. In this situation, the second question is critical. If they know, for example, that a degree 7 Taylor polynomial will approximate the exact (yet unknown) f ( x ) correct to 3 decimal places, per- haps this margin of error is small enough to safely design a structure. Without information like this, anything depending on the approximate ‘solution’ could fail. Thankfully there are several methods for estimating the error in a Taylor approximation. Suggested problems 1. Use the standard table to find the Maclaurin series for the following functions.2 (a) f ( x ) = e3x (b) g( x ) = cos(2x2 ) 2 You must be able to do this without looking at the table — it will not be given in the exam. 5 1−cos x (c) h( x ) = x2 2. Find the Maclaurin series of the given functions directly from the definitions (don’t just quote the standard table and manipulate!). (a) f ( x ) = sin(3x ) (2n−1)! (2n−1)!  (b) (Harder) g( x ) = (1 + x )1/2 you may find 1 · 3 · 5 · · · (2n − 1) = 2·4···(2n−2) = 2n −1 ( n − 1 ) !  useful. 3. (a) Use the definition to find the Taylor series for e x centered at x = 1. (b) Use the definition to find the Taylor series for sin x centered at x = 2. π (c) How could you have used the standard table of Maclaurin series to answer parts (a,b) more quickly? (d) Use your observation to find the Taylor series for sin x centered at x = 6, π without finding any derivatives! 6

Use Quizgecko on...
Browser
Browser