Post · 15 min read· pp. 1064–1072
Introduction
Taylor theorem is widely used for the approximation of a k-times differentiable function around a given point by a polynomial of degree k, called the kth-order Taylor polynomial. In addition, it is also useful for proving some of the convex function properties.
In this blog post, I would like to discuss and prove the univariate Taylor theorem followed by touching some of the basic expressions for the commonly used quadratic multivariate Taylor theorem.
Prerequisites
The following theorem and lemmas are prerequisite knowledge for proving the univariate Taylor theorem.
Rolle’s Theorem
Rolle’s theorem is a special case of mean value theorem.
If a real-valued function f is continuous on a proper closed interval [a,b], differentiable on the open interval (a,b), and f(a)=f(b), then there exists at least one c in the open interval (a,b) such that f(c)=0.
Lemma 1
Let f:R→R be $2$ times differentiable on the open interval with f′ and f′′ continuous on the closed interval I between a and x0 (a function of class C2 on I). If f′(a)=0, and x0 is a point such that f(x0)=f(a) and x0=a, then there exists t∈(0,1) such that f′′(a+t(x0−a))=0.
Proof
Because f(x0)=f(a) and x0=a, according to Rolle’s Theorem, there exists t1∈(0,1) such that f′(a+t1(x0−a))=0. Now, because f′(a)=f′(a+t1(x0−a)) and a+t1(x0−a)=a, again, according to Rolle’s Theorem, there exists t2∈(0,1) such that f′′(a+t2(a+t1(x0−a)−a))=0.
f′′(a+t2(a+t1(x0−a)−a))=f′′(a+t2t1(x0−a))=f′′(a+t(x0−a))=0
where t=t1t2.
This concludes the proof.
Lemma 2
Let f of class Ck on the closed interval I between a and x0. If f′(a)=f′′(a)=⋯=f(k−1)(a)=0, and x0 is a point such that f(x0)=f(a) and x0=a, then there exists t∈(0,1) such that f(k)(a+t(x0−a))=0.
Proof
Because f(x0)=f(a), x0=a, and f′(a)=0, according to Lemma 1, there exists t1∈(0,1) such that f′′(a+t1(x0−a))=0. Because f′′(a+t1(x0−a))=f′′(a), a+t1(x0−a)=a, and f′′(a)=0, according to Lemma 1, there exists t2′∈(0,1) such that f(3)(a+t2′(a+t1(x0−a)−a))=0. We rearrange the terms, so there must exists t2∈(0,1) such that f(3)(a+t2(x0−a))=0, where t2=t1t2′.
Iterating this process, there exists tk−1∈(0,1) such that f(k)(a+tk−1(x0−a))=0.
This concludes the proof.
Univariate Taylor Theorem
General Univariate Taylor Theorem
Let k≥1 be an integer and let the function f:R→R be k times differentiable at the point a∈R. Then there exists a function hk:R→R such that
f(x)=Pk(x)+Rk(x)
where Pk(x) is the k-th order Taylor polynomial,
Pk(x)=f(a)+f′(a)(x−a)+2!f′′(a)(x−a)2+⋯+k!f(k)(a)(x−a)k
and Rk(x) is the remainder term.
The remainder term could have many different forms. The commonly seen form is the Peano form of the remainder, where the formula of the remainder is not explicitly defined.
Rk(x)=hk(x)(x−a)k,x→alimhk(x)=0
There are explicit formula for the remainder, with some additional assumptions. Among the mean-value forms of the remainder, the Lagrange form of the remainder is widely used.
Let f:R→R be k+1 times differentiable on the open interval with f(k) continuous on the closed interval between a and x, then the remainder term could be expressed as
Rk(x)=(k+1)!f(k+1)(ξL)(x−a)k+1=(k+1)!f(k+1)(a+t(x−a))(x−a)k+1
where ξL is some real value between a and x, and $0 \leq t \leq 1$.
It is easy to show that Taylor theorem with the Lagrange form remainder implies Taylor theorem with the Peano form remainder.
f(x)=Pk(x)+Rk(x)=Pk−1(x)+Rk−1(x)
We will use Peano form for Rk(x) and Lagrange form for Rk−1(x), we then have
k!f(k)(a)(x−a)k+hk(x)(x−a)kk!f(k)(a)+hk(x)=k!f(k)(a+t(x−a))(x−a)k=k!f(k)(a+t(x−a))
hk(x)=kf(k)(a+t(x−a))−f(k)(a)
Apparently,
x→alimhk(x)=0
This concludes the proof that Taylor theorem with the Lagrange form remainder implies Taylor theorem with the Peano form remainder.
Let’s check Taylor’s theorem quickly. When k=1, using the Peano form of the remainder, we have
f(x)=P1(x)+R1(x)=f(a)+f′(a)(x−a)+h1(x)(x−a)
We have the expression for h(x)
h1(x)=x−af(x)−f(a)−f′(a)(x−a)=x−af(x)−f(a)−f′(a)
Because of the definition of derivative,
f′(a)=x→alimx−af(x)−f(a)
we have
x→alimh1(x)=x→alim(x−af(x)−f(a)−f′(a))=x→alim(x−af(x)−f(a))−f′(a)=f′(a)−f′(a)=0
Let’s try to prove Taylor’s theorem more formally using the Lagrange form now. (To make the proof somewhat easier, it is not using the more general Peano form remainder.)
Proof
We define new functions g1 and g2.
g1(x)=f(x)−(f(a)+f′(a)(x−a)+⋯+(k−1)!f(k−1)(a)(x−a)k−1)
g2(x)=g1(x)−(x0−ax−a)kg1(x0)
where a and x0 are some arbitrary real values and a=x0.
The derivatives of g1(x) are as follows.
g1(1)(x)=f(1)(x)−(f(1)(a)+f(2)(a)(x−a)+2!f(3)(a)(x−a)2+⋯+(k−2)!f(k−1)(a)(x−a)k−2)g1(2)(x)=f(2)(x)−(f(2)(a)+f(3)(a)(x−a)+⋯+(k−3)!f(k−1)(a)(x−a)k−3)⋮g1(i)(x)=f(i)(x)−(f(i)(a)+f(i+1)(a)(x−a)+⋯+(k−i−1)!f(k−1)(a)(x−a)k−i−1)⋮g1(k−1)(x)=f(k−1)(x)−f(k−1)(a)g1(k)(x)=f(k)(x)
It is easy to verify that g1(i)(a)=0 for i∈[1,k−1].
The derivatives of g2(x) are as follows.
g2(1)(x)=g1(1)(x)−k(x0−a)k(x−a)k−1g1(x0)g2(2)(x)=g1(2)(x)−k(k−1)(x0−a)k(x−a)k−2g1(x0)g2(i)(x)=g1(i)(x)−(k−i)!k!(x0−a)k(x−a)k−ig1(x0)g2(k−1)(x)=g1(k−1)(x)−k!(x0−a)kx−ag1(x0)g2(k)(x)=g1(k)(x)−k!(x0−a)k1g1(x0)
Given g1(i)(a)=0 for i∈[1,k−1], it is also easy to verify that g2(i)(a)=0 for i∈[1,k−1].
Further more,
g1(a)=f(a)−f(a)=0
g2(a)=g1(a)=0
g2(x0)=g1(x0)−g1(x0)=0
So we have g2(x0)=g2(a) and a=x0.
So we have g2(x0)=g2(a) and a=x0, and g2′(a)=g2′′(a)=⋯=g2(k−1)(a)=0. According to Lemma 2, there exists t∈(0,1) such that g2(k)(a+t(x0−a))=0.
Therefore,
g2(k)(a+t(x0−a))=g1(k)(a+t(x0−a))−k!(x0−a)k1g1(x0)=f(k)(a+t(x0−a))−k!(x0−a)k1(f(x0)−(f(a)+f′(a)(x0−a)+⋯+(k−1)!f(k−1)(a)(x0−a)k−1))=0
f(x0)=f(a)+f′(a)(x0−a)+⋯+(k−1)!f(k−1)(a)(x0−a)k−1+k!f(k)(a+t(x0−a))(x0−a)k
Note that we have assumed a and x0 to be arbitrary as long as a=x0. So we basically have,
f(x)=f(a)+f′(a)(x−a)+⋯+(k−1)!f(k−1)(a)(x−a)k−1+k!f(k)(a+t(x−a))(x−a)k
where x=a.
However, it is easy to see that when x=a, the above equation still holds. So ultimately, we have
f(x)=f(a)+f′(a)(x−a)+⋯+(k−1)!f(k−1)(a)(x−a)k−1+k!f(k)(a+t(x−a))(x−a)k
The above verifies Taylor theorem with the Lagrange form remainder.
This concludes the proof.
Multivariate Taylor Theorem
The multivariate Taylor theorem is a little bit complicated. We will only focus on the quadratic form here without discussing the proofs.
Multi-Index Notation
There are some notations in order to express the multivariate Taylor theorem conveniently.
Suppose α∈Nn, α={α1,α2,⋯,αn}, and x∈Rn, x={x1,x2,⋯,xn}, we have the following notations.
∣α∣=α1+α2+⋯+αn
α!=α1!α2!⋯αn!
(αn)=α!n!=α1!α2!⋯αn!n!
xα=x1α1x2α2⋯xnαn
Suppose α∈Nn and a constant natural number k, how many different α are there such that ∣α∣=k?
Let’s look at an example. Assume n=3 and k=2, the α such that ∣α∣=k are
α=(2,0,0)α=(0,2,0)α=(0,0,2)α=(1,1,0)α=(1,0,1)α=(0,1,1)
Therefore, we have $6$ different α for n=3 and k=2.
The formula for the general case is actually not hard to derive. This combination problem is actually equivalent to the combination problem that we have k+n identical balls, and n different boxes, how many unique ways to put these balls into the boxes such that each box has at least one ball. To solve it, we would need to put all the k+n balls as a sequence, and insert n−1 barriers between the balls, such that each two adjacent balls could have at most one barrier. The number of combinations for this problem is, obviously, (n−1k+n−1).
Let’s verify if the formula we derived is valid for the example we have seen above.
(n−1k+n−1)=(3−12+3−1)=(24)=6
k-th Order Partial Derivatives
Suppose a function f:Rn→R is k times differentiable, the k-th order partial derivatives of f are
Dαf=∂x1α1∂x2α2⋯∂xnαn∂∣α∣f
for all α such that ∣α∣=k.
Suppose a function f:Rn→R is k times differentiable at point x∈Rn, the k-th order partial derivatives of f evaluated at point x are
Dαf(x)=∂x1α1∂x2α2⋯∂xnαn∂∣α∣f(x)
for all α such that ∣α∣=k.
Let’s look at an example. Assume n=3 and k=2,
f(x)=5x13+7x22x34
From the example in the Multi-Index Notation section, we know that all the α are
α=(2,0,0)α=(0,2,0)α=(0,0,2)α=(1,1,0)α=(1,0,1)α=(0,1,1)
So the $2$-th order partial derivatives of f evaluated at point x are
D(2,0,0)f(x)=∂x12∂x20∂x30∂2f=30x1+7x22x34D(0,2,0)f(x)=∂x10∂x22∂x30∂2f=5x13+14x34D(0,0,2)f(x)=∂x10∂x20∂x32∂2f=5x13+84x22x32D(1,1,0)f(x)=∂x11∂x21∂x30∂2f=15x12+14x2x34D(1,0,1)f(x)=∂x11∂x20∂x31∂2f=15x12+28x22x33D(0,1,1)f(x)=∂x10∂x21∂x31∂2f=5x13+56x2x33
Quadratic Multivariate Taylor Theorem
Let f:Rn→R be a $2$-times differentiable function at the point a∈Rn. Using the Lagrange form of the remainder, there exists t∈(0,1) such that
f(x)=f(a)+∇f(a)⊤(x−a)+21(x−a)⊤H(a+t(x−a))(x−a)
where ∇f(a)⊤ is a row vector and x−a is a column vector, H is the Hessian matrix and H(a+t(x−a)) is the Hessian matrix evaluated at a+t(x−a). Concretely,
∇f(a)⊤=[∂x1∂f(a),∂x2∂f(a),⋯,∂xn∂f(a)]
and
x−a=[x1−a1,x2−a2,⋯,xn−an]⊤
General Multivariate Taylor Theorem
Let f:Rn→R be a k-times differentiable function at the point a∈Rn, we have
f(x)=Pk(x)+Rk(x)
where the k-th order Taylor polynomial
Pk(x)=j=0∑kj!1∣α∣=j∑(α∣α∣)Dαf(a)(x−a)α=j=0∑k∣α∣=j∑j!1(αj)Dαf(a)(x−a)α=j=0∑k∣α∣=j∑α!Dαf(a)(x−a)α=0≤∣α∣≤k∑α!Dαf(a)(x−a)α
and the Peano form of the remainder
Rk(x)=∣α∣=k∑hα(x)(x−a)α,x→alimhα(x)=0
where hα:Rn→R. So instead of having one single h in the univariate case, here we have multiple different h, each for one α whose ∣α∣=k.
For example, assume n=3 and k=2, for the $2$-th order Taylor polynomial,
P2(x)=0≤∣α∣≤2∑α!Dαf(a)(x−a)α=(∣α∣=0∑α!Dαf(a)(x−a)α)+(∣α∣=1∑α!Dαf(a)(x−a)α)+(∣α∣=2∑α!Dαf(a)(x−a)α)=f(a)+(1,0,0)!D(1,0,0)f(a)(x−a)(1,0,0)+(0,1,0)!D(0,1,0)f(a)(x−a)(0,1,0)+(0,0,1)!D(0,0,1)f(a)(x−a)(0,0,1)+(2,0,0)!D(2,0,0)f(a)(x−a)(2,0,0)+(2,0,0)!D(2,0,0)f(a)(x−a)(2,0,0)+(0,0,2)!D(0,0,2)f(a)(x−a)(0,0,2)+(1,1,0)!D(1,1,0)f(a)(x−a)(1,1,0)+(1,0,1)!D(1,0,1)f(a)(x−a)(1,0,1)+(0,1,1)!D(0,1,1)f(a)(x−a)(0,1,1)
Each of the term could be expanded using the multi-index notation and the k-th order partial derivatives.
For the Peano form of the remainder,
R2(x)=∣α∣=2∑hα(x)(x−a)α=h(2,0,0)(x)(x−a)(2,0,0)+h(0,2,0)(x)(x−a)(0,2,0)+h(0,0,2)(x)(x−a)(0,0,2)+h(1,1,0)(x)(x−a)(1,1,0)+h(1,0,1)(x)(x−a)(1,0,1)+h(0,1,1)(x)(x−a)(0,1,1)
References