0% found this document useful (0 votes)
6 views25 pages

Subsection 3.1

The document discusses Taylor's Theorem, which provides a way to approximate a differentiable function using polynomials. It includes definitions, theorems, and examples illustrating how to calculate Taylor polynomials and their remainder terms. The document also covers the concept of the Hessian matrix and its relevance in multivariable calculus.

Uploaded by

prisanton2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views25 pages

Subsection 3.1

The document discusses Taylor's Theorem, which provides a way to approximate a differentiable function using polynomials. It includes definitions, theorems, and examples illustrating how to calculate Taylor polynomials and their remainder terms. The document also covers the concept of the Hessian matrix and its relevance in multivariable calculus.

Uploaded by

prisanton2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

3.

1 Taylor’s Theorem
3.1 Taylor’s Theorem
One-variable Taylor’s theorem:
let f ∶ X → R be differentiable up to order at least k, where X ⊂ R
let a ∈ R be a reference point
Taylor polynomial of degree k:

f ′′ (a) f (k) (a)


Pk (x) = f (a) + f ′ (a)(x − a) + (x − a)2 + ⋯ + (x − a)k
2 k!
Rk (x, a)
Taylor’s theorem: f (x) = Pk (x) + Rk (x, a) where lim =0
x→a (x − a)k

remainder term: if f is differentiable up to order at least k + 1, then


there exists ξ ∈ (a, x) or (x, a) such that

f (k+1) (ξ)
Rk (x, a) = (x − a)k+1
(k + 1)!
3.1 Taylor’s Theorem

Theorem 3.1
(Taylor’s theorem) Let f ∶ X → R be a differentiable function where
X ⊂ Rn is open. For any a ∈ X, define P1 (x) = f (a) + Df (a)(x − a).
Then
f (x) = P1 (x) + R1 (x, a)
where
R1 (x, a)
differentiable iff lim = 0.
x→a ∥x − a∥

so f (x) ≈ P1 (x) = f (a) + Df (a)(x − a) when x is close to a


*this is essentially the equation of tangent plane

x a vector
3.1 Taylor’s Theorem

Theorem 3.1
(Taylor’s theorem) Let f ∶ X → R be a differentiable function where
X ⊂ Rn is open. For any a ∈ X, define P1 (x) = f (a) + Df (a)(x − a).
Then
f (x) = P1 (x) + R1 (x, a)
where
R1 (x, a)
lim = 0.
x→a ∥x − a∥

Proof.

using the definitions, the result means

f (x) − [f (a) + Df (a)(x − a)]


lim =0
x→a ∥x − a∥

this is exactly the differentiability at a


3.1 Taylor’s Theorem

Definition 3.1
Let f ∶ X → R be a differentiable function where X ⊂ Rn is open. Let
a ∈ X and let h ∈ Rn . The incremental change of f from a to a + h is
defined by usually h is very small.
∆f = f (a + h) − f (a).
The total differential of f at a with a change h is defined by
*
df (a, h) = Df (a)h.
= a number, essentially a dot product

e.g. df ((a, b), (h, k)) = fx (a, b)h + fy (a, b)k


3.1 Taylor’s Theorem

by the first-order Taylor’s theorem, we have


lim(x->a) Remainder term /|x-a| = 0 P1(x)
f (a + h) − f (a) − Df (a)h
lim =0
h→0 ∥h∥

∆f − df (a, h)
this means lim =0
h→0 ∥h∥
this shows ∆f ≈ df (a, h) when ∥h∥ is small
3.1 Taylor’s Theorem

Example 3.1
A cuboid of size 1 × 2 × 3 m3 is to be made. Suppose there is an error of
at most 0.02 m for each side in the final product. Then the maximum
error of the volume V of the cuboid is approximately dV = 0.22 m3 .

Proof.

letting x, y, z be the side lengths, then V (x, y, z) = xyz


