## Continuity and limits of sequences #### Theorem Let $I$ be an open interval, $c\in I$, $f$ defined on $I$ except possibly at $c$, and $\displaystyle\lim\_{x\to c}f(x)=\ell$. Suppose $\\{a_n\\}\_{n=1}^\infty$ be a sequence with 1. all $a_n\in I$, 1. all $a_n\neq c$ or $f$ continuous at $c$, and 1. $\displaystyle\lim\_{n\to\infty}a_n=c$. Then $\displaystyle\lim\_{n\to\infty}f(a_n)=\ell$. --- ## Continuity and limits of sequences #### Theorem Let $I$ be an open interval, $c\in I$, $f$ defined on $I$ except possibly at $c$, and $\displaystyle\lim\_{x\to c}f(x)=\ell$. Suppose $\\{a_n\\}\_{n=1}^\infty$ be a sequence with 1. all $a_n\in I$, 1. all $a_n\neq c$ or $f$ continuous at $c$, and 1. $\displaystyle\lim\_{n\to\infty}a_n=c$. Then $\displaystyle\lim\_{n\to\infty}f(a_n)=\ell$. #### Example $\displaystyle \lim\_{n\to\infty}\sqrt[5]{7+\frac{3n^2-1}{5-n^2}} = \sqrt[5]{\lim\_{n\to\infty}\left[ 7+\frac{3n^2-1}{5-n^2} \right]} = \sqrt[5]{7-3} = \sqrt[5]{4}$. In the first equality, we used continuity of the fifth root function on $\mathbb R^+$ and $7+\frac{3n^2-1}{5-n^2}>0$ for all $n\in\mathbb N$. --- ## Continuity and limits of sequences #### Theorem Let $I$ be an open interval, $c\in I$, $f$ defined on $I$ except possibly at $c$, and $\displaystyle\lim\_{x\to c}f(x)=\ell$. Suppose $\\{a_n\\}\_{n=1}^\infty$ be a sequence with 1. all $a_n\in I$, 1. all $a_n\neq c$ or $f$ continuous at $c$, and 1. $\displaystyle\lim\_{n\to\infty}a_n=c$. Then $\displaystyle\lim\_{n\to\infty}f(a_n)=\ell$. #### Example $\displaystyle \lim\_{n\to\infty}\left\lvert \frac{3n+2}{7n-103} \right\rvert={}$? $\displaystyle \lim\_{n\to\infty}\cos\left( \pi + \frac{4}{n^2}\sin(n) \right)={}$? --- ## Continuity and limits of sequences #### Theorem Let $I$ be an open interval, $c\in I$, $f$ defined on $I$ except possibly at $c$, and $\displaystyle\lim\_{x\to c}f(x)=\ell$. Suppose $\\{a_n\\}\_{n=1}^\infty$ be a sequence with 1. all $a_n\in I$, 1. all $a_n\neq c$ or $f$ continuous at $c$, and 1. $\displaystyle\lim\_{n\to\infty}a_n=c$. Then $\displaystyle\lim\_{n\to\infty}f(a_n)=\ell$. #### Example $\displaystyle \lim\_{n\to\infty}\left\lvert \frac{3n+2}{7n-103} \right\rvert = \left\lvert \lim\_{n\to\infty} \frac{3n+2}{7n-103} \right\rvert = \left\lvert \frac37 \right\rvert$, because the absolute value function is continuous on $\mathbb R$, and $7n-103\neq0$ for any natural number $n$. --- ## Continuity and limits of sequences #### Theorem Let $I$ be an open interval, $c\in I$, $f$ defined on $I$ except possibly at $c$, and $\displaystyle\lim\_{x\to c}f(x)=\ell$. Suppose $\\{a_n\\}\_{n=1}^\infty$ be a sequence with 1. all $a_n\in I$, 1. all $a_n\neq c$ or $f$ continuous at $c$, and 1. $\displaystyle\lim\_{n\to\infty}a_n=c$. Then $\displaystyle\lim\_{n\to\infty}f(a_n)=\ell$. #### Example $\displaystyle \lim\_{n\to\infty}\cos\left( \pi + \frac{4}{n^2}\sin(n) \right) = \cos\left( \lim\_{n\to\infty}\left[ \pi + \frac{4}{n^2}\sin(n) \right] \right) = \cos\left( \pi + \lim\_{n\to\infty}\left[ \frac{4}{n^2}\sin(n) \right] \right) = \cos(\pi+0)=-1$, using continuity of cosine on $\mathbb R$, and we can use the squeeze theorem to evaluate the final limit. --- ## Exchanging limits #### Experiment
Evaluate $\displaystyle \lim\_{x\to0^+} \left( \lim\_{y\to0^+} \left( x^y \right) \right)$ Evaluate $\displaystyle \lim\_{y\to0^+} \left( \lim\_{x\to0^+} \left( x^y \right) \right)$
--- ## Exchanging limits #### Experiment
Evaluate $\displaystyle \lim\_{x\to0^+} \left( \lim\_{y\to0^+} \left( x^y \right) \right)$ Evaluate $\displaystyle \lim\_{y\to0^+} \left( \lim\_{x\to0^+} \left( x^y \right) \right)$
$\displaystyle = \lim\_{x\to0^+} \left( x^0 \right) = \lim\_{x\to0^+} \left( 1 \right) = 1 \vphantom{\left(\lim\_{y\to0^+}\right)}$. $\displaystyle = \lim\_{y\to0^+} \left( 0^y \right) = \lim\_{y\to0^+} \left( 0 \right) = 0 \vphantom{\left(\lim\_{x\to0^+}\right)}$.
So there is danger in exchanging limits. --- ## Exchanging limits #### Experiment
Evaluate $\displaystyle \lim\_{x\to0^+} \left( \lim\_{y\to0^+} \left( x^y \right) \right)$ Evaluate $\displaystyle \lim\_{y\to0^+} \left( \lim\_{x\to0^+} \left( x^y \right) \right)$
$\displaystyle = \lim\_{x\to0^+} \left( x^0 \right) = \lim\_{x\to0^+} \left( 1 \right) = 1 \vphantom{\left(\lim\_{y\to0^+}\right)}$. $\displaystyle = \lim\_{y\to0^+} \left( 0^y \right) = \lim\_{y\to0^+} \left( 0 \right) = 0 \vphantom{\left(\lim\_{x\to0^+}\right)}$.
So there is danger in exchanging limits. To resolve the question > When can we exchange limits? we need the concept of uniform continuity; see MATH2350. --- ## Power series #### Definition If $a\in\mathbb R$ and $\\{c_n\\}\_{n=0}^\infty$ is a sequence of real numbers, then the function of $x$ given by $\displaystyle \sum\_{n=0}^\infty c_n (x-a)^n$ is a *power series centred at* $a$. Often $a=0$. --- ## Power series #### Definition If $a\in\mathbb R$ and $\\{c_n\\}\_{n=0}^\infty$ is a sequence of real numbers, then the function of $x$ given by $\displaystyle \sum\_{n=0}^\infty c_n (x-a)^n$ is a *power series centred at* $a$. Often $a=0$. The power series may converge for some $x$ and diverge for others. #### Example $\displaystyle \sum\_{n=0}^\infty \frac{x^n}{3^n}$ converges for $\lvert x \rvert \lt 3$ and diverges for $\lvert x \rvert \geqslant 3$. --- ## Power series #### Definition If $a\in\mathbb R$ and $\\{c_n\\}\_{n=0}^\infty$ is a sequence of real numbers, then the function of $x$ given by $\displaystyle \sum\_{n=0}^\infty c_n (x-a)^n$ is a *power series centred at* $a$. Often $a=0$. The power series may converge for some $x$ and diverge for others. #### Example $\displaystyle \sum\_{n=0}^\infty \frac{x^n}{3^n}$ converges for $\lvert x \rvert \lt 3$ and diverges for $\lvert x \rvert \geqslant 3$. Proof: $\displaystyle \left\lvert\frac{x^{n+1}/3^{n+1}}{x^n/3^n}\right\rvert = \frac{\lvert x\rvert}3 \underset{n\to\infty}\longrightarrow \frac{\lvert x\rvert}3$. Hence, by the ratio test, the power series converges for $\lvert x \rvert \lt 3$ and diverges for $\lvert x \rvert \gt 3$. If $\lvert x \rvert = 3$, then the power series is $1+1+1+\ldots$ or $1-1+1-\ldots$, both of which diverge. --- ## Power series #### Definition If $a\in\mathbb R$ and $\\{c_n\\}\_{n=0}^\infty$ is a sequence of real numbers, then the function of $x$ given by $\displaystyle \sum\_{n=0}^\infty c_n (x-a)^n$ is a *power series centred at* $a$. Often $a=0$. The power series may converge for some $x$ and diverge for others. The ratio test is good for telling us whether a power series converges. --- ## Power series #### Definition If $a\in\mathbb R$ and $\\{c_n\\}\_{n=0}^\infty$ is a sequence of real numbers, then the function of $x$ given by $\displaystyle \sum\_{n=0}^\infty c_n (x-a)^n$ is a *power series centred at* $a$. Often $a=0$. The power series may converge for some $x$ and diverge for others. The ratio test is good for telling us whether a power series converges. #### Theorem For any power series centred at $a$, there exists a unique $R \geqslant 0$ (possibly $R=\infty$) such that the power series converges for $x\in(a-R,a+R)$ and diverges for $\lvert x-a \rvert>R$. The $R$ is called the *radius of convergence* of the power series. #### Proof Do the ratio test. --- ## Power series #### Definition If $a\in\mathbb R$ and $\\{c_n\\}\_{n=0}^\infty$ is a sequence of real numbers, then the function of $x$ given by $\displaystyle \sum\_{n=0}^\infty c_n (x-a)^n$ is a *power series centred at* $a$. Often $a=0$. The power series may converge for some $x$ and diverge for others. The ratio test is good for telling us whether a power series converges. #### Theorem For any power series centred at $a$, there exists a unique $R \geqslant 0$ (possibly $R=\infty$) such that the power series converges for $x\in(a-R,a+R)$ and diverges for $\lvert x-a \rvert>R$. The $R$ is called the *radius of convergence* of the power series. #### Limitation of above theorem This does not decide convergence at $x=a\pm R$. Often difficult. The ratio test will not help. --- ## Power series #### Theorem For any power series centred at $a$, there exists a unique $R \geqslant 0$ (possibly $R=\infty$) such that the power series converges for $x\in(a-R,a+R)$ and diverges for $\lvert x-a \rvert>R$. The $R$ is called the *radius of convergence* of the power series. #### Example
Find the interval on which $\displaystyle \sum\_{n=2}^\infty \frac{x^n}{3^nn}$ converges. Find the interval on which $\displaystyle \sum\_{n=2}^\infty \frac{(x-5)^n}{3^nn^2}$ converges. Find the interval on which $\displaystyle \sum\_{n=2}^\infty \frac{n(x+1)^n}{3^n}$ converges.
--- ## Power series #### Theorem For any power series centred at $a$, there exists a unique $R \geqslant 0$ (possibly $R=\infty$) such that the power series converges for $x\in(a-R,a+R)$ and diverges for $\lvert x-a \rvert>R$. The $R$ is called the *radius of convergence* of the power series. #### Example
Find the interval on which $\displaystyle \sum\_{n=2}^\infty \frac{x^n}{3^nn}$ converges. Find the interval on which $\displaystyle \sum\_{n=2}^\infty \frac{(x-5)^n}{3^nn^2}$ converges. Find the interval on which $\displaystyle \sum\_{n=2}^\infty \frac{n(x+1)^n}{3^n}$ converges.
Answer: $\displaystyle [-3,3) \vphantom{\sum\_{n=2}^\infty \frac{x^n}{3^nn}}$. Answer: $\displaystyle [2,8] \vphantom{\sum\_{n=2}^\infty \frac{(x-5)^n}{3^nn^2}}$. Answer: $\displaystyle (-4,2) \vphantom{\sum\_{n=2}^\infty \frac{n(x+1)^n}{3^n}}$.
--- ## Are power series continuous? Polynomials are continuous functions, and power series look like "infinite polynomials", so maybe they are? But they can only be continuous within their open interval of convergence. Let's try: Suppose $y\in(-R,R)$. $\displaystyle \lim\_{x\to y} \sum\_{n=1}^\infty c_n x^n \overset{\text{?}}= \sum\_{n=1}^\infty c_n \lim\_{x\to y}(x^n) = \sum\_{n=1}^\infty c_n y^n$, using continuity of the $n$
th
power function. --- ## Are power series continuous? Polynomials are continuous functions, and power series look like "infinite polynomials", so maybe they are? But they can only be continuous within their open interval of convergence. Let's try: Suppose $y\in(-R,R)$. $\displaystyle \lim\_{x\to y} \sum\_{n=1}^\infty c_n x^n \overset{\text{?}}= \sum\_{n=1}^\infty c_n \lim\_{x\to y}(x^n) = \sum\_{n=1}^\infty c_n y^n$, using continuity of the $n$
th
power function. But really $\displaystyle \sum\_{n=1}^\infty c_n x^n = \lim\_{k\to\infty} \sum\_{n=1}^k c_n x^n$, so we have done $$ \lim\_{x\to y} \sum\_{n=1}^\infty c_n x^n = \lim\_{x\to y} \lim\_{k\to\infty} \sum\_{n=1}^k c_n x^n \overset{\text{?}}= \lim\_{k\to\infty} \lim\_{x\to y} \sum\_{n=1}^k c_n x^n = \lim\_{k\to\infty} \sum\_{n=1}^k c_n \lim\_{x\to y} x^n = \sum\_{n=1}^\infty c_n \lim\_{x\to y}(x^n) $$ an interchange of limits. --- ## Are power series continuous? Polynomials are continuous functions, and power series look like "infinite polynomials", so maybe they are? But they can only be continuous within their open interval of convergence. Let's try: Suppose $y\in(-R,R)$. $\displaystyle \lim\_{x\to y} \sum\_{n=1}^\infty c_n x^n \overset{\text{?}}= \sum\_{n=1}^\infty c_n \lim\_{x\to y}(x^n) = \sum\_{n=1}^\infty c_n y^n$, using continuity of the $n$
th
power function. But really $\displaystyle \sum\_{n=1}^\infty c_n x^n = \lim\_{k\to\infty} \sum\_{n=1}^k c_n x^n$, so we have done $$ \lim\_{x\to y} \sum\_{n=1}^\infty c_n x^n = \lim\_{x\to y} \lim\_{k\to\infty} \sum\_{n=1}^k c_n x^n \overset{\text{?}}= \lim\_{k\to\infty} \lim\_{x\to y} \sum\_{n=1}^k c_n x^n = \lim\_{k\to\infty} \sum\_{n=1}^k c_n \lim\_{x\to y} x^n = \sum\_{n=1}^\infty c_n \lim\_{x\to y}(x^n) $$ an interchange of limits. And we know we can't always interchange limits. --- ## Are power series continuous? Polynomials are continuous functions, and power series look like "infinite polynomials", so maybe they are? But they can only be continuous within their open interval of convergence. #### Theorem Let $\displaystyle f(x) = \sum\_{n=0}^\infty c_n(x-a)^n$ a power series with radius of convergence $R$. Then $f$ is differentiable on $(a-R,a+R)$ and $$ f'(x) = \sum\_{n=1}^\infty nc_n(x-a)\^{n-1} = \sum\_{n=0}^\infty (n+1)c\_{n+1}(x-a)^n. $$ Proof: Uses uniform continuity; see MATH2350. #### Conclusion So yes, power series $f$ is continuous, and even differentiable! --- ## Term by term differentiation of a power series #### Theorem Let $\displaystyle f(x) = \sum\_{n=0}^\infty c_n(x-a)^n$ a power series with radius of convergence $R$. Then $f$ is differentiable on $(a-R,a+R)$ and $$ f'(x) = \sum\_{n=1}^\infty nc_n(x-a)\^{n-1} = \sum\_{n=0}^\infty (n+1)c\_{n+1}(x-a)^n. $$ #### Example If $\displaystyle f(x) = \sum\_{n=2}^\infty \frac{(x-5)^n}{3^nn^2}$ on $[2,8]$, then $\displaystyle f'(x) = \sum\_{n=2}^\infty \frac{(x-5)^{n-1}}{3^nn}$ on $(2,8)$. The theorem does not tell us whether the power series converges or diverges at $x=2$ or $x=8$. But certainly it does not converge to $f'(2)$ or $f'(8)$ because they do not exist. --- ## Term by term differentiation of a power series #### Theorem Let $\displaystyle f(x) = \sum\_{n=0}^\infty c_n(x-a)^n$ a power series with radius of convergence $R$. Then $f$ is differentiable on $(a-R,a+R)$ and $$ f'(x) = \sum\_{n=1}^\infty nc_n(x-a)\^{n-1} = \sum\_{n=0}^\infty (n+1)c\_{n+1}(x-a)^n. $$ #### Example Find the radius of convergence and derivative of $\displaystyle f(x) = \sum\_{n=0}^\infty \frac{x^n}{n!}$. Recall: $0!=1$ by definition. --- ## Term by term differentiation of a power series #### Example Find the radius of convergence and derivative of $\displaystyle f(x) = \sum\_{n=0}^\infty \frac{x^n}{n!}$. Recall: $0!=1$ by definition. #### Solution $\displaystyle \left\lvert\frac{x\^{n+1}/(n+1)!}{x^n/n!}\right\rvert = \frac{\lvert x \rvert}{n+1} \underset{n\to\infty}\longrightarrow 0$, for all $x\in\mathbb R$. So, by the ratio test, $f(x)$ converges for all $x\in(-\infty,\infty)$. In other words, the radius of convergence is $R=\infty$. --- ## Term by term differentiation of a power series #### Example Find the radius of convergence and derivative of $\displaystyle f(x) = \sum\_{n=0}^\infty \frac{x^n}{n!}$. Recall: $0!=1$ by definition. #### Solution $\displaystyle \left\lvert\frac{x\^{n+1}/(n+1)!}{x^n/n!}\right\rvert = \frac{\lvert x \rvert}{n+1} \underset{n\to\infty}\longrightarrow 0$, for all $x\in\mathbb R$. So, by the ratio test, $f(x)$ converges for all $x\in(-\infty,\infty)$. In other words, the radius of convergence is $R=\infty$. Therefore, by the differentiation of power series theorem, $$ f'(x) = \sum\_{n=1}^\infty \frac{x\^{n-1}n}{n!} = \sum\_{n=1}^\infty \frac{x\^{n-1}}{(n-1)!} = \sum\_{n=0}^\infty \frac{x^n}{n!} = f(x) \qquad \text{on }(-\infty,\infty). $$ --- ## Term by term differentiation of a power series #### Example Find the radius of convergence and derivative of $\displaystyle f(x) = \sum\_{n=0}^\infty \frac{x^n}{n!}$. Recall: $0!=1$ by definition. #### Solution $$ f'(x) = \sum\_{n=1}^\infty \frac{x\^{n-1}n}{n!} = \sum\_{n=1}^\infty \frac{x\^{n-1}}{(n-1)!} = \sum\_{n=0}^\infty \frac{x^n}{n!} = f(x) \qquad \text{on }(-\infty,\infty). $$ We can calculate $f(0)= \frac1{0!} = 1$. --- ## Term by term differentiation of a power series #### Example Find the radius of convergence and derivative of $\displaystyle f(x) = \sum\_{n=0}^\infty \frac{x^n}{n!}$. Recall: $0!=1$ by definition. #### Solution $$ f'(x) = \sum\_{n=1}^\infty \frac{x\^{n-1}n}{n!} = \sum\_{n=1}^\infty \frac{x\^{n-1}}{(n-1)!} = \sum\_{n=0}^\infty \frac{x^n}{n!} = f(x) \qquad \text{on }(-\infty,\infty). $$ We can calculate $f(0)= \frac1{0!} = 1$. Therefore $f(x) = \mathrm{e}^x$. --- ## Term by term differentiation of a power series #### Example Find the radius of convergence and derivative of $\displaystyle f(x) = \sum\_{n=0}^\infty \frac{x^n}{n!}$. Recall: $0!=1$ by definition. #### Solution $$ f'(x) = \sum\_{n=1}^\infty \frac{x\^{n-1}n}{n!} = \sum\_{n=1}^\infty \frac{x\^{n-1}}{(n-1)!} = \sum\_{n=0}^\infty \frac{x^n}{n!} = f(x) \qquad \text{on }(-\infty,\infty). $$ We can calculate $f(0)= \frac1{0!} = 1$. Therefore $f(x) = \mathrm{e}^x$. In fact this is actually a good *definition* of $\mathrm{e}^x$, because otherwise what does $\mathrm{e}^\pi$ mean? --- ## Taylor series #### Definition If $f$ is infinitely differentiable at $a$, then the *Taylor series for $f(x)$ at $x=a$* is $\displaystyle \sum\_{n=0}^\infty \frac{f\^{(n)}(a)}{n!}(x-a)^n$. --- ## Taylor series ### (Maclaurin's version) #### Definition If $f$ is infinitely differentiable at $a$, then the *Taylor series for $f(x)$ at $x=a$* is $\displaystyle \sum\_{n=0}^\infty \frac{f\^{(n)}(a)}{n!}(x-a)^n$. #### Definition If $f$ is infinitely differentiable at $0$, then the *Maclaurin series for $f$* is the Taylor series for $f(x)$ at $x=0$: the function $\displaystyle \sum\_{n=0}^\infty \frac{f\^{(n)}(0)}{n!}x^n$. --- ## Taylor series #### Definition If $f$ is infinitely differentiable at $a$, then the *Taylor series for $f(x)$ at $x=a$* is $\displaystyle \sum\_{n=0}^\infty \frac{f\^{(n)}(a)}{n!}(x-a)^n$. #### Example 1 If $\displaystyle f(x) = \mathrm{e}^x$, then $f'(x) = f(x)$, so $f\^{(n)}(0)=1$ for all $n\in\mathbb N\cup\{0\}$. Therefore, the Taylor series for $f$ at $0$ converges on $(-\infty,\infty)$, and it converges to $f$ there. [Excel file demonstrating Taylor series of exp](https://nc.dasmithmaths.com/index.php/s/xiGSBG99CWgzW9G) --- ## Taylor series #### Definition If $f$ is infinitely differentiable at $a$, then the *Taylor series for $f(x)$ at $x=a$* is $\displaystyle \sum\_{n=0}^\infty \frac{f\^{(n)}(a)}{n!}(x-a)^n$. #### Example 1 If $\displaystyle f(x) = \mathrm{e}^x$, then $f'(x) = f(x)$, so $f\^{(n)}(0)=1$ for all $n\in\mathbb N\cup\{0\}$. Therefore, the Taylor series for $f$ at $0$ converges on $(-\infty,\infty)$, and it converges to $f$ there. The Taylor/Maclaurin series may not converge at all, and may not converge to $f(x)$. #### Example 2 If $\displaystyle f(x) = \begin{cases} \mathrm{e}^x & \text{if } x\leqslant1 \\\\ \mathrm{e}(2-x) & \text{if } x\gt1 \end{cases}$, then the Taylor series for $f$ converges everywhere, but not to $f$; see spreadsheet. --- ## Taylor series #### Definition If $f$ is infinitely differentiable at $a$, then the *Taylor series for $f(x)$ at $x=a$* is $\displaystyle \sum\_{n=0}^\infty \frac{f\^{(n)}(a)}{n!}(x-a)^n$. #### Example 3 Let $\displaystyle f(x)=e\^{-1/x^2}$. This is defined and infinitely differentiable everywhere except at $x=0$. We can fix this by redefining $\displaystyle f(x) = \begin{cases} 0 & \text{if } x=0, \\\\ e\^{-1/x^2} & \text{otherwise.} \end{cases}$ [Let's look at the derivatives of this function.](https://nc.dasmithmaths.com/index.php/s/zEAGSfR9z3os2gg) --- ## Taylor series #### Definition If $f$ is infinitely differentiable at $a$, then the *Taylor series for $f(x)$ at $x=a$* is $\displaystyle \sum\_{n=0}^\infty \frac{f\^{(n)}(a)}{n!}(x-a)^n$. #### Example 3 Let $\displaystyle f(x)=e\^{-1/x^2}$. This is defined and infinitely differentiable everywhere except at $x=0$. We can fix this by redefining $\displaystyle f(x) = \begin{cases} 0 & \text{if } x=0, \\\\ e\^{-1/x^2} & \text{otherwise.} \end{cases}$ It can be shown that $f\^{(n)}(0)=0$ for all $n\in\mathbb N\cup\\{0\\}$. Proof: by induction, $\displaystyle f\^{(n)}(x) = \begin{cases} 0 & \text{if } x=0, \\\\ e\^{-1/x^2}P_n(x) & \text{otherwise,} \end{cases}$
for $P_0(x)=1$ and $P_n(x) = 2x\^{-3}P\_{n-1}(x)+P'\_{n-1}(x)$. --- ## Taylor series #### Definition If $f$ is infinitely differentiable at $a$, then the *Taylor series for $f(x)$ at $x=a$* is $\displaystyle \sum\_{n=0}^\infty \frac{f\^{(n)}(a)}{n!}(x-a)^n$. #### Example 3 Let $\displaystyle f(x)=e\^{-1/x^2}$. This is defined and infinitely differentiable everywhere except at $x=0$. We can fix this by redefining $\displaystyle f(x) = \begin{cases} 0 & \text{if } x=0, \\\\ e\^{-1/x^2} & \text{otherwise.} \end{cases}$ It can be shown that $f\^{(n)}(0)=0$ for all $n\in\mathbb N\cup\\{0\\}$. So the Maclaurin series for $f(x)$ converges and is the constant function $0$, which is not $f(x)$. --- ## Taylor series #### Definition If $f$ is infinitely differentiable at $a$, then the *Taylor series for $f(x)$ at $x=a$* is $\displaystyle \sum\_{n=0}^\infty \frac{f\^{(n)}(a)}{n!}(x-a)^n$. So we do have to be careful with Taylor series. 📷 For a Taylor series at $a$ to exist and be useful, we have to know: * $f\^{(n)}(a)$ exists for all $n\in\mathbb N\cup\\{0\\}$.
Calculus, MATH2340
* The Taylor series converges on $(a-R,a+R)$ for some $R$ large enough for our application.
MATH2340
* The Taylor series converges to $f(x)$ on that interval.
MATH2350
We may also want: * The Taylor series converges fast enough.
Asymptotic analysis
--- ## Taylor series #### Definition If $f$ is infinitely differentiable at $a$, then the *Taylor series for $f(x)$ at $x=a$* is $\displaystyle \sum\_{n=0}^\infty \frac{f\^{(n)}(a)}{n!}(x-a)^n$. So we do have to be careful with Taylor series. 📷 For a Taylor series at $a$ to exist and be useful, we have to know: * $f\^{(n)}(a)$ exists for all $n\in\mathbb N\cup\\{0\\}$.
Calculus, MATH2340
* The Taylor series converges on $(a-R,a+R)$ for some $R$ large enough for our application.
MATH2340
* The Taylor series converges to $f(x)$ on that interval.
MATH2350
We may also want: * The Taylor series converges fast enough.
Asymptotic analysis
--- ## Taylor series 📷 For a Taylor series at $a$ to exist and be useful, we have to know: * $f\^{(n)}(a)$ exists for all $n\in\mathbb N\cup\\{0\\}$.
Calculus, MATH2340
* The Taylor series converges on $(a-R,a+R)$ for some $R$ large enough for our application.
MATH2340
* The Taylor series converges to $f(x)$ on that interval.
MATH2350
We may also want: * The Taylor series converges fast enough.
Asymptotic analysis
#### Exercise Assess how fast the Maclaurin series for sin converges using [this spreadsheet](https://nc.dasmithmaths.com/index.php/s/xiGSBG99CWgzW9G). --- ## Taylor series 📷 For a Taylor series at $a$ to exist and be useful, we have to know: * $f\^{(n)}(a)$ exists for all $n\in\mathbb N\cup\\{0\\}$.
Calculus, MATH2340
* The Taylor series converges on $(a-R,a+R)$ for some $R$ large enough for our application.
MATH2340
* The Taylor series converges to $f(x)$ on that interval.
MATH2350
We may also want: * The Taylor series converges fast enough.
Asymptotic analysis
#### Exercise Assess how fast the Maclaurin series for sin converges using [this spreadsheet](https://nc.dasmithmaths.com/index.php/s/xiGSBG99CWgzW9G). #### Conclusion For $x\in(-0.1,0.1)$ very fast. But for $x\in(-10,10)$ quite slowly. --- ## Application of Taylor series The Maclaurin series for $\sin(x)$ is $\displaystyle \sum\_{\substack{n=0 \\\\ n \text{ odd}}}^\infty \frac{(-1)\^{\frac{n-1}2}}{n!}x^n$. It converges to $\sin(x)$ on $(-\infty,\infty)$. #### Exercise Evaluate $\displaystyle \lim\_{x\to0} \frac{\sin(x)}x$. Evaluate $\displaystyle \lim\_{x\to0} \frac{\mathrm e^x - 1 - x}{x^2}$. Think carefully about what we need to know about the relevant Taylor series to make this argument. --- ## Application of Taylor series The Maclaurin series for $\sin(x)$ is $\displaystyle \sum\_{\substack{n=0 \\\\ n \text{ odd}}}^\infty \frac{(-1)\^{\frac{n-1}2}}{n!}x^n$. It converges to $\sin(x)$ on $(-\infty,\infty)$. #### Exercise Evaluate $\displaystyle \lim\_{x\to0} \frac{\sin(x)}x$. Evaluate $\displaystyle \lim\_{x\to0} \frac{\mathrm e^x - 1 - x}{x^2}$. Think carefully about what we need to know about the relevant Taylor series to make this argument. The limits are $1$ and $\frac12$. You only need to know that there is some (possibly very small) $\varepsilon>0$ such that the Maclaurin series converge on $(-\varepsilon,\varepsilon)$. It does not matter how fast. --- ## Application of Taylor series We want to cut a curve of shape approximately $f(x)=\frac1{1-x}$ for $x\in[-3,\frac12]$, but the cutting machine only accepts polynomial functions. Can we use a polynomial truncation of the Maclaurin series for $f$? #### Exercise Calculate the first few coefficients of the Maclaurin series. Hypothesise the general formula for the coefficients. Then either: * prove the formula by induction, or * use [the spreadsheet](https://nc.dasmithmaths.com/index.php/s/zsn82EADec9rjf5) to evaluate the first few polynomial truncations of the Maclaurin series Conclude. --- ## Application of Taylor series We want to cut a curve of shape approximately $f(x)=\frac1{1-x}$ for $x\in[-3,\frac12]$, but the cutting machine only accepts polynomial functions. Can we use a polynomial truncation of the Maclaurin series for $f$? #### Exercise Calculate the first few coefficients of the Maclaurin series. Hypothesise the general formula for the coefficients. Then either: * prove the formula by induction, or * use [the spreadsheet](https://nc.dasmithmaths.com/index.php/s/zsn82EADec9rjf5) to evaluate the first few polynomial truncations of the Maclaurin series Conclude. The coefficients are all $1$. The Maclaurin polynomials are not a good approximation for $x<-1$. In fact, the Maclaurin series diverges for $x<-1$.