Mooculus calculus-2: Sequence and progression study Note 7. Taylor Series

Source: Internet
Author: User

This course (MOOCULUS-2 "sequences and Series") was taught by Ohio State University on the Coursera platform in 2014.

PDF textbook Download sequences and Series

This series of learning notes PDF download (academia.edu) MOOCULUS-2 solution

Summary

  • Given a function $f $, the series $$\sum_{n=0}^\infty {f^{(n)} (0) \over n!} X^n$$ is called the Maclaurin series for $f $, or often just the Taylor series for $f $ centered around Ze Ro.
  • Given a function $f $, the series $$\sum_{n=0}^\infty {f^{(n)} (c) \over n!} (X-C) ^n$$ is called the Taylor series for $f $ centered around $c $.
  • Taylor's theorem
    Suppose that $f $ was defined on some open interval $I = (a-r,a+r) $ around $a $ and Suppose the function $f $ is $ (n+1) $-times differentiable on $I $, meaning this $f ^{(n+1)} (x) $ exists for $x \in i$. Then for each $x the \neq a$ in $I $ there are a value $z $ between $x $ and $a $ so, $ $f (x) = \sum_{n=0}^n {f^{(n)} (a) \over n! }\, (x-a) ^n + {f^{(n+1)} (z) \over (n+1)!} (x-a) ^{n+1}.$$
  • Common functions: $ $e ^x=\sum_{n=0}^{\infty}{1\over n!} x^n=1+x+{x^2\over2!} +{x^3\over3!} +\cdots\cdots,\ \text{for all}\ x$$ $${1\over1-x}=\sum_{n=0}^{\infty}x^n=1+x+x^2+x^3+\cdots\cdots,\ \ \text{for}\ |x| < 1$$ $$\log (1+x) =\sum_{n=1}^{\infty}{( -1) ^{n-1}\over n}x^n=x-{1\over2}x^2+{1\over3}x^3+\cdots\cdots,\ \ \text{ For}\-1 < x \leq 1$$ $$\sin x=\sum_{n=0}^{\infty}{( -1) ^n\over (2n+1)!} x^{2n+1}=x-{x^3\over3!} +{x^5\over5!} +\cdots\cdots,\ \text{for all}\ x$$ $$\cos x=\sum_{n=0}^{\infty}{( -1) ^n\over (2n)!} x^{2n}=1-{x^2\over2!} +{x^4\over4!} +\cdots\cdots,\ \text{for all}\ x$$

Exercises 7.1

For each function, find the Taylor series centered at $c $, and the radius of convergence.

1. $\cos x$ around $c = 0$

Solution: $ $f (0) =\cos x\big|_{x=0}=1$$ $ $f ' (0) =-\sin x\big|_{x=0}=0$$ $ $f ' (0) =-\cos x\big|_{x=0}=-1$$ $ $f ' ' (0) =\sin x\big|_{x=0}=0$$ $ $f ^{(4)} (0) =\cos x\big|_{x=0}=1$$ $$\cdots\cdots\cdots\cdots$$ The Taylor series is $$\cos x =1-{1\over2!} x^2+{1\over4!} x^4+\cdots=\sum_{n=0}^{\infty}{( -1) ^n\over (2n)!} x^{2n}$$ and the radius of convergence is $${1\over r}=\lim_{n\to\infty}{|a_{n+1}|\over|a_n|} =\lim_{n\to\infty}{(2n)!\over (2n+2)!} =\lim_{n\to\infty}{1\over (2n+2) (2n+1)}=0$$ Thus $R =\infty$.

2. $e ^x$ around $c = 0$

Solution: $ $f (0) =e^x\big|_{x=0}=1$$ $ $f ' (0) =e^x\big|_{x=0}=1$$ $$\cdots\cdots\cdots\cdots$$ the Taylor Series is $ $e ^x=1+x+{1\over2!} X^2+\cdots=\sum_{n=0}^{\infty}{x^n\over n!} $$ the radius of convergence is $${1\over r}=\lim_{n\to\infty}{|a_{n+1}|\over|a_n|} =\lim_{n\to\infty}{n!\over (n+1)!} =\lim_{n\to\infty}{1\over n+1}=0$$ Thus $R =\infty$.

