13.07.2015 Views

Taylor Series

Taylor Series

Taylor Series

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Math 202Lia Vas<strong>Taylor</strong> <strong>Series</strong>If a function f(x) can be expressed as a power series centered at a, thenf(x) =∞∑n=0f (n) (a)n!(x − a) nThis series is called the <strong>Taylor</strong> series for f(x) centered at a.The sum of the first n terms of this series is called <strong>Taylor</strong> polynomial for f(x) centered ata of n-th degree. The <strong>Taylor</strong> series centered at 0 is sometimes called Maclaurin <strong>Series</strong>.Example. Find the power series expansion centered at 0 for e x . Use the <strong>Taylor</strong> polynomial ofdegree 4 to approximate the value of e with a fraction. Compare with the calculator answer.If f(x) = e x , then f ′ = f ′′ = f ′′′ = . . . = e x . The value of f and its derivatives at 0 is 1 and soe x = ∑ ∞n=01n! xn = 1 + x + x22 + x36 + . . . .The <strong>Taylor</strong> polynomial of degree 4 is p 4 (x) = 1 + x + x2 + x3 + x42 6 24the y-value e of e x . So, e x is can be approximated by p 4 (1) = 1 + 1 + 12. The x-value 1 corresponds to+ 13 + 14 = 48+12+4+1 = 65.2 6 24 24 24Note that e = 2.718... and that 65 = 2.708... So, using the polynomial approximation of just degree244, the approximation of e has the first two digits matching the exact value.Practice Problems 1. Find the power series expansion of the following functions centered atgiven point.1. x 2 − 2x + 1; x = 0 2. x 2 − 2x + 1; x = 1 3. e x ; x = 14. e 2x ; x = 0 5. xe 2x ; x = 0 6.11−x ; x = 07.11−x 2 ; x = 0 8.11+x ; x = 0 9. x1+x 2 ; x = 010. sin x; x = 0 11. sin 3x; x = 0 12. cos x; x = 0Solutions 1.1. Let f(x) = x 2 − 2x + 1. Then f(0) = 1, f ′ (0) = −2 and f ′′ (0) = 2. All the other derivativesare 0. So, the <strong>Taylor</strong> series is 1 − 2x + 2 2 x2 + 0 + 0 + . . . = 1 − 2x + x 2 . Note that this is thesame polynomial as f(x).This answer should not be surprising.expansion centered at 0.In fact, any polynomial is equal to its <strong>Taylor</strong> series2. Let f(x) = x 2 − 2x + 1. Then f(1) = 0 = f ′ (1) and f ′′ (1) = 2. So, the <strong>Taylor</strong> series expansioncentered at 1 is 0 + 0 + 2 2 (x − 1)2 + 0 + 0 + . . . = (x − 1) 2 . Note that (x − 1) 2 foils as x 2 − 2x + 1.


