Taylor theorem with Lagrange remainder (source code)

= Taylor theorem with Lagrange remainder
{c}

= Taylor's theorem with Lagrange remainder
{c}
{synonym}

Let $n\geq1$. Suppose $f$ has $n-1$ continuous <derivatives> on the closed <interval> joining distinct real points $a,x$, and its $n$th <derivative> exists in the interior. Then some interior point $\xi$ satisfies
$$
f(x)=\sum_{j=0}^{n-1}\frac{f^{(j)}(a)}{j!}(x-a)^j+\frac{f^{(n)}(\xi)}{n!}(x-a)^n.
$$
Endpoint <derivatives> in the polynomial are one-sided restrictions of the continuous derivatives. When $n=1$, the assumptions mean endpoint <continuity> and interior <differentiability>, and the result is the <mean value theorem>.<Basic Analysis: Introduction to Real Analysis, Volume I by Jiří Lebl>[§4.3.2, Theorem4.3.2, with the theorem index shifted from n to n minus one]{ref}

For a proof, subtract the degree-$(n-1)$ <Taylor polynomial> and a multiple $C(t-a)^n$ chosen so that the resulting function also vanishes at $x$. It and its first $n-1$ <derivatives> vanish at $a$. Repeated applications of <Rolle theorem> give a point where its $n$th <derivative> vanishes, yielding $C=f^{(n)}(\xi)/n!$. If $|f^{(n)}|\leq M$, the <Lagrange remainder> is bounded by $M|x-a|^n/n!$ without knowing $\xi$.