3. $1/x$ around $c =5$

Solution: $ $f (5) ={1\over x}\big|_{x=5}={1\over5}$$ $ $f ' (5) =-{1\over x^2}\big|_{x=5}=-{1\over25}$$ $ $f "(5) ={2\over x^3}\big|_{x=5}={2\over125}$$ $ $f "(5) ={-6\over x^4}\big|_{x=5}={-6\over625}$$ $$\cdots\cdots\cdots\ Cdots$$ The Taylor series is $${1\over X}={1\over5}-{1\over25} (x-5) +{1\over125} (x-5) ^2-{1\over625} (x-5) ^3+\cdots=\ sum_{n=0}^{\infty}{( -1) ^n\over5^{n+1}} (x-5) ^n$$ The radius of convergence is $${1\over r}=\lim_{n\to\infty}{|a_{n+1}| \over|a_n|} =\lim_{n\to\infty}{5^{n+1}\over5^{n+2}}={1\over5}$$ Thus $R =5$.

4. $\log x$ around $c =1$

Solution: $ $f (1) =\log x\big|_{x=1}=0$$ $ $f ' (1) ={1\over x}\big|_{x=1}=1$$ $ $f "(1) ={-1\over x^2}\big|_{x=1}= -1$$ $ $f "(1) ={2\over x^3}\big|_{x=1}=2$$ $ $f ^{(4)} (1) ={-6\over x^4}\big|_{x=1}=-6$$ $$\cdots\cdots\cdots\cdots$$ The Taylor series is $$\log x= (x-1)-{1\over2} (X-1) ^2+{1\over3} (X-1) ^3-{1\over4} (x-1) ^4+\cdots=\sum_{n=1}^{\infty}{( -1) ^{n-1}\over n} (x-1) ^n$$ The radius of convergence is $${1\over r}=\lim_{n\to\infty}{|a_{n+1}|\over|a_n|} =\lim_{n\to\infty}{n\over n+1}=1$$ Thus $R =1$.

5. $\log x$ around $c =2$

Solution: $ $f (2) =\log x\big|_{x=2}=\log2$$ $ $f ' (2) ={1\over x}\big|_{x=2}={1\over2}$$ $ $f ' (2) ={-1\over x^2} \big|_{x=2}=-{1\over4}$$ $ $f "(2) ={2\over x^3}\big|_{x=2}={1\over4}$$ $ $f ^{(4)} (2) ={-6\over x^4}\big|_{x=2}=-{3\ over8}$$ $$\cdots\cdots\cdots\cdots$$ The Taylor series is $$\log X=\log2+{1\over2} (x-2)-{1\over8} (X-2) ^2+{1\over24} ( x-2) ^3-{1\over64} (X-2) ^4\cdots=\log2+\sum_{n=1}^\infty {( -1) ^{n-1}\over n\cdot2^n} (x-2) ^n$$ the radius of Convergence is $${1\over r}=\lim_{n\to\infty}{|a_{n+1}|\over|a_n|} =\lim_{n\to\infty}{n\cdot2^n\over (n+1) \cdot2^{n+1}}={1\over2}$$ Thus $R =2$.

6. $1/x^2$ around $c =1$

Solution: $ $f (1) ={1\over x^2}\big|_{x=1}=1$$ $ $f ' (1) ={-2\over x^3}\big|_{x=1}=-2$$ $ $f "(1) ={6\over x^4}\ big|_{x=1}=6$$ $ $f ' (1) ={-24\over x^5}\big|_{x=1}=-24$$ $$\cdots\cdots\cdots\cdots$$ The Taylor series is $${1\over x^ 2}=1-2 (x-1) +3 (x-1) ^2-4 (x-1) ^3+\cdots=\sum_{n=0}^{\infty} ( -1) ^n (n+1) (x-1) ^n$$ The radius of convergence is $${1\over R }=\lim_{n\to\infty}{|a_{n+1}|\over|a_n|} =\lim_{n\to\infty}{n+2\over n+1}=1$$ Thus $R =1$.