3. Let f(x) = e x . Then f (n) (x) = e x for any n and f (n) (1) = e. So, e x = ∑ ∞ e(x − n=0 n! 1)n =e ∑ ∞ (x−1) nn=0 .n!4. Use that e x = ∑ ∞ x n. To get the expansion for n=0 n! e2x , substitute x with 2x in the expansion ofe x . Thus e 2x = ∑ ∞ (2x) nn=0 = ∑ ∞ 2 n x nn! n=0 .n!5. To get the expansion for xe 2x , multiply the expansion for e 2x by x. So, xe 2x = x ∑ ∞ 2 n x nn=0∑ ∞n=0 2 n x n+1.n!n!=6. Let f(x) = 1 . Then f ′ = 1 , f ′′ = 2 , f ′′′ = 2·3 , ... f (n) = 1·2·3·...·n n!= . So1−x (1−x) 2 (1−x) 3 (1−x) 4 (1−x) n+1 (1−x) n+1f (n) 1(0) = n! and hence the expansion is = ∑ ∞ n!1−x n=0 n! xn = ∑ ∞n=0 x n .Alternatively, note that the formula for the sum of geometric series ∑ ∞n=0 r n = 1 gives the1−rsame answer if you put x for r.17. To get the expansion for , substitute x 2 1for x in the expansion for . So, 1∑ 1−x 2 1−x ∞n=0(x 2 ) n = ∑ ∞n=0 x 2n .18. To get the expansion for , substitute −x for x in the expansion for 1. So, 1∑ 1+x 1−x ∞n=0(−x) n = ∑ ∞n=0 (−1) n x n .x9. To get the expansion for , substitute x 2 1for x in the expansion for1+xx2 x So, = x ∑ ∞1+x 2 n=0 (−1) n (x 2 ) n = ∑ ∞n=0 (−1) n x 2n+1 .1+x1−x 2 =1+x =and multiply it by10. Note that f(x) = sin x ⇒ f ′ (x) = cos x ⇒ f ′′ (x) = − sin x ⇒ f (4) (x) = cos x ⇒ f (5) (x) = sin xand the cycle continues. The values at 0 are: 0, 1, 0, −1, 0, 1 . . . So, all the terms with even powerof x have zero coefficient. The expansion is sin x = x − x3 + x5 − x7 + . . . = ∑ ∞ (−1) n x 2n+13! 5! 7! n=0 .(2n+1)!11. To get the expansion for sin 3x, substitute 3x for x in the expansion of sin x. Hence sin 3x =3x − 33 x 3+ 35 x 5− 37 x 7+ . . . = ∑ ∞ (−1) n 3 2n+1 x 2n+13! 5! 7! n=0 .(2n+1)!12. Similar to finding expansion for sin x. In this case, all the terms with odd power of x have zerocoefficient. The expansion is cos x = 1 − x2 + x4 − x6 + . . . = ∑ ∞ (−1) n x 2n2! 4! 6! n=0 .(2n)!Differentiation and Integration of Power <strong>Series</strong>. For values of x in the interval of convergenceof power series ∑ ∞n=1 a n (x−a) n , you can differentiate and integrate the series by differentiatingand integrating each term.(d ∞)∑∞∑a n (x − a) n = a n n(x − a) n−1dxn=1∫ ( x ∑ ∞an=1a n (x − a) n )dx =n=1∞∑n=1a n(x − a) n+1n + 1The power series can also be used to evaluate integrals that cannot be expressed in terms ofelementary functions (e.g. integrals that cannot be evaluated using substitution, integration byparts or other methods of integration). Examples of such integrals include ∫ e x2 dx, ∫ sin xdx, ∫ e x dxx xetc.Practice Problems 2.


1. Find the power series expansion of the following functions centered at given point.a)1(1−x) 2 ; x = 0 b) ln(1 − x); x = 02. Evaluate the following integrals as infinite series.a) ∫ x0 ex2 dx b)∫ x0sin xxdxSolutions 2.1. a) Let f(x) = 1 . Note that f(x) is the derivative of function − 1 for which we already(1−x) 2 1−xhave the power series expansion. So, instead of finding the expansion of f using the formulafor <strong>Taylor</strong> series, it is more efficient to differentiate the series for −1 . So, −1= − ∑ ∞1−x 1−x n=0 x n ⇒f(x) = d (− ∑ ∞dx n=0 x n ) = − ∑ ∞n=0 nx n−1 ..b) Let f(x) = ln(1 − x). Then f ′ (x) = −1 = − ∑ ∞1−x n=0 x n ⇒ f(x) = ∫ x0 (− ∑ ∞n=0 x n ) dx =− ∑ ∞ ∫ xn=0 0 xn dx = − ∑ ∞ x n+1.n=0 n+12. a) Find the power series expansion of e x2 using the expansion of e x first. e x2 = ∑ ∞ x 2n. Thenn=0 n!integrate the power series to get ∫ x0 ex2 dx = ∑ ∞ x 2n+1.n=0 n!(2n+1)b) Divide the expansion for sin x by x to obtain the expansion for sin xterm by term. So, ∫ x0 sin xxx − x3 + x5 − x73·3! 5·5!dx = ∫ x0∑ ∞n=0 (−1) n x 2n(2n+1)! dx = ∑ ∞n=0(−1) n ∫ x7·7! + . . . <strong>Taylor</strong> Polynomialsand then integratex0 x2n dx= ∑ ∞ (−1) n x 2n+1=(2n+1)! n=0 (2n+1)!(2n+1)The first n + 1 terms of the <strong>Taylor</strong> series of f(x) centered at a are the approximation of f(x) byits <strong>Taylor</strong> polynomial of n-th degree centered at a:f(x) ≈ f(a) + f ′ (a)1!(x − a) + f ′′ (a)2!(x − a) 2 + . . . + f (n) (a)(x − a) n =n!n∑i=0f (i) (a)i!(x − a) iFor n = 1, this gives you the familiar formula for linear approximation of f(x) at x = a fromCalculus 1:f(x) ≈ f(a) + f ′ (a)(x − a)The <strong>Taylor</strong> series centered at 0 is sometimes called Maclaurin <strong>Series</strong>.In most applications, functions that model certain phenomena are either too complex to bemanipulated or their exact formulas are not known. In those cases, it is useful to approximatea function with its <strong>Taylor</strong> polynomial whenever possible. Calculators and software applications(including MATLAB), for example, manipulate many functions using their <strong>Taylor</strong> polynomials.Practice Problems 3.1. Find the <strong>Taylor</strong> polynomial of the given degree n centered at given point a for function f(x).