the goal is to maximize ∣∆V ∣ = ∣V (1 + h1 , 2 + h2 , 3 + h3 ) − V (1, 2, 3)∣
where ∣hj ∣ ⩽ 0.02 *Using total differential:
6 3 2 always a linear polynomial
we have DV (x, y, z) = (yz zx xy), so
with degree 1, hence compu-
tationally easy!
∆V ≈ dV = DV (1, 2, 3)h = (6 3 2) h = 6h1 + 3h2 + 2h3

the maximum error is ≈ 6(0.02) + 3(0.02) + 2(0.02) = 0.22


approximation
3.1 Taylor’s Theorem

Example 3.1
A cuboid of size 1 × 2 × 3 m3 is to be made. Suppose there is an error of
at most 0.02 m for each side in the final product. Then the maximum
error of the volume V of the cuboid is approximately dV = 0.22 m3 .

in fact, the maximum V is (1 + 0.02)(2 + 0.02)(3 + 0.02) = 6.222408


the minimum V is (1 − 0.02)(2 − 0.02)(3 − 0.02) = 5.782392
the original (ideal) value of V is (1)(2)(3) = 6
so the actual maximum error is

max {∣6.222408 − 6∣ , ∣5.782392 − 6∣} = 0.222408


3.1 Taylor’s Theorem

Theorem 3.2 use a degree k polynomial to approximate f


(Taylor’s theorem) Let f ∶ X → R be a function of class C k where
X ⊂ Rn is open. For any a ∈ X, define
k n
1
Pk (x) = f (a) + ∑ ( ∑ fxi1 xi2 ⋯xij (a)(xi1 − ai1 )⋯(xij − aij )).
j=1 j! i1 ,i2 ,...,ij =1
ipad
Then
f (x) = Pk (x) + Rk (x, a)
where
Rk (x, a)
lim k
= 0.
x→a ∥x − a∥
2
e.g. ∑ g(i1 , i2 ) = g(1, 1) + g(1, 2) + g(2, 1) + g(2, 2)
i1 ,i2 =1
=double summation
3.1 Taylor’s Theorem

e.g. for n = 2 and k = 2, we have


vector a = (a, b) vector x = (x, y)
P2 (x, y) = f (a, b) + fx (a, b)(x − a) + fy (a, b)(y − b)
1
+ [fxx (a, b)(x − a)2 + fxy (a, b)(x − a)(y − b)
2 *same if f is of class C^2
+ fyx (a, b)(y − b)(x − a) + fyy (a, b)(y − b)2 ]

if we let a = (a, b) and x = a + h = (a + h, b + k), then

P2 (x) = f (a) + fx (a)h + fy (a)k


1
+ (fxx (a)h2 + fxy (a)hk + fyx (a)kh + fyy (a)k 2 )
2
3.1 Taylor’s Theorem

e.g. for n = 2 and k = 3, we have

P3 (x, y) = f (a, b) + fx (a, b)(x − a) + fy (a, b)(y − b)


1
+ [fxx (a, b)(x − a)2 + fxy (a, b)(x − a)(y − b)
2!
+ fyx (a, b)(y − b)(x − a) + fyy (a, b)(y − b)2 ]
1
+ [fxxx (a, b)(x − a)3 + fxxy (a, b)(x − a)2 (y − b)
3!
+ fxyx (a, b)(x − a)2 (y − b) + fyxx (a, b)(x − a)2 (y − b)
+ fxyy (a, b)(x − a)(y − b)2 + fyxy (a, b)(x − a)(y − b)2
+ fyyx (a, b)(x − a)(y − b)2 + fyyy (a, b)(y − b)3 ]
3.1 Taylor’s Theorem

Proof.
(The case n = 2 and k = 2)
let a = (a, b) and x = (a + h, b + k)
define F (t) = f (a + th, b + tk), so F (0) = f (a) and F (1) = f (x)
F ′′ (0)
by Taylor’s theorem in one variable, F (1) ≈ F (0) + F ′ (0) +
2
by the chain rule, we have
d d
F ′ (t) = fx (a + th, b + tk) (a + th) + fy (a + th, b + tk) (b + tk)
dt dt
= fx (a + th, b + tk)h + fy (a + th, b + tk)k,
F ′′ (t) = fxx (a + th, b + tk)h2 + fxy (a + th, b + tk)hk
+ fyx (a + th, b + tk)kh + fyy (a + th, b + tk)k 2
3.1 Taylor’s Theorem