7. $1/\sqrt{1-x}$ Around $c = 0$

Solution: $ $f (0) = (1-x) ^{-{1\over2}}\big|_{x=0}=1$$ $ $f ' (0) ={1\over2} (1-x) ^{-{3\over2}}\big|_{x=0}={1\over2}$$ $ $f "(0) ={3\ OVER4} (1-x) ^{-{5\over2}}\big|_{x=0}={3\over4}={1\cdot3\over2^2}$$ $ $f "(0) ={15\over8} (1-x) ^{-{7\over2}}\big|_{ x=0}={15\over8}={1\cdot3\cdot5\over2^3}$$ $ $f ^{(4)} (0) ={105\over16} (1-x) ^{-{9\over2}}\big|_{x=0}={105\over16}={ 1\cdot3\cdot5\cdot7\over2^4}$$ $$\cdots\cdots\cdots\cdots$$ The Taylor series is $${1\over\sqrt{1-x}}=1+{1\over2}x+{ 3\over8}x^2+{5\over16}x^3 +{35\over128}x^4+\cdots=1+\sum_{n=1}^{\infty}{1\cdot3\cdot5\cdots\cdot (2n-1) \over2^n\ CDOT n!} x^n$$ $$=1+\sum_{n=1}^{\infty}{(2n-1)!\over2^n\cdot N!\cdot2\cdot4\cdots\cdot (2n-2)}x^n$$ $$=1+\sum_{n=1}^{\infty } {(2n-1)!\over2^{2n-1}\cdot N!\cdot (n-1)!} x^n$$ the radius of convergence is $${1\over r}=\lim_{n\to\infty}{|a_{n+1}|\over|a_n|} =\lim_{n\to\infty}{(2n+1)!\over2^{2n+1}\cdot (n+1)!\cdot n!} \cdot{2^{2n-1}\cdot N!\cdot (n-1)!\over (2n-1)!} =\lim_{n\to\infty}{(2n+1) \cdot2n\over4\cdot (n+1) n}=1$$ Thus $R =1$.

8. Find the first four terms of the Taylor series for $\tan x$ centered at zero. By ' first four terms ' I mean up to and including the $x ^3$ term.

Solution: $ $f (0) =\tan x\big|_{x=0}=0$$ $ $f ' (0) =\sec^2 x\big|_{x=0}=1$$ $ $f "(0) =2\sec^2 X\cdot\tan x\big|_{x =0}=0$$ $ $f "(0) =2\cdot (2\sec x\cdot\tan x\cdot\sec x\cdot\tan x+\sec^2 x\cdot\sec^2 x) \big|_{x=0}=2$$ Thus the first fo ur terms is $$\tan x=x+{x^3\over3}$$

9. Use a combination of the Taylor series and algebraic manipulation to the find a series centered at zero for $x \cos (x^2) $.  

Solution:

We know $$\cos x=\sum_{n=0}^{\infty}{( -1) ^n\over (2n)!} x^{2n}$$ so $$\cos x^2=\sum_{n=0}^{\infty}{( -1) ^n\over (2n)!} x^{4n}$$ Thus $ $x \cos x^2=\sum_{n=0}^{\infty}{( -1) ^n\over (2n)!} x^{4n+1}$$

Use a combination of the Taylor series and algebraic manipulation to the find a series centered at zero for $xe ^{-x}$.

Solution:

We know $ $e ^x=\sum_{n=0}^{\infty}{x^n\over n!} $$ so $ $e ^{-x}=\sum_{n=0}^{\infty}{( -1) ^n\over n!} x^n$$ Thus $ $xe ^{-x}=\sum_{n=0}^{\infty}{( -1) ^n\over n!} x^{n+1}$$

