Lecture 5: 2.5 The Chain rule cont.. The Chain rule in several

advertisement
Lecture 5: 2.5 The Chain rule cont..
The Chain rule in several variables: Suppose that g : Rn → Rm , f : Rm → Rp
and let h = f ◦ g : Rn → Rp (i.e. h(x) = f (g(x))). Then
Dh(x0 ) = Df (y0 ) Dg(x0 ),
where
y0 = g(x0 )
and the right hand side is the p × n matrix formed by the matrix product of the
p × m matrix Df (y0 ) by the m × n matrix Dg(x0 ).
The Chain rule case 1 If If h(t) = f (c(t)) where f : R3 → R, c(t) = (x(t), y(t), z(t))
is a path or curve, then by the chain rule


dx


·
¸  dt 

∂f ∂f ∂f  dy 
∂h
 = ∂f dx + ∂f dy + ∂f dz
= Df Dc =

∂x ∂y ∂z  dt 
∂t
∂y dt
∂z dt
 ∂x dt
 dz 
dt
The gradient of a function f : Rn → R given by
·
∂f
grad f = ∇f =
...
∂x1
∂f
∂xn
¸
This can also be expressed with the gradient notation and dot product
dh
(t) = ∇f (c(t)) · c 0 (t)
dt
where
c0 (t) = (x0 (t), y 0 (t), z 0 (t)).
Ex. If z = x2 + y 2 , x = cos t and y = sin t find dz/dt.
Sol. 1
dz
∂z dx ∂z dy
=
+
= 2x (− sin t)+2y cos t = 2 cos t (− sin t)+2 sin t cos t = 0
dt
∂x dt ∂y dt
dz
=0
dt
Let c(t) = (x(t), y(t)) be a curve in the plane and let f : R2 → R2 .
Then p(t) = f (c(t)) is another curve in the plane and by the chain rule
Sol. 2
z = x2 + y 2 = cos2 t + sin2 t = 1,
p 0 (t) = Df (c(t)) c 0 (t)
where the right is matrix multiplication between the 2 × 2 matrix Df and the
column vector c 0 .
Ex Let f (x1 , x2 ) = (x1 − x2 , x1 + x2 ), c(t) = (1 + t, 3t) and p(t) = f (c(t)). Find p 0 (t).
Sol
·
¸· ¸ ·
¸
1 −1
1
−2
0
0
p (t) = Df (c(t))c (t) =
=
1 1
3
4
1
2
2.6 The gradient and directional derivative.
The gradient of a function f : R3 → R is the vector
µ
¶
∂f ∂f ∂f
∇f =
,
,
∂x ∂y ∂z
i.e. it is the matrix of derivatives written as a vector.
Consider the equation of a line in space `(t) = x + tv, −∞ < t < ∞.
The function h(t) = f◦ `(t) = f (x + tv) represents the function f restricted to the line.
The directional derivative of f at x in the direction of unit vector v is given by
¯
d
¯
f (x + tv)¯
= ∇f (x) · v
dt
t=0
Here the equality follows from the chain rule: h 0 = Dh = Df D` = ∇f · ` 0 = ∇f · v.
The reason we choose v to be a unit vector is that we want the directional derivative
to represent the rate of change in different directions.
Suppose that f represents the temperature at different points in space. Suppose
that a fly flies along the line above at unit speed then the change of temperature
per unit time or distance is the directional derivative.
The gradient points in the direction along which f increases the fastest.
In fact ∇f · v = |∇f | |v| cos θ, where θ is the angle between ∇f and v, and the
max is when cos θ = 1.
Suppose we are lost in wood and we want to reach a high hill top to see where we
are. However, we can only see a few feet in front of us because of the high trees.
In which direction shall we go in order to reach a hill-top fast. The answer is that
if we go in the direction of the grade likely to reach a hill-top fast.
The gradient is normal to the tangent plane of the level surface:
Let f : R3 → R and let (x0 , y0 , z0 ) be a point on the level surface S defined by
f (x, y, z) = k, for some constant k. Then ∇f (x0 , y0 , z0 ) is normal to the level
surface in the following sense: If v is a tangent vector to a path c(t) in S with
c(0) = (x0 , y0 , z0 ), then ∇f (x0 , y0 , z0 ) · v = 0.
In fact, since f (x(t), y(t), z(t)) = k it follows that
0=
d
f (x(t), y(t), z(t)) = ∇f (x(t), y(t), z(t)) · c0 (t)
dt
Let S be a level surface f (x, y, z) = k. The tangent plane of S at a point
(x0 , y0 , z0 ) of S is defined by the equation
∇f (x0 , y0 , z0 ) · (x − x0 , y − y0 , z − z0 ) = 0
In fact (x, y, z) is in the tangent plane if (x, y, z)−(x0 , y0 , z0 ) is parallel to the plane
and hence perpendicular to the normal.
Download