Professional Documents
Culture Documents
Lecture 09 PDF
Lecture 09 PDF
1
Brook Taylor
𝜕𝑓 𝜕𝑓
𝑓(1.02, 1.97) ≈ 𝑓(1, 2) + (1, 2)(1.02 − 1) + (1, 2)(1.97 − 2)
𝜕𝑥 𝜕𝑦
= 2.94667.
3
Computing without a computer
𝜕𝑓 𝜕𝑓
𝑓(1.02, 1.97) ≈ 𝑓(1, 2) + (1, 2)(1.02 − 1) + (1, 2)(1.97 − 2)
𝜕𝑥 𝜕𝑦
= 2.94667.
3
Review: Taylor’s formula for
one-variable
Taylor’s formula for one-variable
4
Taylor’s formula for one-variable
𝑓 (𝑛+1) (𝑠)
𝑟𝑛 (𝑥) = 𝑓(𝑥) − 𝑝𝑛 (𝑥) = (𝑥 − 𝑎)𝑛+1
(𝑛 + 1)!
4
√
Example — 𝑥
√
For 𝑓(𝑥) = 𝑥, at the point 𝑥 = 1,
𝑝1 (1.1) =1.05000000000000
𝑝2 (1.1) =1.04875000000000
…
𝑝9 (1.1) =1.04880884817101
𝑓(1.1) =1.04880884817015
5
√
Example — 𝑥
√
For 𝑓(𝑥) = 𝑥, at the point 𝑥 = 1,
1.5
1.4
x
1
1.3 1+ (-1 + x)
2
1 1
1+ (-1 + x) - (-1 + x)2
2 8
1 1 1
1.2 1+ (-1 + x) - (-1 + x)2 + (-1 + x)3
2 8 16
1 1 1 5
1+ (-1 + x) - (-1 + x)2 + (-1 + x)3 - (-1 + x)4
2 8 16 128
1.1
x
1.2 1.4 1.6 1.8 2.0
5
Taylor’s formula for several variables
A bit notations
6
A bit notations
6
A bit notations
7
Taylor’s formula for 𝑛 variables
⎡ ℎ1 ⎤
d ⎢ ⎥
𝐹 (𝑡) = 𝑓(y(𝑡)) = 𝑓 ′ (y(𝑡))y′ (𝑡) = [𝑓1 (y(𝑡)) …
′
𝑓𝑛 (y(𝑡))] ⎢ ⋮ ⎥
d𝑡 ⎢ ⎥
ℎ
⎣ 𝑛⎦
= h ⋅ ∇𝑓(y(𝑡)) = (h ⋅ ∇)𝑓(y(𝑡)).
𝜕𝑓
Note 𝑓𝑖 = 𝜕𝑥𝑖 , the partial derivative of 𝑓 with respect to 𝑥𝑖 .
7
Taylor’s formula for 𝑛 variables
8
Taylor’s formula for 𝑛 variables
8
Taylor’s formula for 𝑛 variables
In particular
8
Taylor’s formula for 𝑛 variables
9
Taylor’s formula for 𝑛 variables
9
Taylor’s formula for 𝑛 variables
for some 𝜃 ∈ [0, 1]. The polynomial 𝑝𝑚 (x) is called the 𝑚-th
degree Taylor polynomial of 𝑓(x) at a.
10
Why do we need Taylor’s polynomials?
x 32 + x 21
p1 (x 1 , x 2 )
p2 (x 1 , x 2 )
11
What are (h ⋅ ∇)𝑚 𝑓?
By definition,
(h ⋅ ∇)𝑓 = h ⋅ (∇𝑓) = (ℎ1 , … , ℎ𝑛 ) ⋅ (𝑓1 , 𝑓2 , … , 𝑓𝑛 )
𝑛
= ℎ1 𝑓1 + ⋯ + ℎ𝑛 𝑓𝑛 = ∑ ℎ𝑖 𝑓𝑖 .
𝑖=1
12
What are (h ⋅ ∇)𝑚 𝑓?
By definition,
(h ⋅ ∇)𝑓 = h ⋅ (∇𝑓) = (ℎ1 , … , ℎ𝑛 ) ⋅ (𝑓1 , 𝑓2 , … , 𝑓𝑛 )
𝑛
= ℎ1 𝑓1 + ⋯ + ℎ𝑛 𝑓𝑛 = ∑ ℎ𝑖 𝑓𝑖 .
𝑖=1
Then
𝑛 𝑛
(h ⋅ ∇)2 𝑓 = (h ⋅ ∇) ∑ ℎ𝑖 𝑓𝑖 = ∑ ℎ𝑖 (h ⋅ ∇)𝑓𝑖
𝑖=1 𝑖=1
𝑛 𝑛 𝑛 𝑛
= ∑ ℎ𝑖 ∑ ℎ𝑗 𝑓𝑖𝑗 = ∑ ∑ ℎ𝑖 ℎ𝑗 𝑓𝑖𝑗
𝑖=1 𝑗=1 𝑖=1 𝑗=1
12
What are (h ⋅ ∇)𝑚 𝑓?
By definition,
(h ⋅ ∇)𝑓 = h ⋅ (∇𝑓) = (ℎ1 , … , ℎ𝑛 ) ⋅ (𝑓1 , 𝑓2 , … , 𝑓𝑛 )
𝑛
= ℎ1 𝑓1 + ⋯ + ℎ𝑛 𝑓𝑛 = ∑ ℎ𝑖 𝑓𝑖 .
𝑖=1
Then
𝑛 𝑛
(h ⋅ ∇)2 𝑓 = (h ⋅ ∇) ∑ ℎ𝑖 𝑓𝑖 = ∑ ℎ𝑖 (h ⋅ ∇)𝑓𝑖
𝑖=1 𝑖=1
𝑛 𝑛 𝑛 𝑛
= ∑ ℎ𝑖 ∑ ℎ𝑗 𝑓𝑖𝑗 = ∑ ∑ ℎ𝑖 ℎ𝑗 𝑓𝑖𝑗
𝑖=1 𝑗=1 𝑖=1 𝑗=1
and similarly
𝑛 𝑛 𝑛
(h ⋅ ∇)3 𝑓 = ∑ ∑ ∑ ℎ𝑖 ℎ𝑗 ℎ𝑘 𝑓𝑖𝑗𝑘
𝑖=1 𝑗=1 𝑘=1
𝜕2 𝑓 𝜕3 𝑓
Note Here 𝑓𝑖𝑗 = 𝜕𝑥𝑖 𝜕𝑥𝑗 and 𝑓𝑖𝑗𝑘 = 𝜕𝑥𝑖 𝜕𝑥𝑗 𝜕𝑥𝑘
12
Taylor polynomials for two variables
13
Taylor polynomials for two variables
and
2 2
(h ⋅ ∇)2 𝑓 = ∑ ∑ ℎ𝑖 ℎ𝑗 𝑓𝑖𝑗
𝑖=1 𝑗=1
13
Taylor polynomials for two variables 😲😲😲😲
14
Taylor polynomials for two variables 😲😲😲😲
1
𝑝2 (x) = 𝑓(a) + (h ⋅ ∇)𝑓(a) + (h ⋅ ∇)2 𝑓(a)
2!
= 𝑓(a) + 𝑓1 (a)ℎ1 + 𝑓2 (a)ℎ2
1
+ (𝑓11 (a)ℎ21 + 2𝑓12 (a)ℎ1 ℎ2 + 𝑓22 (a)ℎ22 ) .
2!
where ℎ1 = 𝑥1 − 𝑎1 and ℎ2 = 𝑥2 − 𝑎2 .
14
Example
15
Example
15
Example
1
𝑓1 (a) = , 𝑓2 (a) = 2
3
and
8 2 2
𝑓11 (a) = , 𝑓12 (a) = 𝑓21 (a) = − , 𝑓22 (a) = .
27 9 3
15
Example – Solution
17
Quiz
Answer
1 2
𝑝2 (𝑥, 𝑦) = 1 + 𝑥 + 2𝑦 + (𝑥 + 4𝑥𝑦 + 4𝑦2 )
2
17