Almost Taylor's Theorem Proof through Integration by Parts I ALMOST derived Taylor's theorem, which here is $f(x)=\sum_{n=0}^\infty\frac{(x-a)^nf^{(n)}(a)}{n!}$, where $a$ is some arbitrary constant.
My attempt:
$$f(x)+C=\int f'(x)dx$$
$$\int g'(x)h(x)dx=g(x)h(x)-\int g(x)h'(x)dx\tag{Integration by Parts}$$
We will be using $g(x)=x$ and $h(x)=f'(x)$.
$$f(x)+C=\int f'(x)dx$$
$$=xf'(x)-\int xf''(x)dx$$
$$=xf'(x)-\frac12x^2f''(x)+\int\frac12x^2f'''(x)dx$$
$$=\sum_{n=1}^\infty\frac{(-1)^{n+1}x^nf^{(n)}(x)}{n!}$$
Since this is so so so close to Taylor's theorem, is there any way I can take my result and tweak it into Taylor's theorem?
 A: Your approach using integration by parts is the right idea.
It is often forgotten that with integration by parts there is a constant of integration, generally set to $0$. That is the "tweak" you are looking for.
Start with
$$f(x) = f(a) + \int_a^x f'(t) \, dt.$$
Integrate by parts with $u = f'(t)$ and $dv = dt$ obtaining $du = f''(t)dt $ and $v = t + C$
$$f(x) = f(a) + \left.(t +C)f'(t)\right|_a^x- \int_a^x(t +C)f''(t)dt.$$
Choose $C = -x$.
Then
$$f(x) = f(a) + f'(a)(x-a) + \int_a^x(x-t)f''(t)dt.$$
Repeat.
This generates the Taylor series with an integral remainder.
A: Asumming the crucial part.  Any continous function can actually be aproximated by a Taylor polynomial....
suppose
$f(x) = P(x) = \sum_\limits{n=0}^\limits{\infty} a_n (x^n-a)^n$
Then it is fairly simple to derive what the coefficients must be.
$f(a) = a_0\\
f'(a) = \sum_\limits{n=0}^\limits{\infty} a_{n+1}(n+1) (x^n-a)^n = a_1\\
f''(a) = \sum_\limits{n=0}^\limits{\infty} a_{n+2}(n+1)(n+2) (x^n-a)^n = 2 a_2\\
f^{(k)}(a) = \sum_\limits{n=0}^\limits{\infty} a_{n+k} \frac{(n+k!)}{n!} (x^n-a)^n = k! a_k$
alternatively
$\lim_\limits{x\to a} \dfrac {f(x) - P(x)}{(x-a)^k} = a_k$
apply L'Hopitals as often as necessary to arive at
$a_k = \dfrac {f^{(k)}(x)}{k!}$
