3.19 Taylor Series
-
Let \(f(x) = \exp(x) = e^{x}= \sum_{n=0}^{\infty}\frac{x^{n}}{n!}\)
-
Verify \(f'(x) = f(x)\).
\(f^{\prime}(x)=\left(\sum_{n=0}^{\infty}\frac{x^{n}}{n!}\right)^{\prime}=\sum_{n=0} ^{\infty}\left(\frac{x^{n}}{n!}\right)^{\prime}=\sum_{n=0}^{\infty}\frac{nx^{n-1}}{n!} =\sum_{n=0}^{\infty}\frac{x^{n-1}}{\left(n-1\right)!}=\sum_{n=0}^{\infty}\frac{x^{n}}{n!}\) 2. Use a substitution to generate the series for \(e^{-x}\) and \(e^{-x^2}\).
\(e^{-x}=\sum_{n=0}^{\infty}\frac{\left(-x\right)^{n}}{n!}=\sum_{n=0}^{\infty}\frac{\left(-1\right)^{n}x^{n}}{n!}\) and \(e^{-x^2}=\sum_{n=0}^{\infty}\frac{\left(-x^{2}\right)^{n}}{n!}=\sum_{n=0}^{\infty} \frac{\left(-1\right)^{n}x^{2n}}{n!}\) 3. Find the first 4 terms of the Taylor series for \((x-1)e^x\) near \(x=1\).
Let \(g(x)=(x-1)e^x\), then \(g'(x)=xe^x\), \(g''(x)=(x+1)e^x\), \(g'''(x)=(x+2)e^x\),..., \(g^{(N)}=(x+N-1)e^x\)
And we know \(T_{4,1}(x)=g\left(1\right)+\frac{g^{\prime}\left(1\right)}{1!}\left(x-1\right)+\frac{g^{\left(2\right)}\left(1\right)}{2!} \left(x-1\right)^{2}+\frac{g^{\left(3\right)}\left(1\right)}{3!}\left(x-1\right)^{3} +\frac{g^{\left(4\right)}\left(1\right)}{4!}\left(x-1\right)^{4}\)
\(=0+e\left(x-1\right)+e\left(x-1\right)^{2}+\frac{e}{2}\left(x-1\right)^{3}+\frac{e}{6} \left(x-1\right)^{4}=e\left(x-1\right)+e\left(x-1\right)^{2}+\frac{e}{2}\left(x-1 \right)^{3}+\frac{e}{6}\left(x-1\right)^{4}\) 4. Evaluate \(\lim_{x \to 0} \frac{e^x - 1 - x}{x^2}\).
We know \(e^{x}=1+x+\sum_{n=2}^{\infty}\frac{x^{n}}{n!}\), then \(\lim_{x\to0}\frac{e^{x}-1-x}{x^{2}}=\lim_{x\to0}\frac{\sum_{n=2}^{\infty}\frac{x^{n}}{n!}}{x^{2}} =\lim_{x\to0}\sum_{n=2}^{\infty}\frac{x^{n-2}}{n!}=\lim_{x\to0}\left(\frac{1}{2!} +\frac{x}{3!}+\cdots\right)=\frac{1}{2}\) 5. The equation \(e^{-2x} = 3x^2\) has a root near \(x=0\). Use a suitable polynomial approximation for \(e^{-2x}\) and find an approximation for the root.
Since \(e^{-2x}=\sum\frac{\left(-2x\right)^{n}}{n!}=\sum\frac{\left(-2\right)^{n}x^{n}}{n!}\), then approximate \(e^{-2x}=1-2x+2x^2\)
Hence \(1-2x+2x^{2}=3x^{2}\Rightarrow x^{2}+2x-1=0\Rightarrow x=\frac{-2\pm\sqrt{8}}{2}= 0.414\) 6. Calculate \(e^{\frac16}\) with an error smaller than \(10^{-4}\)
Consider the remainder function: \(f(x) - T_{N,a}(x) = \frac{f^{(N+1)}(c)}{(N+1)!}(x-a)^{N+1}\quad \text{for some } c \text{ between }a \text{ and }x\)
\(E_{N}\left(\frac{1}{6}\right)=\frac{e^{c}}{(N+1)!}\left(\frac{1}{6}\right)^{N+1} \leq\frac{3}{(N+1)!}\left(\frac{1}{6}\right)^{N+1}\leq10^{-4}\)
When \(N=2,E_{2}(\frac{1}{6})\leq\frac{1}{2}\cdot\frac{1}{36\times6}=\frac{1}{432}>\frac{1}{1000}\)
When \(N=3\), \(E_{3}(\frac{1}{6})\leq\frac{1}{24}\cdot\frac{1}{12\times36}=\frac{1}{144\times72} <\frac{1}{1000}\), thus we choose \(N=3\)
\(f(\frac{1}{6})\approx T_{3,0}=1+\frac{1}{6}+\frac{1}{36\times2}+\frac{1}{216\times6} =\frac{1+18+216+1296}{1296}=\frac{1531}{1296}\approx1.1813\approx e^{\frac{1}{6}}\approx 1.1814\)
-
-
Calculate \(\sin(0.2)\) with at least 4 correct decimal places
Consider the remainder function: \(f(x) - T_{N,a}(x) = \frac{f^{(N+1)}(c)}{(N+1)!}(x-a)^{N+1}\quad \text{for some } c \text{ between }a \text{ and }x\)
Then \(E_{3}(0.2)=\frac{\sin\left(c\right)}{4!}0.2^{4}\leq\frac{1}{4!}0.2^{4}\approx0.0 00067\)
Thus \(\sin(0.2)=0.2-\frac{(0.2)^{3}}{3!}\approx0.1986\)
-
Show that the function \(f(x)=x\) is integrable on \([0,1]\)
Take \(P_n\) as \(\left\lbrace0,\frac{1}{n},\frac{2}{n},\dots,\frac{n-1}{n},1\right\rbrace\).
We have that: \(x_{i} - x_{i-1}= \frac{1}{n}\) for \(i = 1, \dots, n\). \(m_{i}(f,P_{n})=\frac{i-1}{n}\) and \(M_{i}(f,P_{n})=\frac{i}{n}\)
Using the identity: \(\sum_{i=1}^{n} i = n(n+1)/2\)
\(L(f, P_n) = \sum_{i=1}^{n} \frac{i-1}{n} \frac{1}{n} = \frac{1}{n^2} \sum_{i=1}^{n} (i-1) = \frac{1}{2} (1 - \frac{1}{n})\)
\(U(f, P_n) = \sum_{i=1}^{n} \frac{i}{n} \frac{1}{n} = \frac{1}{n^2} \sum_{i=1}^{n} i = \frac{1}{2} (1 + \frac{1}{n})\)
Then \(\frac{1}{2} (1 - \frac{1}{n}) \leq L(f) \leq U(f) \leq \frac{1}{2} (1 + \frac{1}{n})\)
Letting \(n \to \infty\), \(\frac{1}{2} \leq L(f) \leq U(f) \leq \frac{1}{2}\)
Thus, \(L(f) = U(f) = \frac{1}{2}\).
-
Show that the function \(f(x) = \begin{cases} 1, & x \in \mathbb{Q} \text{ (Dirichlet's function)} \\ 0, & x \notin \mathbb{Q} \end{cases}\) is not Riemann integrable on \([0,1]\).
Let \(P\) be an arbitrary partition of \([0,1]\), \(0 = x_0 < x_1 < \dots < x_n = 1\).
\(m_i(f, P) = 0\), \(M_{i}(f, P) = 1\) (since \(\mathbb{Q}\) is dense in \(\mathbb{R}\))
Then \(L(f, P) = \sum_{i=1}^{n} m_i (x_i - x_{i-1}) = 0\), \(U(f, P) = \sum_{i=1}^{n} M_i (x_i - x_{i-1}) = 1\)
Since \(P\) is an arbitrary partition of \([0,1]\), we have that \(L(f) = 0 \quad \text{and} \quad U(f) = 1.\)
Thus, \(f\) is not integrable on \([0,1]\).
-
Suppose that \(f\) is a continuous and non-negative function defined on \([a, b]\).If the integral of \(f\) is 0, show that \(f\) is constantly zero.
Assume that \(f(c) > 0\) for some \(c \in [a, b]\).
Since \(f\) is continuous, then for \(\epsilon = \frac{f(c)}{2}\), there exists \(\delta > 0\) such that whenever \(|x - c| \leq \delta\), this implies \(|f(x) - f(c)| < \frac{f(c)}{2}\).
Then \(0 < \frac{f(c)}{2} < f(x) < \frac{3}{2} f(c) \text{ on } (c - \delta, c + \delta).\)
Now consider the partition \(P=\{a,u,v,b\}\) where \(a<c-\delta<u<v<c+\delta<b\).
Now compute the lower sum \(L(f,P)=m_{1}\left(f,p)(u-a\right)+m_{2}\left(f,p)(v-u\right)+m_{3}\left(f,p)(b-v \right.)\) \(>0\quad\text{(Exercise)}\)
\(0=\int_{a}^{b}f(x)dx=L(f)\geq L(f,P)>0\) which is a contradiction.
Thus, \(f \equiv 0\) on \([a, b]\).