There is an exercise in an exam which my professor gave to us saying:
If $p=\Bbb{R}\rightarrow\Bbb{R}$ a polynomial of degree $n$. Proof that for any $a,x\in\Bbb{R}$ we have $p(x)=p(a)+p'(a)\cdot(x-a)+...+\frac{p^{(n)}(a)}{n!}\cdot(x-a)^n$.
Using Taylor's Theorem with Lagrange remainder, we have that: As $p:\Bbb{R}\rightarrow\Bbb{R}$ is a function of class $C^{n-1}$, $n$ times derivable in an open interval $(a,x)$. Than exist $c\in (a,x)$ such that $$p(x)=p(a)+p'(a)\cdot(x-a)+...+\frac{p^{(n-1)}(a)}{(n-1)!}\cdot(x-a)^{n-1}+\frac{p^{(n)}(c)}{n!}\cdot(x-a)^{n}$$ But, by this theorem, $a\notin(a,x)$, so how can I do this proof?
Edit: we have to use Taylor's Theorem with Lagrange remainder and we cannot use integral.
As @Gary 's and @Tora's answers, just to confirm, the proof, using Taylor with Lagrange remainder and not using integral would be this?
Using Taylor's Theorem with Lagrange remainder, we have that: As $p:\Bbb{R}→\Bbb{R}$ is a function of class $C^n$, $n+1$ times derivable in an open interval $(a,x)$. Than exist $c∈(a,x)$ such that $p(x)=p(a)+p′(a)⋅(x−a)+...+\frac{p^{(n)}(a)}{n!}⋅(x−a)^n+\frac{p^{(n+1)}(c)}{(n+1)!}⋅(x−a)^{n+1}$.
As $p(x)$ is a polynomial of degree $n$, $p^{(n+1)}(c)=0$ (prove this by induction?), so $p(x)=p(a)+p′(a)⋅(x−a)+...+\frac{p^{(n)}(a)}{n!}⋅(x−a)^n$
Comment: Doing this just for this question be placed as answered.