a) f(x) = e x ; a = 0; n = 4. Use to approximate e with a rational number.b) f(x) = e x ; a = 1; n = 4.c) f(x) = sin x; a = 0; n = 4. Use to approximate sin(.2) with a rational number.d) f(x) = e x sin x; a = 0; n = 3. Use to approximate e 1/2 sin 1 with a rational number.22. If f(2) = 5, f ′ (2) = 3 and f ′′ (2) = 1, approximate f(2.1).3. If f(2) = 5, f ′ (2) = 3, f ′′ (2) = 1, and f ′′′ (x) = 1 2for all x, approximate f(1.9).4. If f(1) = f ′ (1) = −1, f ′′ (1) = f ′′′ (1) = 0 and f iv (1) = 2, approximate f(1.01).Solutions 3.1. a) The <strong>Taylor</strong> polynomial is e x ≈ 1 + x + x2 + x3 + x4 . Then substitute 1 for x to approximate2 6 24e = e 1 . Obtain 1 + 1 + 1 + 1 + 1 = 24+24+12+4+1 = 65 = 2.7083. Comparing with the calculator2 6 24 24 24answer e ≈ 2.7183, you can see that just first five terms compute the first two digits correctly.b) e x ≈ e + e(x − 1) + e(x − 2 1)2 + e(x − 6 1)3 + e (x − 1)424c) The <strong>Taylor</strong> polynomial is sin x ≈ x − x3 Substitute 0.2 = 1 for x to approximate sin 1.6 5 5Obtain 1 − 1 = 149 ≈ .198666... Comparing with the calculator answer sin 1 ≈ .198669, you5 750 750 5can see that the first five decimals are correct.d) Let f(x) = e x sin x. Find the first three derivatives f ′ (x) = e x sin x + e x cos x ⇒ f ′′ (x) =e x sin x+e x cos x+e x cos x−e x sin x = 2e x cos x ⇒ f ′′′ (x) = 2e x cos x−2e x sin x. Plug 0 and getf(0) = 0, f ′ (0) = 1, f ′′ (0) = 2 and f ′′′ (0) = 2. Thus e x sin x ≈ 0 + 1x + 2 2 x2 + 2 6 x3 = x + x 2 + x3 . 3To approximate e 1/2 sin 1 substitute 1 for x in the <strong>Taylor</strong> polynomial. Obtain 1 + 1 + 1 =2 2 2 4 2419≈ .7917. Compare with the calculator answer 24 e1/2 sin 1 ≈ .7904.22. Let x = 2.1 and a = 2. The <strong>Taylor</strong> polynomial of degree 2 gives you f(2.1) ≈ f(2) +f ′ (2)(2.1 −2) + f ′′ (2)2(2.1 − 2) 2 = 5 + 3(.1) + 1 2 (.1)2 = 5.305.3. Let x = 1.9 and a = 2. Then f(1.9) ≈ f(2) + f ′ (2)(1.9 − 2) + f ′′ (2)(1.9 − 2) 2 + f ′′′ (2)(1.9 − 2) 3 =2 65 + 3(−.1) + 1 2 (−.1)2 + 112 (−.1)3 = 4.705.4. Let x = 1.01 and a = 1. Then f(1.01) ≈ f(1) + f ′ (1)(1.01 − 1) + f ′′ (1)(1.01 − 1) 2 + f ′′′ (1)(1.01 −2 61) 3 + f (4) (1)(1.01 − 1) 4 = −1 − 1(.01) + 224 24 (.01)4 = −1.00999 ≈ −1.01.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!