Proof.
(The case n = 2 and k = 2)
therefore, we have
F ′′ (0)
F (1) ≈ F (0) + F ′ (0) +
2
= f (a) + fx (a)h + fy (a)k
1
+ (fxx (a)h2 + fxy (a)hk + fyx (a)kh + fyy (a)k 2 )
2
3.1 Taylor’s Theorem

Proposition 3.1
Let f ∶ X → R be a function of class C k+1 where X ⊂ Rn is open. For
any a ∈ X, define
k n
1
Pk (x) = f (a) + ∑ ( ∑ fxi1 xi2 ⋯xij (a)(xi1 − ai1 )⋯(xij − aij )).
j=1 j! i1 ,i2 ,...,ij =1

Then there exists ξ lying on the segment between a and x such that
Error term:
n
1
f (x) = Pk (x)+ ∑ fxi1 xi2 ⋯xik+1 (ξ)(xi1 − ai1 )⋯(xik+1 − aik+1 ).
(k + 1)! i1 =1
i2 =1 unknown vector!
...
ik+1 =1 vector x

vector a
3.1 Taylor’s Theorem

e.g. for n = 2 and k = 2, the remainder term is


1
[fxxx (ξ)(x − a)3 + fxxy (ξ)(x − a)2 (y − b)
3!
+ fxyx (ξ)(x − a)2 (y − b) + fyxx (ξ)(x − a)2 (y − b)
+ fxyy (ξ)(x − a)(y − b)2 + fyxy (ξ)(x − a)(y − b)2
+ fyyx (ξ)(x − a)(y − b)2 + fyyy (ξ)(y − b)3 ]
3.1 Taylor’s Theorem

Definition 3.2
Let f ∶ X → R be a function of class C 2 where X ⊂ Rn is open. The
Hessian of f is defined by

⎛ fx1 x1 fx1 x2 ⋯ fx1 xn ⎞


=
⎜f fx2 x2 ⋯ fx2 xn ⎟
Hf = ⎜ x2 x1 ⎟.
⎜ ⋮ ⋮ ⋱ ⋮ ⎟
⎝fx x fxn x2 ⋯ fx x ⎠
n 1 n n
3.1 Taylor’s Theorem

for f ∶ R2 → R, x = (x, y), a = (a, b), we have

P2 (x) = f (a, b) + fx (a, b)(x − a) + fy (a, b)(y − b)


1
+ [fxx (a, b)(x − a)2 + fxy (a, b)(x − a)(y − b)
2
+ fyx (a, b)(y − b)(x − a) + fyy (a, b)(y − b)2 ]
x−a
= f (a, b) + (fx (a, b) fy (a, b)) ( )
y−b
1 f (a, b) fxy (a, b) x − a
+ (x − ay − b) ( xx )( )
2 fyx (a, b) fyy (a, b) y − b
1
= f (a) + Df (a)(x − a) + (x − a)T Hf (a)(x − a)
2
*the answer should be a polynomial in x, y if a is given
in fact, the same formula holds for any f ∶ Rn → R
3.1 Taylor’s Theorem

Example 3.2
Define f ∶ R2 → R by f (x, y) = ex sin (x + y) and consider a = 0. Then

2ex cos (x + y) ex (− sin (x + y) + cos (x + y))


Hf = ( x )
e (− sin (x + y) + cos (x + y)) −ex sin (x + y)

and
P2 (x, y) = x + y + x2 + xy.
3.1 Taylor’s Theorem

Proof.

given f (x, y) = ex sin (x + y)


we have Df = (ex (sin (x + y) + cos (x + y)) ex cos (x + y))
the Hessian Hf is

2ex cos (x + y) ex (− sin (x + y) + cos (x + y))


( x )
e (− sin (x + y) + cos (x + y)) −ex sin (x + y)

2 1
since Df (0, 0) = (1 1) and Hf (0, 0) = ( ), we obtain
1 0