Exercises 7.2

1. Find a polynomial approximation for $\cos x$ in $[0,\pi]$, accurate to $\pm 10^{-3}$.

Solution:

By Taylor's theorem, we have $$\cos x=\sum_{n=0}^n {f^{(n)} (a) \over n!} \,x^n +r_n (x) $$ where $R _n (x) ={f^{(n+1)} (z) \over (n+1)!} x^{n+1}$. So we have $$| R_n (x) |=\big| {f^{(n+1)} (z) \over (n+1)!} X^{n+1}\big| < 0.001$$ Since $|f^{(n+1)} (z) |\leq1$ and $x \in [0, \pi]$, we have $$\big| {x^{n+1}\over (n+1)!} \big|\leq\big| {{\pi}^{n+1}\over (n+1)!} \big| < 0.001$$ Computing in R:

f = function (x) pi^ (x + 1)/factorial (x + 1) for (i-0:100) {  if (f (i) < 1/1000) {    print (i)    break  } }# [1] 12

That's, the polynomial approximation is $$\cos x=1-{x^2\over2}+{x^4\over24}-{x^6\over720}+\cdots+{x^{12}\over12!} $$

2. How many terms of the series for $\log x$ centered at 1 was required so, the guaranteed error on $[1/2,3/2]$ was at Most $10^{-3}$? What if the interval is instead $[1,3/2]$?

Solution:

First, calculate the Taylor series of $\log x$ centered at 1: $ $f (1) =\log x\big|_{x=1}=0$$ $ $f ' (1) ={1\over x}\big|_{x=1}=1 $$ $ $f ' (1) ={-1\over x^2}\big|_{x=1}=-1$$ $ $f "(1) ={2\over x^3}\big|_{x=1}=2$$ $ $f ^{(4)} (1) ={-6\over x^4}\big|_{x=1 }=-6$$ $$\cdots\cdots\cdots$$ $ $f ^{(N)} (1) ={( -1) ^{n-1}\cdot (n-1)!\over x^n}\big|_{x=1}= ( -1) ^{n-1}\cdot (n-1)!$$ Thus $$\log x=\sum_{n=1}^{\infty}{( -1) ^{n-1}\over n} (x-1) ^n$$ by Taylor's theorem, we have $ $R _{n} (x) =\big| {f^{(n+1)} (z) \over (n+1)!} (x-1) ^{n+1}\big| < 0.001$$ where $x \in[{1\over2},{3\over2}]$, so $x -1\in[-{1\over2}, {1\over2}]$, we hope-maximize $R _n (x) $, that's $ $R _n (x) \leq \big| {( -1) ^{n}\cdot n!\over (n+1)!\cdot ({1\over2}) ^{n+1}}\cdot ({1\over2}) ^{n+1}\big|={1\over n+1} < 0.001\rightarrow N =1000$$ If The interval is $[1, {3\over2}]$, similarly we have $x -1\in[0, {1\over2}]$, and $ $R _n (x) \leq \big| {( -1) ^{n}\cdot n!\over (n+1)!\cdot 1^{n+1}}\cdot ({1\over2}) ^{n+1}\big|={({1\over2}) ^{n+1}\over N+1} < 0.001\ RightArrow n=7$$ R Code:

f = function (x) 0.5^ (x + 1)/(x + 1) for (i-0:1e7) {  if (f (i) < 0.001) {    print (i)    break  }}# [1] 7

3. Find the first three nonzero terms in the Taylor series for $\tan x$ on $[-\pi/4,\pi/4]$, and compute the Guaranteed ER Ror term as given by Taylor ' s theorem. (Want to use Sage or a similar aid.)

