Simplest proof of Taylor's theorem
Solution 1:
Here is an approach that seems rather natural, based on applying the fundamental theorem of calculus successively to $f(x)$, $f'(t_1)$, $f''(t_2)$, etc.: \begin{eqnarray*} && f(x)=f(a)+\int_a^x f'(t_1)\,dt_1 \\&& = f(a)+ \int_a^x f'(a)\,dt_1 + \int_a^x \!\! \int_a^{t_1} f''(t_2)\,dt_2\,dt_1 \\&& = f(a)+ \int_a^x f'(a)\,dt_1 + \int_a^x \!\! \int_a^{t_1} f''(a) \,dt_2\,dt_1 +\int_a^x \!\! \int_a^{t_1} \!\! \int_a^{t_2} f'''(t_3) \,dt_3\,dt_2\,dt_1 \end{eqnarray*} Notice that $$ \int_a^x f'(a)\,dt_1=f'(a)\int_a^x dt_1=f'(a)(x-a), $$$$ \int_a^x \!\! \int_a^{t_1} f''(a)\,dt_2\,dt_1 = f''(a)\int_a^x (t_1-a)\,dt_1 = f''(a)\frac{(x-a)^2}{2}, $$$$ \int_a^x \!\! \int_a^{t_1} \!\! \int_a^{t_2} f'''(a)\,dt_3\,dt_2\,dt_1 = f'''(a)\int_a^x \frac{(t_1-a)^2}{2}\,dt_1 = f'''(a)\frac{(x-a)^3}{3!}, $$ and in general $$ \int_a^x \!\! \int_a^{t_1} \!\ldots \int_a^{t_{n-1}} f^{(n)}(a)\,dt_n\ldots\,dt_2\,dt_1 = f^{(n)}(a)\frac{(x-a)^{n}}{n!}. $$
By induction, then, one proves $$ f(x) = P_n(x)+ R_n(x) $$ where $P_n$ is the Taylor polynomial $$ P_n(x) = f(a)+f'(a)(x-a)+f''(a)\frac{(x-a)^2}{2}+\ldots+ f^{(n)}(a) \frac{(x-a)^n}{n!}, $$ and the remainder $R_n(x)$ is represented by nested integrals as $$R_n (x) = \int_a^x \!\! \int_a^{t_1} \!\ldots \int_a^{t_{n}} f^{(n+1)}(t_{n+1}) \,dt_{n+1}\ldots\,dt_2\,dt_1. $$
We can establish the Lagrange form of the remainder by applying the intermediate and extreme value theorems, using simple comparisons as follows. Consider the case $x>a$ first. Let $m$ be the minimum value of $f^{(n+1)}$ on $[a,x]$, and $M$ the maximum value. Then since $$ m\le f^{(n+1)}(t_{n+1}) \le M $$ for all $t_{n+1}$ in $[a,x]$, after $n+1$ repeated integrations one finds $$ m \frac{(x-a)^{n+1}}{(n+1)!} \le R_n(x) \le M \frac{(x-a)^{n+1}}{(n+1)!}. $$ But now, notice that the function $$ t\mapsto f^{(n+1)}(t) \frac{(x-a)^{n+1}}{(n+1)!} $$ attains the extreme values $$ m \frac{(x-a)^{n+1}}{(n+1)!} \quad\mbox{and} \quad M \frac{(x-a)^{n+1}}{(n+1)!} $$ at some points in $[a,x]$. By the intermediate value theorem, there must be some point $t$ between these two points (so $t\in[a,x]$) such that $$ R_n(x) = f^{(n+1)}(t) \frac{(x-a)^{n+1}}{(n+1)!}. $$ This is the Lagrange form of the remainder. If $x<a$ and $n$ is odd, the same proof works. If $x<a$ and $n$ is even, $(x-a)^{n+1}<0$ and the same proof works after reversing some inequalities.
One can motivate this whole approach in a couple of different ways. E.g., one can argue that $ {(x-a)^n}/{n!} $ becomes small for large $n$, so the remainders $R_n(x)$ will become small if the derivatives of $f$ stay bounded, say.
Or, one can reason loosely as follows: $f(x)\approx f(a)$ for $x$ near $a$. Ask, what is the remainder exactly? Apply the fundamental theorem as above, then approximate the first remainder using the approximation $f'(t_1)\approx f'(a)$. Repeating, one produces the Taylor polynomials by the pattern of the argument above.
Solution 2:
The clearest proof one can find, in my opinion, is the following. Note it is just a generalized mean value theorem!
THM Let $f,g$ be functions defined on a closed interval $[a,b]$ that admit finite $n$-th derivatives on $(a,b)$ and continuous $n-1$-th derivatives on $[a,b]$. Suppose $c\in [a,b]$. Then for each $x\neq c$ in $[a,b]$ there exists $x_1$ in the segment joining $c$ and $x_1$ such that $$\left(f(x)-\sum_{k=0}^{n-1}\frac{f^{(k)}(c)}{k!}(x-c)^k\right) g^{(n)}(x_1)=f^{(n)}(x_1)\left(g(x)-\sum_{k=0}^{n-1}\frac{g^{(k)}(c)}{k!}(x-c)^k\right)$$
PROOF For simplicity assume $c<b$ and $x>c$. Keep $x$ fixed and consider $$F(t)=f(t)+\sum_{k=1}^{n-1}\frac{f^{(k)}(t)}{k!}(x-t)^k$$ $$G(t)=g(t)+\sum_{k=1}^{n-1}\frac{g^{(k)}(t)}{k!}(x-t)^k$$
for each $t\in[c,x]$. Then $F,G$ are continuous on $[c,x]$ and admit finite derivative on $(c,x)$. By the mean value theorem we may write $$F'(x_1)[G(x)-G(c)]=G'(x_1)[F(x)-F(c)]$$
for $x_1\in (c,x)$. This gives that $$F'(x_1)[g(x)-G(c)]=G'(x_1)[f(x)-F(c)]$$ since $F(x)=f(x),G(x)=g(x)$. But we see, by cancelling terms with opposite signs, that $$F'(t)=\frac{(x-t)^{n-1}}{(n-1)!}f^{(n)}(t)$$ $$G'(t)=\frac{(x-t)^{n-1}}{(n-1)!}g^{(n)}(t)$$ which gives the desired formula when plugging $t=x_1$.
COR We get Taylor's theorem with $g(x)=(x-c)^n$, namely, for some $x_1$ we have $$\left( {f(x) - \sum\limits_{k = 0}^{n - 1} {\frac{{{f^{(k)}}(c)}}{{k!}}} {{(x - c)}^k}} \right)n! = {f^{(n)}}({x_1}){\left( {x - c} \right)^n}$$ or $$f(x) = \sum\limits_{k = 0}^{n - 1} {\frac{{{f^{(k)}}(c)}}{{k!}}} {(x - c)^k} + \frac{{{f^{(n)}}({x_1})}}{{n!}}{\left( {x - c} \right)^n}$$ Note that $g^{(k)}(c)=0$ if $k=0,1,2\ldots,n-1$, $g^{n}=n!$.
Solution 3:
Let us try and approximate a function by a polynomial in such a way that they coincide closely at the origin. To achieve this, we will require the same value, the same slope, the same curvature and the same higher order derivatives at $0$.
WLOG we us use a cubic polyomial and we start from $$f(x)=p(x)+e(x)=a+bx+cx^2+dx^3+e(x),$$ where $e$ is an error term.
Imposing our conditions, we need as many equations as there are unknown coefficients
$$f(0)=a+e(0),\\ f'(0)=b+e'(0),\\ f''(0)=2c+e''(0),\\ f'''(0)=3!d+e'''(0).\\ $$ Lastly,
$$f''''(x)=e''''(x).$$
To achieve a small error, we ensure $e(0)=e'(0)=e''(0)=e'''(0)$, and set $a=f(0),b=f'(0),2c=f''(0),3!d=f'''(0)$. This gives us the Taylor coefficients. We now have to bound the error term.
Assuming that $|f''''(x)|=|e''''(x)|\le M$ in the range $[0,h]$, by integration
$$|e'''(x)|=\left|\int_0^x e''''(x)\,dx+e'''(0)\right|\le Mx,\\ |e''(x)|=\left|\int_0^x e'''(x)\,dx+e''(0)\right|\le\left|\int_0^x Mx\,dx\right|=\frac{Mx^2}2,\\ |e'(x)|=\left|\int_0^x e''(x)\,dx+e'(0)\right|\le\left|\int_0^x \frac{Mx^2}2\,dx\right|=\frac{Mx^3}{3!},\\ |e(x)|=\left|\int_0^x e'(x)\,dx+e(0)\right|\le\left|\int_0^x \frac{Mx^3}{3!}\,dx\right|=\frac{Mx^4}{4!}.$$
To summarize, for $x\in[0,h]$,
$$\left|f(x)-f(0)-f'(0)x-f''(0)\frac{x^2}2-f'''(0)\frac{x^3}{3!}\right|\le M\frac{h^4}{4!},$$ where $|f''''(x)|\le M$.