# What is Lagrange Error and how do you find the value for M?

## I know the formula R_n le frac{M}{(n+1)!}|x-a|^(n+1), but I'm confused as to how to find $M$.

Apr 10, 2017

$M$ is the maximum value of $\left\mid {f}^{\left(n + 1\right)} \left(\xi\right) \right\mid$ for $\xi$ in the interval delimited by $x$ and $a$.

#### Explanation:

Consider the Taylor series of a function $f \left(x\right)$ around $x = a$:

f(x) = sum_(k=0)^oo f^((k))(a)/(k!) (x-a)^k

If we stop the Taylor series at $k = n$ we have:

$f \left(x\right) = {P}_{n} \left(x\right) + {R}_{n} \left(x\right)$

where:

P_n(x) = sum_(k=0)^n f^((k))(a)/(k!) (x-a)^k

and it can be demonstrated that rest can be expressed as:

R_n(x) = 1/(n!) int _a^x f^((n+1))(t) (x-t)^n dt

Applying the second theorem of the mean to this integral we have:

R_n(x) = 1/((n+1)!) f^((n+1))(xi) (x-a)^(n+1)

where $\xi$ is a point between $x$ and $a$

Clearly if in the interval delimited by $x$ and $a$ we have:

$\left\mid {f}^{\left(n + 1\right)} \left(\xi\right) \right\mid < M$

then:

abs( R_n(x)) <= M/((n+1)!)abs(x-a)^(n+1)