Solution: $ $f (x) =\tan x\big|_{x=0}=0$$ $ $f ' (x) =\sec^2 x\big| _{x=0}=1$$ $ $f "(x) =2\tan x\sec^2 x\big|_{x=0}=0$$ $ $f" (x) =2\sec^4x+4\tan^2x\sec^2x\big|_{x=0}=2$$ $ $f ^{(4)} (x) = 16\tan x\sec^4x+8\tan^3x\sec^2x\big|_{x=0}=0$$ $ $f ^{(5)} (x) =16\sec^6x+64\tan^2x\sec^4x+24\tan^2x\sec^4x+16\tan^ 4x\sec^2x\big|_{x=0}=16$$ Additionally, we need to calculate the $7^{\text{th}}$ derivative of $\tan x$: $ $f ^{(6)} (x) =272\ Sec^6x\tan x+416\sec^4x\tan^3x+ 32\sec^2x\tan^5x$$ $ $f ^{(7)} (x) =272\sec^8x+2880\tan^2x\sec^6x +1824\tan^4x\sec^4x+ 64\tan^6x\sec^2x$$ Thus The Taylor series is $$\tan x=x+{x^3\over3}+{2x^5\over15}+r_{n} (x) $$ where $R _n (x) ={f^{(n+1)} (Z ) \over (n+1)!} x^{n+1}$. Since $x \in[-{\pi\over4}, {\pi\over4}]$, and both of $\tan x$ and $\sec x$ is increasing on $[0, {\pi\over4}]$. We have $ $R _n (x) \leq \big| {f^{(7)} ({\pi\over4}) \over7!} \cdot ({\pi\over4}) ^7\big|={34816\over7!} \cdot ({\pi\over4}) ^7\doteq1.273437$$ Thus the error is $\pm1.273437$.

4. Prove:for all real numbers $x $, $$\cos x = \sum_{n=0}^\infty \frac{( -1) ^n}{(2n)!} x^{2n}$$

Solution:

By Taylor's theorem, we have $$\cos x=\sum_{n=0}^{n}{f^{(n)} (0) \over n!} X^n+r_n (x) $$ where $R _n (x) ={f^{(n+1)} (z) \over (n+1)!} x^{n+1}$. We need to prove this $$\lim_{n\to\infty}r_n (x) =0$$ Since the derivative of $\cos x$ is no larger than 1. So $$\big| R_n (x) \big|=\big| {f^{(n+1)} (z) \over (n+1)!} X^{n+1}\big|\leq\big| {x^{n+1}\over (n+1)!} \big|$$ and $$\lim_{n\to\infty}{d^n\over n!} =0$$ for any $d $ since $\sum_{n=0}^{\infty}{x^n\over n!} $ converges for all $x $ (by ratio test can obtain that $1/r=0$). Thus the right hand of the above inequality converges to 0 when $N $ was closing to $\infty$. That's $$\lim_{n\to\infty}r_n (x) =0$$ Therefore, $\cos x$ is euqal to its Taylor series: $$\cos x = \sum_{n=0}^\infty \fra c{( -1) ^n}{(2n)!} x^{2n}$$

5. Prove:for all real numbers $x $, $ $e ^x = \sum_{n=0}^\infty \frac{1}{n!} x^{n}$$

Solution:

This proof was quite similar to the above one. We also need to prove that $$\lim_{n\to\infty}r_n (x) =0$$ where $$\big| R_n (x) \big|=\big| {e^{n+1}\over (n+1)!} x^{n+1}\big|$$ Note that the right hand converges to 0 when $N are closing to $\infty$. Thus $ $e ^x = \sum_{n=0}^\infty \frac{1}{n!} x^{n}$$

Additional Exercises

1. Find the first four terms of Taylor series for $ $f (x) =e^{\tan x}-1$$ centered at $a =0$.

