\chapter{Taylor Series} The long polynomial from the last module is actually called a Taylor series about $x=0$ (this is referred to as a Maclaurin series in some textbooks, but this course will use the term Taylor series). The last module gave the Taylor series for $e^x, \sin x$, and $\cos x$. The logical next question is to ask whether every function has a Taylor series. The answer is that most reasonable functions, and almost all of the functions encountered in this course, have a Taylor series. That is, every reasonable function $f$ can be written as $$ f(x)=\sum_{k=0}^{\infty} c_k x^k=c_0+c_1 x+c_2 x^2+\cdots . $$ This module describes how to compute the coefficients $c_k$ for a given function $f$. The definition of a Taylor series at $\mathbf{x}=\mathbf{0}$ The definition of the Taylor series of $f$ at $x=0$ is The definition of the Taylor series of $f$ at $x=0$ is noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black] \begin{tcolorbox}[colback=red!15!white,colframe=red!75!black] Taylor series at $x=0$ \end{tcolorbox} $$ f(x)=f(0)+\frac{f^{\prime}(0)}{1!} x+\frac{f^{\prime \prime}(0)}{2!} x^2+\frac{f^{\prime \prime \prime}(0)}{3!} x^3+\cdots=\sum_{k=0}^{\infty} \frac{f^{(k)}(0)}{k!} x^k $$ where $f^{(k)}(0)$ is the $k$ th derivative of $f$ evaluated at 0 . In other words, the coefficient $c_k$ mentioned above is given by $$ c_k=\frac{f^{(k)}(0)}{k!}=\left.\frac{1}{k!} \cdot \frac{d^k f}{d x^k}\right|_0 $$ \end{tcolorbox} This seems circular, since the definition uses the function, and its derivatives, to write down the function. However, the definition only actually requires information about the function at a single point (in this case, 0 ). It is best to think of the Taylor series as a way of turning a function into a polynomial. Example Compute the Taylor series for $e^x$ using the above definition to see that it matches the given series from the last module. \textbf{Answer} noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black] Here, $f(x)=e^x$, and every derivative of $e^x$ is $e^x$. Therefore, for all $k$ we have $$ f^{(k)}(x)=e^x $$ and so $f^{(k)}(0)=1$ for all $k$. Plugging into the Taylor series formula gives $$ \begin{aligned} f(x) & =\sum_{k=0}^{\infty} \frac{f^{(k)}(0)}{k!} x^k \\ & =\sum_{k=0}^{\infty} \frac{x^k}{k!} \\ & =1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\cdots \end{aligned} $$ as claimed. \end{tcolorbox}