# Higher derivatives and better approximation

We discussed a few issues:

• Lagrange interpolation formula: how to estimate the difference $f(b)-f(a)$ through the derivative $f'$?
• Consequence: vanishing of several derivatives at a point means that a function has a “root of high order” at this point (with explanation, what does that mean).
• Taylor formula for polynomials: if you know all derivatives of a polynomial at some point, then you know it everywhere.
• Peano formula for $C^n$-smooth functions: approximation by the Taylor polynomial with asymptotic bound for the error.
• Lagrange formula: explicit estimate for the error.

The notes (updated) are available here.

## Higher derivatives

In this lecture we return back to functions of one variable, defined on an open or closed interval on the real axis.

Definition. A function $f:[a,b]\to\mathbb R$ is called twice (two times) differentiable, if it is differentiable at all points of the segment $[a,b]\subset\mathbb R^1$, and the derivative $g=f'$ considered as a scalar (numeric) function on this segment, is also differentiable.

Iterating this construction, we say that a function is $k$ times differentiable, if it is differentiable and its derivative is $k-1$ times differentiable. This is an inductive definition.

Variations. Sometimes it is convenient to say that a function is 0 times differentiable, if it is continuous on the segment. If this agreement is used as the base of induction, then this would define a slightly more restricted classes of $k$ times differentiable functions, usually denoted by $C^k[a,b]$.

Exercise.

1. Give non-polynomial example of a function which is infinitely many times differentiable.
2. Give example of a function that has exactly 7 derivatives, but not 8, on the segment $[-1,1]$.

As was already established, existence of the first derivative allows to construct the linear approximation for a given function. If this approximation is not degenerate (i.e., the derivative is non-vanishing), it allows to study the extremal properties of the function, in particular,

1. Guarantee a certain type of the extremum at the endpoints $a,b$ of the segment;
2. Guarantee the absence of extremum at the interior points of the interval $(a,b)$.

It turns out that higher order derivatives allow to construct approximation of functions by polynomials of higher order, and this approximation sometimes guarantees presence/type or absence of extremum. In cases it does not, one needs more of the same.

Theorem. If a function $f(x)$ is $n$ times differentiable on a segment $[a,b]$ containing the origin $x=0$, then there exists a unique polynomial $p(x)=c_0+c_1x+\cdots+c_n x^n$ of degree $\le n$ which gives an approximation of $f$ at the origin with the accuracy $o(x^n)$, $\displaystyle f(x)=p(x)+o(x^n) \iff \lim_{x\to 0}\frac{f(x)-p(x)}{x^n}=0.$

The coefficients $c_k$ of this polynomial are proportional to the respective higher derivatives $f^{(k)}(0)$ at the origin, $\displaystyle c_k=\frac{f^{(k)}(0)}{k!},~k=0,1,\dots,n$.

Remark. There is nothing mysterious in the formulas: if $f(x)=p_n(x)=c_0+c_1x+\cdots +c_n x^n$ is a polynomial itself, then the higher order derivatives can be easily computed for each monomial separately: $\displaystyle (x^i)^{(k)}(0)=\left.i(i-1)\cdots(i-k+1) x^{i-k}\right|_{x=0}=k!\quad\text{if }i=k\text{ and }0\text{ otherwise}$.

This proves the formulas for the coefficients $c_k$ via the derivatives of the polynomial.

For the proof we need the following lemma, which is very much like the intermediate value theorem.

Lemma (on finite differences). For a function differentiable on the interval $[a,b]$ the normalized finite difference $\lambda=\frac{f(b)-f(a)}{b-a}$ coincides with the derivative $f'(c)$ at some intermediate point $c\in[a,b]$.

Proof of the Lemma. Consider the auxiliary function $g(x)=f(x)-\lambda x$. Then $g(a)=g(b)$ and the same finite difference for this function is equal to zero. Since the function takes equal values at the endpoints, either its maximum or its minimum is achieved at some point $c$ inside the interval $(a,b)$. By the Fermat rule, $g'(c)=0$. By construction, $f'(c)=\lambda$.

Proof of the Theorem. The formulas for the coefficients imply that the difference $h(x)=f(x)-p_n(x)$ is a function which is $n$ times differentiable and all its derivatives vanish at the origin. We have to prove that $\lim_{x\to 0}|h(x)|/x^n=0$.

For $n=1$ this is obvious: by definition of differentiability, for function with zero derivative we have $h(x)=h(0)+h'(0)x+o(x)=o(x)$. Reasoning by induction, consider the function $h$ and its derivative $g=h'$. By the inductive assumption, $|g(x)|\le \varepsilon x^{n-1}$ for an arbitrary $\varepsilon>0$ on a sufficiently small interval.

By the Lemma, $f(x)=f(x)-f(0)=g(c)x$ for some $c\in (0,x)$. Using the inequality $|g(c)|\le \varepsilon |c|^{n-1}\le \varepsilon |x|^{n-1}$, we conclude that $|f(x)|\le\varepsilon |x|^n$. Since $\varepsilon$ can be arbitrary small, we conclude that the limit $\lim |f(x)|/|x|^n$ is smaller than any number, i.e., must be zero.

Definition. The polynomial $p_n(x)$ above is called the Taylor polynomial of order $n$ for the function $f$ at the origin $x=0$. One can easily modify this to become the definition if the Taylor polynomial at an arbitrary point $x=c$.

## Application to the investigation of functions

Any $n$ times differentiable function can be written (near the origin, but this is not a restriction!) as its Taylor polynomial of degree $n$ plus an error term which is fast decreasing (faster than the highest degree term of the polynomial).   Hence this term cannot affect the extremal properties of the polynomial. In particular, if $n=2$ and the Taylor polynomial has a minimum (maximum) at $x=0$, so does the function itself.For quadratic polynomials the horns of the parabola go up (resp., down) if its principal coefficient is positive (resp., negative). This immediately proves the following result.

Second-order sufficient condition.If $f$ is a twice differentiable function and $x=c$ is a critical point, $f'(c)=0$, then the following holds:

1. If $f''(c)>0$, then $c$ is a local minimum,
2. If $f''(c)<0$, then $c$ is a local maximum,
3. If $f''(c)=0$, everything depends on the Taylor polynomial of degree 3.

Problem. Find conditions for a degree 3 polynomial $p(x)=\alpha x^3$ to have a local maximum/minimum on (a) interval $|x|<\delta$, (b) semi-interval $0\le x\le \delta$.  Formulate the third order necessary/sufficient conditions for extremum in the interior point (resp., left/right endpoint) of the domain of a non-polynomial function $f$.

Create a free website or blog at WordPress.com.