Solution: $ $f (0) =e^{\tan x}-1\big|_{x=0}=0$$ $ $f ' (0) =e^{\tan x}\cdot\sec^2x\big|_{x=0}=1$$ $ $f "(0) =e^{\ Tan X}\cdot (\sec^4x+2\sec^2x\tan x) \big|_{x=0}=1$$ $ $f "(0) =4e^{\tan X}\sec^2x\tan^2x+6e^{\tan X}\sec^4x\tan x+e^{\ Tan X}\sec^6x+2e^{\tan x}\sec^4x\big|_{x=0}=3$$ Thus its Taylor series is $$0+x+{1\over2}x^2+{1\over2}x^3+\cdots$$

2. By finding the Taylor series around x=2, rewrite the polynomial $p (x) =-4 \, x^{3}-3 \, x^{2}-3 \, x-1$ as a pol Ynomial in $x -2$.

Solution: $ $p (2) =-4x^3-3x^2-3x-1\big|_{x=2}=-51$$ $ $p ' (2) =-12x^2-6x-3\big|_{x=2}=-63$$ $ $p ' (2) =-24x-6\ big|_{x=2}=-54$$ $ $p "(2) =-24\big|_{x=2}=-24$$ Thus its Taylor series is $ $p (x) =p (2) +{p ' (2) \over1} (x-2) +{p" (2) \ over2!} (x-2) ^2+{p "(2) \over3!} (x-2) ^3$$ $$=-51-63 (x-2) -27 (x-2) ^2-4 (x-2) ^3$$

3. By considering Taylor series, evaluate $$\lim_{x \to 0} \displaystyle\frac{{\left (\sin\left (3 \, x\right) + \tan\left (3 \, X\right) \right)}^{2}}{{\left (e^{x}-1\right)} \log\left (x + 1\right)}.$$

Solution: $$\sin3x=3x-{27x^3\over6}+o (x^5) $$ $$\tan3x=3x+9x^3+o (x^5) $$ $ $e ^x-1=x+{x^2\over2}+{x^3\over6} +o (x^4) $$ $$\log (x+1) =x-{1\over2}x^2+{1\over3}x^3+o (x^4) $$ so plug on the above results we have $$\lim_{x \to 0} f (x) =\lim _{x\to0}{(6x+{9\over2}x^3+o (x^5)) ^2\over (X+{x^2\over2}+{x^3\over6}+o (x^4)) (X-{1\over2}x^2+{1\over3}x^3+o (x^4)) }=\lim_{x\to0}{36x^2+o (x^4) \over x^2+o (x^3)}=36$$

4. Estimate $\sin1$ within $1/40$.

Solution: $$\sin x=\sum_{n=0}^{n}{( -1) ^n\over (2n+1)!} X^{2n+1}+r_{n} (x) =x-{1\over3!} x^3+{1\over5!} X^5+\cdots+r_{n} (x) $$ $$\rightarrow \big| R_n (x) \big|=\big| {f^{(n+1)} (z) \over (2n+3)!} X^{2n+3}\big|\leq{x^{2n+3}\over (2n+3)!} ={1\over (2n+3)!} \leq{1\over40}$$ Thus $N =1$ is enough. And the estimation is $$\sin1=1-{1\over3!} ={5\over6}$$

5. Consider the polynomial $p (x) = \, x^{5}-x^{3} + 5 \, x$. Use the Taylor series for $\cos x$ to find a Taylor series for $f (x) = P (\cos x) $ around the point $x =0$ (up to $x ^2$ term ).

Solution: $$\cos x=\sum_{n=0}^{\infty}{( -1) ^n\over (2n)!} x^{2n}=1-{x^2\over2}+{x^4\over4!} +\cdots$$ $$\rightarrow P (\cos x) =16 (1-{x^2\over2}+o (x^4)) ^5-20 (1-{x^2\over2}+o (x^4)) ^3 +5 (1-{x^2\over2}+o (x^4) $$ $ $=16 (1-{5\over2}x^2+o (x^4)) -20 (1-{3\over2}x^2+o (x^4)) +5-{5\over2}x^2+o (x^4) $$ $$=1-{25\over2}x^2+o (x^4) $$

Mooculus calculus-2: Sequence and progression study Note 7. Taylor Series

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.