CS计算机代考程序代写 chain Lecture # 12 – Derivatives of Functions of Two or More Vari- ables (cont.)

Lecture # 12 – Derivatives of Functions of Two or More Vari- ables (cont.)
Some Definitions: Matrices of Derivatives
• Jacobian matrix
— Associated to a system of equations
— Suppose we have the system of 2 equations, and 2 exogenous variables: y1 = f1(x1,x2)
y2 = f2(x1,x2)
∗ Each equation has two first-order partial derivatives, so there are 2×2=4 first-order
partial derivatives
— Jacobian matrix: array of 2×2 first-order partial derivatives, ordered as follows
∂y1 ∂y1  ∂x1 ∂x2 
J=∂y2 ∂y2  ∂x1 ∂x2
— Jacobian determinant: determinant of Jacobian matrix
Example 1 Suppose y1 = x1x2, and y2 = x1 + x2. Then the Jacobian matrix is
 x2 x1  J= 
11 and the Jacobian determinant is |J| = x2 − x1
— Caveat: Mathematicians (and economists) call ’the Jacobian’ to both the matrix and the determinant
1

— Generalization to system of n equations with n exogenous variables: y1 = f1(x1,x2)
Then, the Jacobian matrix is:
∂y1  ∂x1
 ∂y2 J=∂x1
 .
∂yn ∂x1
∂y1 ···∂y1 ∂x2 ∂xn 
∂y2 ··· ∂y2  ∂x2 ∂xn 
. … . 
∂yn ···∂yn ∂x2 ∂xn
y2 = f2(x1,x2) .
y2 = f2(x1,x2)
2

• Hessian matrix:
— Associated to a single equation — Supposey=f(x1,x2)
∗ There are 2 first-order partial derivatives: ∂y , ∂y ∂x1 ∂x2
∗ There are 2×2 second-order partial derivatives: ∂y , ∂y ∂x1 ∂x2
— Hessian matrix: array of 2×2 second-order partial derivatives, ordered as follows:  ∂2y ∂2y 
H[f(x,x)]= ∂x21 ∂x2∂x1  12
Example 2 Example y = x41 + x2x21 + x32. Then the Hessian matrix is
 1 2 x 21 + 2 x 2 2
H [f (x1, x2)] = 
4 x 1 x 2 

∂y2 ∂2y ∂x1∂x2 ∂x2
4 x 1 x 2
2 x 21 + 6 x 2
— Young’s Theorem: The order of differentiation does not matter, so that if z = h (x, y) :
∂ μ∂z¶= ∂ μ∂z¶= d2z = d2z ∂x dy ∂y ∂x ∂y∂x ∂x∂y
3

— Generalization: Suppose y = f (x1, x2, x3, …, xn) ∗ There are n first-order partial derivatives
∗ There are nxn second-order partial derivatives
— Hessian matrix: nxn matrix of second-order partial derivatives, ordered as follows
∂2y ∂2y···∂2y  ∂ x 21 ∂ x 2 ∂ x 1 ∂ x n ∂ x 1 
 ∂2y ∂2y ··· ∂2y   ∂x1∂x2 ∂x2 ∂xn∂x2 
H [f (x1,x2,…,xn)] =  . . … .  ∂2y ∂2y···∂2y
∂ x 1 ∂ x n ∂ x 2 ∂ x n ∂ x 2n
4

Chain Rules for Many Variables
• Suppose y = f(x,w), while in turn x = g(t) and w = h(t). How does y change when t changes?
dy = ∂y dx + ∂y dw dt ∂x dt ∂w dt
• Suppose y = f (x,w), while in turn x = g(t,s) and w = h(t,s). How does y change when t changes? When s changes?
∂y = ∂y∂x+∂y∂w ∂t ∂x ∂t ∂w ∂t
∂y = ∂y∂x+∂y∂w ∂s ∂x ∂s ∂w ∂s
• Notice that the first point is called the total derivative, while the second is the ’partial total’ derivative
Example3 Supposey=4x−3w,wherex=2tandw=t2 =⇒ the total derivative dy is dy =(4)(2)+(−3)(2t)=8−6t
dt dt
Example 4 Suppose z = 4x2y, where y = ex
=⇒thetotalderivativedz isdz =∂zdx+∂zdy =(8xy)+¡4×2¢(ex)=8xy+4x2y=
4xy(2+x)
Example5 Supposez=x2+12y2 wherex=standy=t−s2
=⇒∂z =∂z∂x+∂z∂y =(2x)(s)+1(2)(y)(1)=2xs+y=2s2t+t−s2 ∂t ∂x ∂t ∂y ∂t 2
=⇒∂z =∂z∂x+∂z∂y =(2x)(t)+1(2)(y)(2s)=2xt+2sy=2st2+2st−2s3 ∂s ∂x ∂s ∂y ∂s 2
5
dx dx ∂x dx ∂y dx

Derivatives of implicit functions
• So far, we have had functions like y = f (x) or z = g (x, w) , where a (endogenous) variable is expressed as a function of other (exogenous) variables =⇒ explicit functions. Examples: y = 4×2, or z = 3xw + ln w
• Suppose we instead have a equation y2 −2xy−x2 = 0. We can write F(y,x) = 0, but we cannot express y explicitly as a function of x. However, it is possible to define a set of
conditions so that an implicit function y = f (x) exists:
1. The function F (y, x) has continuous partial derivatives Fy, Fx
2. Fy 6=0
• Derivative of an implicit function. Suppose we have a function F (y, x) = 0, and we know
an implicit function y = f (x) exists. How do we find how much y changes when x changes?
(i.e., we want fx = dy ) dx
— FindtotaldifferentialforF(y,x)=0=⇒Fy·dy+Fx·dx=d0=0 — Findtotaldifferentialfory=f(x)=⇒dy=fx·dx
— Replacedy=fx·dxintoFy·dy+Fx·dx=0:
Fy ·dy+Fx ·dx = 0 Fy ·(fx ·dx)+Fx ·dx = 0 [Fy·fx+Fx]dx = 0
— Since dx 6= 0, then the term in brackets has to be zero:
F y · f x + F x = 0 =⇒ f x = − F x
— Alternative notation:
Example6F(y,x)=y2−2xy−x2=0.Thendy=−∂x =−−2y−2x=y+x dx ∂F 2y−2x y−x
Example7F(y,x)=yx+1=0.Thendy=−∂x =−y lny=−ylny dx ∂F xyx−1 x
6
dy ∂F = − ∂x
dx ∂F ∂y
∂y ∂F x
∂y
∂F
Fy

• Generalization: One Implicit Equation — Suppose F (y, x1, x2) = 0. Then
∂F = −∂x1 ∂F
∂y ∂F
dx2
Example 8 Suppose y3x + 2yw + xw2 = 0. Then
— Suppose F (y, x1, x2, x3, …, xn) = 0. Then dy ∂F
dy ∂F = −∂x
y3 + w2
=− =−
3y2x+2w
dy ∂F = −∂w
dy
dx1 dy
= −∂x2 ∂F ∂y
dx ∂F ∂y
3y2x+2w 2y + 2xw
dw ∂F ∂y
=−∂xi , foranyi=1,2,3,…,n dxi ∂F
∂y
7