[Math] Where do the factorials come from in the Taylor series

calculustaylor expansion

Unfortunately, I don't have much detail to give here. But is the general idea to cancel out the constant obtained from taking the derivative.

For instance, say my function was $f(x)=f_0+f_1x+f_2x^2+\dotsb$

Then $f'(x)=f_1+2f_2x+\dotsb$.

And if the expansion is centered around $x=0$, then
\begin{align}f'(0)&=0 \\
f''(0)&=2f_2\\
f'''(0)&=3\cdot 2f_3.\\
\end{align}

Therefore
\begin{align}
f_0&=f(0) \\
f_1&=\frac{f'(0)}{1} \\
f_2&=\frac{f''(0)}{2}
\end{align}

And so forth. Is that where the factorial comes from?

It is quite clear for a polynomial, but what about a trig function such as $\sin(x)$ other than using Taylor's formula?

Best Answer

Start with the fundamental theorem of calculus: $$ f(x) = f(x_0) + \int_{x_0}^x f^\prime(y) \mathrm{d} y $$ and reapply it to $f'(y)$: $$ f(x) = f(x_0) + \int_{x_0}^x \left( f^\prime(x_0) + \int_{x_0}^y f^{\prime\prime}(z) \mathrm{d} z \right) \mathrm{d} y = f(x_0) +f^\prime(x_0) \int_{x_0}^x \mathrm{d} y + \underbrace{\int_{x_0}^x \left( \int_{x_0}^y f^{\prime\prime}(z) \mathrm{d} z\right)\mathrm{d} y}_{\mathcal{R}_2(x)} $$ Repeat this with $f^{\prime\prime}(z)$: $$ f(x) = f(x_0) + f^\prime(x_0) \underbrace{\int_{x_0}^x \mathrm{d} y}_{I_1(x)} + f^{\prime\prime}(x_0) \underbrace{\int_{x_0}^x \int_{x_0}^y \mathrm{d}z \mathrm{d} y}_{I_2(x)} + \underbrace{\int_{x_0}^x \int_{x_0}^y \int_{x_0}^z f(w) \mathrm{d} w \mathrm{d} z \mathrm{d} y}_{\mathcal{R}_3(x)} $$ and by continuing, we get: $$ f(x) = f(x_0) + f^\prime(x_0) \int_{x_0}^x \mathrm{d} y + \cdots + f^{(k)}(x_0) \underbrace{\int_{x_0}^{x} \int_{x_0}^{y_1} \int_{x_0}^{y_2} \cdots \int_{x_0}^{y_{k-2}} \mathrm{d} y_{k-1} \cdots\mathrm{d} y_3 \mathrm{d} y_2 \mathrm{d} y_1}_{I_k(x)} + \mathcal{R}_{k+1}(x) $$ The iterated integrals $I_k(x)$ are easy to evaluate. They can be defined recursively $$ I_0(x) = 1, \quad I_k(x) = \int_{x_0}^x I_{k-1}(y) \mathrm{d} y $$ Giving $I_k(x) = \frac{1}{k!} (x-x_0)^k$.

Related Question