此课程(MOOCULUS-2 "Sequences and Series")由Ohio State University于2014年在Coursera平台讲授。
PDF格式教材下载 Sequences and Series
本系列学习笔记PDF下载(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 zero.
- 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$ is 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 that $f^{(N+1)}(x)$ exists for $x\in I$. Then for each $x \neq a$ in $I$ there is a value $z$ between $x$ and $a$ so that $$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 four terms are $$\tan x=x+{x^3\over3}$$
9. Use a combination of Taylor series and algebraic manipulation to 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}$$
10. Use a combination of Taylor series and algebraic manipulation to 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$ on $[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 in 0:100) { if (f(i) < 1 / 1000) { print(i) break } } # [1] 12
That is, 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 are required so that the guaranteed error on $[1/2,3/2]$ is 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 to maximize $R_n(x)$, that is $$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 in 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 error term as given by Taylor‘s theorem. (You may 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$ are 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 that $$\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$ is closing to $\infty$. That is $$\lim_{n\to\infty}R_n(x)=0$$ Therefore, $\cos x$ is euqal to its Taylor series: $$\cos x = \sum_{n=0}^\infty \frac{(-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 is 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$ is 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 polynomial 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 in 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) = 16 \, x^{5} - 20 \, 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)$$