Existence of a $\theta$ - Taylor Expansion Problem Was reading "Taylor's Expansion" when i came across this interesting problem, interesting for me. 
Suppose that $f^{n+2}$ is continuous on $[0,x]$. Prove that there is a $\theta \in (0,1)$ such that 
\begin{align}
f(x) &= f(0) + \frac{f'(0)}{1!}x + \cdots + \frac{f^{n-1}(0)}{(n-1)!}x^{n-1} \\
& \quad + \frac{f^{n}\left(\frac{x}{n+1}\right)}{n!}x^{n} + \frac{n}{2(n+1)}f^{n+2}(\theta x)x^{n+2}{(n+2)!}
\end{align}
 A: Something is wrong with this formula. It leads to
$e = 1 + 1 + \frac{e^{\frac{1}{3}}}{2} + e^\theta 8 > e$.
A: @ Julio Cesar: I don't know about the problem, but this is why i think that the result could be correct.
Theorem: Let $f$ and $g$ be continuous on $[a,b]$, and let $g$ have constant sign on $[a,b]$. Then there is a $c \in (a,b)$ such that $$\int\limits_{a}^{b} f(x)g(x) \ dx = f(c) \int\limits_{a}^{b} g(x) \ dx$$
Please refer "E.I. Poffald, Amer.Math.Monthly 97 (1990), 205-213" for a proof of this result.
Using this result, by Taylor's formula with integral remainder we have $$f^{n}\Bigl(\frac{x}{n+1}\Bigr)=f^{n}(0) + f^{n+1}(0)\frac{x}{n+1} + \int\limits_{0}^{\frac{x}{n+1}} f^{n+2}(t) \Bigl(\frac{x}{n+1}-t\Bigr) \ dt$$
Hence $$f(0)+ \frac{f'(0)}{1!}x + \cdots + \frac{f^{n-1}(0)}{(n-1)!}x^{n-1} + \frac{f^{n}(\frac{x}{n+1})}{n!}x^{n} = \text{ Our sum with the Integral Remainder}$$
Then one can define $g$ in this manner.
$$g(t)= \frac{(x-t)^{n+1}}{n+1} - x^{n}\Bigl(\frac{x}{n+1}-t\Bigr) \quad ; t \in [0,x]$$
We have $g'(t)>0$ for $t \in (0,x)$ and $g(0)=0$. Thus $g$ is positive on the open interval $(0,x)$. Then using our theroem we have $$\int\limits_{0}^{\frac{x}{n+1}} f^{n+2}(t)(g(t))=f^{n+2}(c) \int\limits_{0}^{\frac{x}{n+1}} g(t) \ dt$$
This is where i am stuck.