x 1 2 1 x
P2 (x, y) = f (0, 0) + (1 1) ( ) + (x y) ( )( )
y 2 1 0 y
= x + y + x2 + xy *Polynomial in x, y
3.1 Taylor’s Theorem

Example 3.3
Define f ∶ R2 → R by f (x, y) = ln (x2 + y 2 + 1) and consider a = 0. For
any (x, y) with ∣x∣ , ∣y∣ ⩽ 0.1, we have

f (x, y) = x2 + y 2 + E(x, y),

where ∣E(x, y)∣ ⩽ 0.00083.


error term
=absolute value of the remainder of Taylor's Theorem.
3.1 Taylor’s Theorem

Proof.

given f (x, y) = ln (x2 + y 2 + 1)


we have
2x 2y
Df (x, y) = (fx fy ) = ( )
x2 + y 2 + 1 x2 + y 2 + 1
and

⎛ 2(−x + y + 1) −4xy
2 2

f fxy ⎜ (x2 + y 2 + 1)2 (x2 + y 2 + 1)2 ⎟
Hf (x, y) = ( xx )=⎜



fyx fyy ⎜ −4xy 2(x2 − y 2 + 1) ⎟
⎝ (x2 + y 2 + 1)2 (x2 + y 2 + 1)2 ⎠
3.1 Taylor’s Theorem

Proof.

using the second-order Taylor’s theorem, the main term is

x 1 x
P2 (x, y) = f (0, 0) + Df (0, 0) ( ) + (x y) Hf (0, 0) ( )
y 2 y
x 1 2 0 x
= 0 + (0 0) ( ) + (x y) ( )( )
y 2 0 2 y
= x2 + y 2

by proposition 3.1, the remainder term is


1
E(x, y) = (fxxx (ξ)x3 + 3fxxy (ξ)x2 y + 3fxyy (ξ)xy 2 + fyyy (ξ)y 3 )
3!
for some ξ = (ξ1 , ξ2 ) lying between (0, 0) and (x, y)
3.1 Taylor’s Theorem

Proof.

we compute

−4x(−x2 + 3y 2 + 3)
fxxx = ,
(x2 + y 2 + 1)3
−4y(−3x2 + y 2 + 1)
fxxy = fxyx = fyxx = ,
(x2 + y 2 + 1)3
−4x(x2 − 3y 2 + 1)
fxyy = fyxy = fyyx = ,
(x2 + y 2 + 1)3
−4y(3x2 − y 2 + 3)
fyyy =
(x2 + y 2 + 1)3
3.1 Taylor’s Theorem

Proof.

since ξ lies between (0, 0) and (x, y), we have ∣ξ1 ∣ , ∣ξ2 ∣ ⩽ 0.1
by the triangle inequality, we obtain
*absolute every term
−4ξ1 (−ξ12 + 3ξ22 + 3)
∣fxxx (ξ)∣ = ∣ ∣
(ξ12 + ξ22 + 1)3
∣4ξ1 ∣ (∣ξ12 ∣ + ∣3ξ22 ∣ + ∣3∣) ≤ (0.1)^2....

(ξ12 + ξ22 + 1)3 ≥ (0+0+1)^3

4(0.1)[(0.1) + 3(0.1)2 + 3]
2

(02 + 02 + 1)3
= 1.216

similarly, we find that ∣fxxy ∣ ⩽ 0.416, ∣fxyy ∣ ⩽ 0.416 and ∣fyyy ∣ ⩽ 1.216
3.1 Taylor’s Theorem

Proof.

by the triangle inequality, we finally obtain

∣E(x, y)∣
1
⩽ [∣fxxx (ξ)x3 ∣ + ∣3fxxy (ξ)x2 y∣ + ∣3fxyy (ξ)xy 2 ∣ + ∣fyyy (ξ)y 3 ∣]
6
1
⩽ [(1.216)(0.1)3 + 3(0.416)(0.1)3 + 3(0.416)(0.1)3
6
+ (1.216)(0.1)3 ]
⩽ 0.00083

You might also like