Differential Calculus II – Rafael López-Monti GWU Math Camp 2014 1 Draft for teaching only, do not cite. Please contact me If you find a typo Differential Calculus: A refresher (Part 2) Math Camp, August 2014 Rafael López-Monti Department of Economics – PhD Program George Washington University [email protected]
19
Embed
Differential Calculus: A refresher · Differential Calculus II –Rafael López-Monti 1 Differential Calculus: A refresher (Part 2) Math Camp, August 2014 Rafael López-Monti Department
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Differential Calculus II – Rafael López-MontiGWU Math Camp 2014 1Draft for teaching only, do not cite. Please contact me If you find a typo
Differential Calculus: A refresher
(Part 2)
Math Camp, August 2014
Rafael López-MontiDepartment of Economics – PhD Program
Differential Calculus II – Rafael López-MontiGWU Math Camp 2014
TOTAL DIFFERENTIAL:
2
Definition: If 𝒛 = 𝒇 𝒙𝟏, 𝒙𝟐, … , 𝒙𝒏 is a function mapping from ℝ𝒏 to ℝand 𝒅𝒙𝟏, 𝒅𝒙𝟐, … , 𝒅𝒙𝒏 are arbitrary numbers, the total differential of 𝒛is given by:
𝒅𝒛 =
𝒊=𝟏
𝒏𝝏𝒇(𝒙𝟏, … , 𝒙𝒏)
𝝏𝒙𝒊. 𝒅𝒙𝒊
Let 𝑔 = 𝐺(𝑥1, 𝑥2, … , 𝑥𝑛), and 𝑥𝑖 = 𝑓𝑖 𝑡1, 𝑡2, … , 𝑡𝑚 for 𝑖 = 1,2, … 𝑛 and
𝑗 = 1,2, … 𝑚 be functions. In order to get𝜕𝑔
𝜕𝑡𝑗we can apply the general
chain rule :
𝜕𝑔
𝜕𝑡𝑗=
𝑖=1
𝑛𝜕𝐺(𝑥1, … , 𝑥𝑛)
𝜕𝑥𝑖.𝜕𝑥𝑖
𝜕𝑡𝑗
Differential Calculus II – Rafael López-MontiGWU Math Camp 2014
Geometric illustration of the definition of the differential for functions of two variables: 𝒛 = 𝒇(𝒙, 𝒚)
Thus, ∆𝑧 ≈ 𝑑𝑧 when 𝑑𝑥1 , 𝑑𝑥2 , … , 𝑑𝑥𝑛 are all small enough….
Example: Let 𝑧 = 𝑓 𝑥, 𝑦 = 𝑥2 + 𝑥𝑦 + 𝑦2, find the total differential of z:𝑑𝑧 = 2𝑥 + 𝑦 𝑑𝑥 + 𝑥 + 2𝑦 𝑑𝑦
3
Differential Calculus II – Rafael López-MontiGWU Math Camp 2014
TAYLOR APPROXIMATIONS
I. Approximations by polynomials (Mac Laurin’s Formula)
Given the functions 𝑓: 𝑋 → ℝ , and 𝑓 ∈ 𝐶𝑚 (i.e. m times continuouslydifferentiable), suppose that 0 ∈ 𝑋. For some 𝑛 ∈ ℕ, 𝑎𝑛𝑑 𝑛 < 𝑚, we
want to construct an 𝒏𝒕𝒉 degree polynomial, 𝑃𝑛: 𝑋 → ℝ, such that thevalue of 𝑓and its first 𝑛 derivatives evaluated at zero are the same asthe values of 𝑃𝑛 and its first 𝑛 derivative at 0.
Differential Calculus II – Rafael López-MontiGWU Math Camp 2014
Evaluated at x=0:𝑃𝑛 0 = 𝑎0
𝑃𝑛′ 0 = 𝑎1
𝑃𝑛′′ 0 = 2𝑎2
𝑃𝑛′′′ 0 = 3.2. 𝑎3 = 3! 𝑎3
⋮𝑃𝑛
𝑛 0 = 𝑛 𝑛 − 1 𝑛 − 2 . . 2.1. 𝑎𝑛 = 𝑛! 𝑎𝑛
Since we want to find 𝑎𝑗 𝑗=0
𝑛such that first 𝑛 derivatives of 𝑓 are the
same as the first 𝑛 derivatives of 𝑃𝑛, then:𝑃𝑛 0 = 𝑓(0)𝑃𝑛
′ 0 = 𝑓′(0)𝑃𝑛
′′ 0 = 𝑓′′(0)𝑃𝑛
′′′ 0 = 𝑓′′′(0)⋮𝑃𝑛
𝑛 0 = 𝑓𝑛(0)
The sequence 𝑎𝑗 𝑗=0
𝑛that satisfies these equalities is:
𝑎0 = 𝑓(0) and ∀𝑘 ∈ ℕ, 𝑘 ≤ 𝑛 then 𝑎𝑘 =1
𝑘!𝑓𝑘(0)
5
Differential Calculus II – Rafael López-MontiGWU Math Camp 2014
Example:
Consider 𝑓: −0.5,0.5 → ℝ defined 𝑓 𝑥 =1
1+𝑥 2 . Taking the derivatives:
𝑓′ 𝑥 = −2(1 + 𝑥)−3;𝑓′′ 𝑥 = 6(1 + 𝑥)−4. Evaluate them at zero: 𝑓′ 0 = −2; 𝑓′′ 𝑥 = 6. Knowing that 𝑓 0 = 1, then:
𝑷𝟏 𝒙 = 𝟏 − 𝟐𝒙 (first-degree polynomial)
𝑷𝟐 𝒙 = 𝟏 − 𝟐𝒙 +𝟏
𝟐!𝟔𝒙𝟐 (second-degree polynomial)
6
Therefore the polynomial that we are looking for is:
𝑷𝒏 𝒙 = 𝒇 𝟎 +𝟏
𝟏!𝒇′ 𝟎 𝒙 +
𝟏
𝟐!𝒇′′ 𝟎 𝒙𝟐 + ⋯ +
𝟏
𝒏!𝒇𝒏 𝟎 𝒙𝒏
Since 𝑷𝒏 𝒙 and 𝒇 𝒙 are very close to each other and have the samederivatives when 𝒙 is close to 0, we say that 𝑷𝒏 𝒙 is an 𝒏𝒕𝒉 -orderapproximation of 𝒇 𝒙 about 0.
𝒇 𝒙 ≈ 𝒇 𝟎 +𝟏
𝟏!𝒇′ 𝟎 𝒙 +
𝟏
𝟐!𝒇′′ 𝟎 𝒙𝟐 + ⋯ +
𝟏
𝒏!𝒇𝒏 𝟎 𝒙𝒏
Note: This is just an approximation of 𝒇 𝒙 .
Differential Calculus II – Rafael López-MontiGWU Math Camp 2014
Graphically:
Note: This method is limited because it requires that 0 ∈ X, and we can onlyapproximate the function about 0!!
7
Differential Calculus II – Rafael López-MontiGWU Math Camp 2014
II. Taylor Approximation
We generalize the previous method by using the Taylor Polynomial.Let 𝑥 ∈ 𝑋, the 𝒏𝒕𝒉 degree polynomial about 𝒙 is a function 𝑃𝑛, 𝑥: 𝑋 → ℝ:
Now evaluate 𝑃𝑛, 𝑥 𝑥 and its nth derivatives at 𝑥 = 𝑥:
𝑃𝑛, 𝑥 𝑥 = 𝑎0
𝑃𝑛, 𝑥′ 𝑥 = 𝑎1
𝑃𝑛, 𝑥′′ 𝑥 = 2𝑎2
𝑃𝑛, 𝑥′′′ 𝑥 = 3.2. 𝑎3 = 3! 𝑎3 𝑃𝑛, 𝑥
𝑛 𝑥 = 𝑛 𝑛 − 1 𝑛 − 2 . . 2.1. 𝑎𝑛 = 𝑛! 𝑎𝑛
8
Differential Calculus II – Rafael López-MontiGWU Math Camp 2014
As before, we need to find a sequence 𝑎𝑗 𝑗=0
𝑛, such that the value of 𝑓
and its first 𝑛 derivatives evaluated at 𝑥 are the same as the values of𝑃𝑛, 𝑥 and its first 𝑛 derivative at same point. Thus, we find a similar
sequence:
𝑎0 = 𝑓( 𝑥) and ∀𝑘 ∈ ℕ, 𝑘 ≤ 𝑛 then 𝑎𝑘 =1
𝑘!𝑓𝑘( 𝑥)
9
As a result, we obtain the 𝒏𝒕𝒉degree Taylor polynomial approximation of𝒇 about 𝒙:
𝒇 𝒙 ≈ 𝒇 𝒙 +𝟏
𝟏!𝒇′ 𝒙 𝒙 − 𝒙 +
𝟏
𝟐!𝒇′′ 𝒙 𝒙 − 𝒙 𝟐 + ⋯ +
𝟏
𝒏!𝒇𝒏 𝒙 𝒙 − 𝒙 𝒏 = 𝑻𝒇,𝒏, 𝒙 𝒙
The error (or remainder), denoted as 𝑹𝒇,𝒏, 𝒙 𝒙 , of the 𝒏𝒕𝒉degree Taylorpolynomial approximation of 𝒇 about 𝒙 is:
𝑹𝒇,𝒏, 𝒙 𝒙 = 𝒇 𝒙 − 𝑻𝒇,𝒏, 𝒙 𝒙
Differential Calculus II – Rafael López-MontiGWU Math Camp 2014
Example:
Find the third degree Taylor Polynomial for 𝒇 𝒙 =𝟏
𝒙𝟐 about 𝒙 = −𝟏:
𝒇(𝒊) 𝒙 Evaluated at 𝑥 = −1
𝒇(𝟎) 𝒙 =𝟏
𝒙𝟐𝒇(𝟎) −𝟏 = 𝟏
𝒇(𝟏) 𝒙 = −𝟐𝟏
𝒙𝟑𝒇(𝟏) −𝟏 = 𝟐 = 𝟐!
𝒇(𝟐) 𝒙 = 𝟐. (𝟑)𝟏
𝒙𝟒𝒇(𝟐) −𝟏 = 𝟐. 𝟑 = 𝟑!
𝒇(𝟑) 𝒙 = −𝟐. (𝟑). (𝟒)𝟏
𝒙𝟓𝒇(𝟑) −𝟏 = 𝟐. 𝟑 . 𝟒 = 𝟒!
𝒇 𝒙 ≈ 𝟏 +𝟏
𝟏!𝟐 (𝒙 + 𝟏) +
𝟏
𝟐!𝟔(𝒙 + 𝟏)𝟐+
𝟏
𝟑!𝟐𝟒(𝒙 + 𝟏)𝟑
We can also find the pattern for the Taylor series in this case:
𝒇 𝒙 =𝟏
𝒙𝟐 =
𝒏=𝟎
∞𝒇 𝒏 (−𝟏)
𝒏!(𝒙 + 𝟏)𝒏 =
𝒏=𝟎
∞𝒏 + 𝟏 !
𝒏!(𝒙 + 𝟏)𝒏=
𝒏=𝟎
∞
(𝒏 + 𝟏)(𝒙 + 𝟏)𝒏
10
Differential Calculus II – Rafael López-MontiGWU Math Camp 2014
Taylor expansion with two independent variables:
Let 𝑓: ℝ2 ⟶ ℝ, and consider a point ( 𝑥, 𝑦) that belongs to the domain.The function 𝑓 𝑥, 𝑦 can be expressed as the 𝒏𝒕𝒉 degree Taylorpolynomial about ( 𝑥, 𝑦) plus the error term 𝑅𝑓,𝑛,( x, y) 𝑥, 𝑦 :