differential calculus: a refresher · differential calculus ii –rafael lópez-monti 1...
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
George Washington University
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: 𝒛 = 𝒇(𝒙, 𝒚)
Define ∆𝑧 = 𝑓 𝑥1 + 𝑑𝑥1, 𝑥2 + 𝑑𝑥2, … , 𝑥𝑛 + 𝑑𝑥𝑛 − 𝑓 𝑥1, 𝑥2, … , 𝑥𝑛
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.
We know that:𝑃𝑛 𝑥 = 𝑎0 + 𝑎1𝑥 + 𝑎2𝑥2 + ⋯ + 𝑎𝑛𝑥𝑛
Note :𝑃𝑛
′ x = 𝑎1 + 2𝑎2𝑥 + ⋯ + 𝑛𝑎𝑛𝑥𝑛−1
𝑃𝑛′′ x = 2𝑎2 + 3.2. 𝑎3𝑥 + ⋯ + 𝑛(𝑛 − 1)𝑎𝑛𝑥𝑛−2
𝑃𝑛′′′ x = 3.2. 𝑎3 + 4.3.2. 𝑎4𝑥 + ⋯ + 𝑛(𝑛 − 1)(𝑛 − 2)𝑎𝑛𝑥𝑛−3
⋮𝑃𝑛
𝑛 x = 𝑛 𝑛 − 1 𝑛 − 2 . . 2.1. 𝑎𝑛
4
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 𝑃𝑛, 𝑥: 𝑋 → ℝ:
𝑃𝑛, 𝑥 𝑥 = 𝑎0 + 𝑎1(𝑥 − 𝑥) + 𝑎2(𝑥 − 𝑥)2+⋯ + 𝑎𝑛(𝑥 − 𝑥)𝑛
Following the same procedure as in the previous section:𝑃𝑛, 𝑥
′ x = 𝑎1 + 2𝑎2(𝑥 − 𝑥) + ⋯ + 𝑛𝑎𝑛(𝑥 − 𝑥)𝑛−1
𝑃𝑛, 𝑥′′ x = 2𝑎2 + 3.2. 𝑎3(𝑥 − 𝑥) + ⋯ + 𝑛(𝑛 − 1)𝑎𝑛(𝑥 − 𝑥)𝑛−2
𝑃𝑛, 𝑥′′′ x = 3.2. 𝑎3 + 4.3.2. 𝑎4(𝑥 − 𝑥) + ⋯ + 𝑛(𝑛 − 1)(𝑛 − 2)𝑎𝑛(𝑥 − 𝑥)𝑛−3
⋮𝑃𝑛, 𝑥
𝑛 x = 𝑛 𝑛 − 1 𝑛 − 2 . . 2.1. 𝑎𝑛
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) 𝑥, 𝑦 :
𝒇 𝒙, 𝒚 = 𝒇 𝒙, 𝒚 + 𝒇𝒙 𝒙, 𝒚 𝒙 − 𝒙 + 𝒇𝒚 𝒙, 𝒚 𝒚 − 𝒚
+𝟏
𝟐!𝒇𝒙𝒙 𝒙, 𝒚 𝒙 − 𝒙 𝟐 + 𝒇𝒚𝒚 𝒙, 𝒚 𝒚 − 𝒚 𝟐 + 𝟐𝒇𝒙𝒚 𝒙, 𝒚 𝒙 − 𝒙 𝒚 − 𝒚
+𝟏
𝟑![𝒇𝒙𝒙𝒙 𝒙, 𝒚 𝒙 − 𝒙 𝟑 + 𝒇𝒚𝒚𝒚 𝒙, 𝒚 𝒚 − 𝒚 𝟑 + 𝟑𝒇𝒙𝒙𝒚 𝒙, 𝒚 𝒙 − 𝒙 𝟐 𝒚 − 𝒚 + 𝟑𝒇𝒙𝒚𝒚 𝒙, 𝒚 (𝒙 − 𝒙) 𝒚 − 𝒚 𝟐]
+ ⋯ + 𝑹𝒇,𝒏,( 𝒙, 𝒚) 𝒙, 𝒚
Work in groups with the following example:
Find the fourth degree Taylor Polynomial for the function:𝒇 𝒙 = 𝒙𝟑 − 𝟏𝟎𝒙𝟐 + 𝟔 about 𝒙 = 𝟑
11
Differential Calculus II – Rafael López-MontiGWU Math Camp 2014
INTEGRATION:
Example:
𝒂𝒙𝟐 + 𝒍𝒏 𝒙 𝒅𝒙 = 𝒂 𝒙𝟐𝒅𝒙 + 𝒍𝒏𝒙 𝒅𝒙
= 𝒂𝒙𝟑
𝟑+ 𝒙. 𝒍𝒏 𝒙 − 𝒙 + 𝑪 = 𝑭 𝒙 + 𝑪
Checking:
𝒅(𝑭 𝒙 +𝑪)
𝒅𝒙= 𝒂𝒙𝟐 + 𝒙.
𝟏
𝒙+ 𝒍𝒏𝒙 − 𝟏
then 𝒅(𝑭 𝒙 +𝑪)
𝒅𝒙= 𝒂𝒙𝟐 + 𝒍𝒏 𝒙
12
Definition: The indefinite Integrals can be defined as:
𝒇 𝒙 𝒅𝒙 = 𝑭 𝒙 + 𝑪 ⇔ 𝑭′ 𝒙 = 𝒇(𝒙)
I. Indefinite Integrals
Differential Calculus II – Rafael López-MontiGWU Math Camp 2014
Integration by Parts:
𝒇 𝒙 𝒈′ 𝒙 𝒅𝒙 = 𝒇 𝒙 𝒈 𝒙 − 𝒇′ 𝒙 𝒈 𝒙 𝒅𝒙
Proof: Left as an exercise.
Example: Integrate
𝑥. 𝑙𝑛 𝑥 𝑑𝑥
Let 𝒇 𝒙 = 𝒍𝒏 𝒙 𝑎𝑛𝑑 𝒈′ 𝒙 = 𝒙
Then 𝒇′ 𝒙 = 𝟏 𝒙 and 𝒈 𝒙 = 𝒙 𝒅𝒙 = 𝒙𝟐
𝟐 [See the Integration Table provided]
Applying the definition of integration by parts:
𝑥. 𝑙𝑛 𝑥 𝑑𝑥 =𝑥2
2𝑙𝑛𝑥 −
1
𝑥.𝑥2
2𝑑𝑥
=𝑥2
2𝑙𝑛𝑥 −
1
4𝑥2 + 𝐶
13
Differential Calculus II – Rafael López-MontiGWU Math Camp 2014
II. Definite Integrals
14
If 𝒇: [𝒂, 𝒃] → ℝ is differentiable and 𝒇′: [𝒂, 𝒃] → ℝ is integrable, then
𝒂
𝒃
𝒇′ 𝒙 𝒅𝒙 = 𝒇 𝒃 − 𝒇(𝒂)
FIRST FUNDAMENTAL THEOREM OF CALCULUS:
Suppose that 𝒇: [𝒂, 𝒃] → ℝ is integrable. Define 𝑭: 𝒂, 𝒃 → ℝ by ∀𝒙 ∈ [𝒂, 𝒃]:
𝑭 𝒙 = 𝒂
𝒙
𝒇 𝒕 𝒅𝒕
If 𝒇 is continuous at 𝒙 ∈ 𝑿, then:
𝑭′ 𝒙 = 𝒇( 𝒙)
SECOND FUNDAMENTAL THEOREM OF CALCULUS:
Differential Calculus II – Rafael López-MontiGWU Math Camp 2014
Recalling:
𝐀 𝒙 = 𝒂
𝒙
𝒇 𝒕 𝒅𝒕 ⟹ 𝑨′ 𝒙 = 𝒇 𝒙
𝐀 𝒙 = 𝒙
𝒃
𝒇 𝒕 𝒅𝒕 ⟹ 𝑨′ 𝒙 = −𝒇 𝒙
The shaded area is 𝑨 𝒙 = 𝒂
𝒙𝒇 𝒕 𝒅𝒕, and the derivative of the area function
𝑨 𝒙 is 𝑨′ 𝒙 = 𝒇 𝒙 by the SFTC
Graphically:
15
Differential Calculus II – Rafael López-MontiGWU Math Camp 2014
Properties of Definite Integrals:
1. b
a
a
bdxxfdxxf )()(
2. a
aaFaFdxxf 0)()()(
3. c
b
c
a
b
adxxfdxxfdxxf )()()( for cba
4. ( ) ( ) [ ( ) ( )]b b b
a a af x dx g x dx f x g x dx
5. b
a
b
adxxfkdxxkf )()(
16
We can also apply integration by parts with definite integrals:
𝒂
𝒃
𝒇 𝒙 . 𝒈′ 𝒙 = (𝒇 𝒙 . 𝒈 𝒙 )𝒂
𝒃−
𝒂
𝒃
𝒇′ 𝒙 . 𝒈(𝒙)
Differential Calculus II – Rafael López-MontiGWU Math Camp 2014
Example: Evaluate
𝟔
𝟎
(𝟐 + 𝟓𝐱)𝒆𝟏𝟑𝒙𝒅𝒙
Step 1. Pick f(x) and g’(x) to get an easier integral to evaluate in the Integrationby Parts formula.
𝒇 𝒙 = 𝟐 + 𝟓𝒙 𝑎𝑛𝑑 𝒈′ 𝒙 = 𝒆𝟏𝟑𝒙
Therefore, 𝒇′ 𝒙 = 𝟓 and 𝒈 𝒙 = 𝒆𝟏
𝟑𝒙 𝒅𝒙 = 𝟑. 𝒆
𝟏
𝟑𝒙
Step 2. Plug into the Integration by Parts formula:
6
0
(2 + 5x)𝑒13𝑥𝑑𝑥 = ( 2 + 5𝑥 . 3. 𝑒
13𝑥)
6
0
− 6
0
5. (3. 𝑒13𝑥)𝑑𝑥
Step 3. Evaluate the new integral and substitute in the formula
6
0
(2 + 5x)𝑒13𝑥𝑑𝑥 = ( 2 + 5𝑥 . 3. 𝑒
13𝑥)
6
0
−( 45. 𝑒13𝑥)
6
0
Step 4. Take care of the limits, what we found is an area.
6
0
(2 + 5x)𝑒13𝑥𝑑𝑥 = ( 15𝑥. 𝑒
13𝑥 − 39𝑒
13𝑥)
6
0
= 0 − 39 − 90𝑒2 − 39𝑒2 = −𝟒𝟏𝟓. 𝟖𝟒
17
Differential Calculus II – Rafael López-MontiGWU Math Camp 2014
Differentiation under the integral sign:
18
The Leibniz’s formula:
𝒅
𝒅𝒙 𝒖(𝒙)
𝒗(𝒙)
𝒇 𝒙, 𝒚 𝒅𝒚 = −𝒇 𝒙, 𝒖 𝒙𝒅𝒖
𝒅𝒙+ 𝒇 𝒙, 𝒗 𝒙
𝒅𝒗
𝒅𝒙+
𝒖(𝒙)
𝒗(𝒙) 𝝏
𝝏𝒙𝒇 𝒙, 𝒚 𝒅𝒚
Note: Here the interval of the integral is a function of x
Suppose 𝒇 𝒙, 𝒚 is a function on the rectangle 𝑹 = 𝒂, 𝒃 𝒙[𝒄, 𝒅], and𝝏𝒇
𝝏𝒚𝒙, 𝒚 is
continuous on 𝑹. Then:𝒅
𝒅𝒚 𝒂
𝒃
𝒇 𝒙, 𝒚 𝒅𝒙 = 𝒂
𝒃 𝝏𝒇
𝝏𝒚𝒙, 𝒚 𝒅𝒙
THEOREM:
Note: a and b are independent of x.
Differential Calculus II – Rafael López-MontiGWU Math Camp 2014
𝛀𝑨
𝒇 𝒙, 𝒚 𝒅𝒙𝒅𝒚 = 𝒂
𝒃
𝒖(𝒙)
𝒗(𝒙)
𝒇 𝒙, 𝒚 𝒅𝒚 𝒅𝒙
The double integral of a function 𝒇 𝒙, 𝒚over the region 𝜴𝑨
Multiple integrals:Definition of the double integral of 𝒇 𝒙, 𝒚 over a rectangle 𝑹 = 𝒂, 𝒃 𝒙[𝒄, 𝒅]:
𝑹
𝒇 𝒙, 𝒚 𝒅𝒙𝒅𝒚 = 𝒂
𝒃
𝒄
𝒅
𝒇 𝒙, 𝒚 𝒅𝒚 𝒅𝒙 = 𝒄
𝒅
𝒂
𝒃
𝒇 𝒙, 𝒚 𝒅𝒙 𝒅𝒚
19
The two iterated integrals are equal for continuous functions.
FUBINI’S THEOREM: