2.5 Chain Rule for Multiple Variables Prof. Tesler Math 20C Fall 2018 Prof. Tesler 2.5 Chain Rule Math 20C / Fall 2018 1 / 39
Review of the chain for functions of one variable Chain rule d dx f ( g ( x )) = f ′ ( g ( x )) g ′ ( x ) Example d dx sin ( x 2 ) = cos ( x 2 ) · ( 2 x ) = 2 x cos ( x 2 ) This is the derivative of the outside function (evaluated at the inside function), times the derivative of the inside function. Prof. Tesler 2.5 Chain Rule Math 20C / Fall 2018 2 / 39
Function composition Composing functions of one variable g ( x ) = x 2 Let f ( x ) = sin ( x ) The composition of these is the function h = f ◦ g : h ( x ) = f ( g ( x )) = sin ( x 2 ) The notation f ◦ g is read as “ f composed with g ” or “the composition of f with g .” Prof. Tesler 2.5 Chain Rule Math 20C / Fall 2018 3 / 39
Function composition: Diagram h = f ◦ g composition g f A B C inside function outside function A , B , C are sets. They can have different dimensions, e.g., A ⊆ R n B ⊆ R m C ⊆ R p f , g , and h are functions. Domains and codomains: f : B → C g : A → B h : A → C Prof. Tesler 2.5 Chain Rule Math 20C / Fall 2018 4 / 39
Function composition: Multiple variables f : R 2 → R f ( x , y ) = x 2 + y r : R → R 2 r ( t ) = � x ( t ) , y ( t ) � � � = � 2 t + 1 , 3 t − 1 � f ◦ � r : R → R ( f ◦ � r )( t ) = f ( � r ( t )) = f ( 2 t + 1 , 3 t − 1 ) = ( 2 t + 1 ) 2 + ( 3 t − 1 ) = 4 t 2 + 7 t Derivative of f ( � r ( t )) Notations: d r ( t )) = d r ) ′ ( t ) dt f ( � dt ( f ◦ � r )( t ) = ( f ◦ � ( f ◦ � r ) ′ ( t ) = 8 t + 7 Example: r ) ′ ( 10 ) = 8 · 10 + 7 = 87 ( f ◦ � Prof. Tesler 2.5 Chain Rule Math 20C / Fall 2018 5 / 39
Hiking trail Altitude z=f(x,y) x,y,z in feet, t in hours 40000 30000 5 ● 4 ● 20000 3 ● y ● ● 2 1 10000 t=0 ● 0 0 10000 20000 30000 40000 x A mountain has altitude z = f ( x , y ) above point ( x , y ) . Plot a hiking trail ( x ( t ) , y ( t )) on the contour map. This gives altitude z ( t ) = f ( x ( t ) , y ( t )) , and 3D trail ( x ( t ) , y ( t ) , z ( t )) . What is the hiker’s vertical speed, dz / dt ? Prof. Tesler 2.5 Chain Rule Math 20C / Fall 2018 6 / 39
What is dz / dt = vertical speed of hiker? time t+ ∆ t ● (x+ ∆ x,y+ ∆ y) time t ● (x,y) Let ∆ t = very small change in time. The change in altitude is ∆ z = z ( t + ∆ t ) − z ( t ) ≈ f x ( x , y ) ∆ x + f y ( x , y ) ∆ y Using the linear approximation Prof. Tesler 2.5 Chain Rule Math 20C / Fall 2018 7 / 39
What is dz / dt = vertical speed of hiker? Let ∆ t = very small change in time. The change in altitude is ∆ z = z ( t + ∆ t ) − z ( t ) ≈ f x ( x , y ) ∆ x + f y ( x , y ) ∆ y Using the linear approximation The vertical speed is approximately ∆ z ∆ t ≈ f x ( x , y ) ∆ x ∆ t + f y ( x , y ) ∆ y ∆ t The instantaneous vertical speed is the limit of this as ∆ t → 0 : dz dt = f x ( x , y ) dx dt + f y ( x , y ) dy dt Prof. Tesler 2.5 Chain Rule Math 20C / Fall 2018 8 / 39
Chain rule for paths Our book: “First special case of chain rule” Let z = f ( x , y ) , where x and y are functions of t . So z ( t ) = f ( x ( t ) , y ( t )) . Then dz dt = f x ( x , y ) dx dt + f y ( x , y ) dy dz dt = ∂ f dx dt + ∂ f dy or dt ∂ x ∂ y dt Vector version Let z = f ( x , y ) and � r ( t ) = � x ( t ) , y ( t ) � . z ( t ) = f ( x ( t ) , y ( t )) becomes z ( t ) = f ( � r ( t )) . The chain rule becomes d r ′ ( t ) dt f ( r ( t )) ≈ ∇ f · � � where ∇ f = � ∂ f ∂ x , ∂ f dt , dy r ′ ( t ) = � dx ∂ y � and � dt � . Prof. Tesler 2.5 Chain Rule Math 20C / Fall 2018 9 / 39
Chain rule example Let z = f ( x , y ) = x 2 + y where x = 2 t + 1 and y = 3 t − 1 Compute dz / dt . First method: Substitution / Function composition Explicitly compute z as a function of t . Plug x and y into z , in terms of t : z = x 2 + y = ( 2 t + 1 ) 2 + ( 3 t − 1 ) = 4 t 2 + 4 t + 1 + 3 t − 1 = 4 t 2 + 7 t Then compute dz / dt : dz dt = 8 t + 7 Prof. Tesler 2.5 Chain Rule Math 20C / Fall 2018 10 / 39
Chain rule example Let z = f ( x , y ) = x 2 + y where x = 2 t + 1 and y = 3 t − 1 . Compute dz / dt . Second method: Chain rule Chain rule formula: dt = ∂ z dt + ∂ z dz dx dy ∂ x ∂ y dt = 2 x · 2 + 1 · 3 = 4 x + 3 Plug in x , y in terms of t : = 4 ( 2 t + 1 ) + 3 = 8 t + 4 + 3 = 8 t + 7 This agrees with the first method. Prof. Tesler 2.5 Chain Rule Math 20C / Fall 2018 11 / 39
Chain rule example Let z = f ( x , y ) = x 2 + y where x = 2 t + 1 and y = 3 t − 1 . Compute dz / dt . Vector version Convert from components x ( t ) , y ( t ) to position vector function � r ( t ) . r ( t ) = � x ( t ) , y ( t ) � = � 2 t + 1 , 3 t − 1 � � r ) ′ ( t ) : Compute the derivative dz / dt = ( f ◦ � dz r ′ ( t ) = � 2 x , 1 � · � 2 , 3 � = 4 x + 3 = · · · = 8 t + 7 as before. dt = ∇ f · � Prof. Tesler 2.5 Chain Rule Math 20C / Fall 2018 12 / 39
Tree diagram of chain rule (not in our book) z = f ( x , y ) where x and y are functions of t , gives z = h ( t ) = f ( x ( t ) , y ( t )) z ∂ z ∂ z z = f ( x , y ) depends on two variables. ∂ y ∂ x Use partial derivatives. y x x and y each depend on one variable, t . dx dy dt Use ordinary derivative. dt t t To compute dz dt : There are two paths from z at the top to t ’s at the bottom. Along each path, multiply the derivatives. Add the products over all paths. dt = ∂ z dt + ∂ z dz dx dy ∂ x ∂ y dt Prof. Tesler 2.5 Chain Rule Math 20C / Fall 2018 13 / 39
Tree diagram of chain rule z = f ( x , y ) , x = g 1 ( u , v ) , y = g 2 ( u , v ) , gives z = h ( u , v ) = f ( g 1 ( u , v ) , g 2 ( u , v )) z ∂ z ∂ z z = f ( x , y ) depends on two variables. ∂ y ∂ x Use partial derivatives. y x x and y each depend on two variables. ∂ x ∂ x ∂ y ∂ y ∂ u ∂ v Use partial derivatives. ∂ u ∂ v u v u v To compute ∂ z ∂ u : Highlight the paths from the z at the top to the u ’s at the bottom. Along each path, multiply the derivatives. Add the products over all paths. ∂ u = ∂ z ∂ z ∂ u + ∂ z ∂ x ∂ y ∂ x ∂ y ∂ u Prof. Tesler 2.5 Chain Rule Math 20C / Fall 2018 14 / 39
Tree diagram of chain rule z = f ( x , y ) , x = g 1 ( u , v ) , y = g 2 ( u , v ) , gives z = h ( u , v ) = f ( g 1 ( u , v ) , g 2 ( u , v )) z ∂ z ∂ z z = f ( x , y ) depends on two variables. ∂ y ∂ x Use partial derivatives. y x x and y each depend on two variables. ∂ x ∂ x ∂ y ∂ y ∂ u ∂ v Use partial derivatives. ∂ u ∂ v u v u v To compute ∂ z ∂ v : Highlight the paths from the z at the top to the v ’s at the bottom. Along each path, multiply the derivatives. Add the products over all paths. ∂ v = ∂ z ∂ z ∂ x ∂ v + ∂ z ∂ y ∂ x ∂ y ∂ v Prof. Tesler 2.5 Chain Rule Math 20C / Fall 2018 15 / 39
Example: Chain rule to convert to polar coordinates Let z = f ( x , y ) = x 2 y where x = r cos ( θ ) and y = r sin ( θ ) Compute ∂ z /∂ r and ∂ z /∂θ using the chain rule ∂ z ∂ r = ∂ z ∂ x ∂ r + ∂ z ∂ y ∂ x ∂ y ∂ r = 2 xy ( cos θ ) + x 2 ( sin θ ) = 2 ( r cos θ )( r sin θ )( cos θ ) + ( r cos θ ) 2 ( sin θ ) = 3 r 2 cos 2 θ sin θ ∂θ = ∂ z ∂ z ∂θ + ∂ z ∂ x ∂ y ∂ x ∂ y ∂θ = 2 xy (− r sin θ ) + x 2 ( r cos θ ) = 2 ( r cos θ )( r sin θ )(− r sin θ ) + ( r cos θ ) 2 ( r cos θ ) = − 2 r 3 cos θ sin 2 θ + r 3 cos 3 θ Prof. Tesler 2.5 Chain Rule Math 20C / Fall 2018 16 / 39
Example: Chain rule to convert to polar coordinates Let z = f ( x , y ) = x 2 y where x = r cos ( θ ) and y = r sin ( θ ) Use substitution to confirm it z = x 2 y = ( r cos θ ) 2 ( r sin θ ) = r 3 cos 2 θ sin θ ∂ z ∂ r = 3 r 2 cos 2 θ sin θ ∂ z ∂θ = r 3 (− 2 cos θ sin 2 θ + cos 3 θ ) Prof. Tesler 2.5 Chain Rule Math 20C / Fall 2018 17 / 39
Example: Related rates using measurements A balloon is approximately an z ellipsoid, with radii a , b , c : c b y ● ( x − x 0 ) 2 + ( y − y 0 ) 2 + ( z − z 0 ) 2 (x 0 ,y 0 ,z 0 ) a = 1 x a 2 b 2 c 2 Radii a ( t ) , b ( t ) , c ( t ) at time t vary as balloon is inflated/deflated. Volume V ( t ) = 4 π 3 a ( t ) b ( t ) c ( t ) . Instead of formulas for a ( t ) , b ( t ) , c ( t ) , we have experimental measurements. At time t = 2 sec: da a = 4 in dt = − . 5 in/sec db dt = dc b = c = 3 in dt = − . 9 in/sec What is dV dt at t = 2 ? Prof. Tesler 2.5 Chain Rule Math 20C / Fall 2018 18 / 39
Example: Related rates using measurements Volume V ( t ) = 4 π 3 a ( t ) b ( t ) c ( t ) , and at time t = 2 : da a = 4 in dt = − . 5 in/sec db dt = dc b = c = 3 in dt = − . 9 in/sec Without formulas for a ( t ) , b ( t ) , c ( t ) , we can’t compute V ( t ) as a function and differentiate it to get V ′ ( t ) as a function. But we can still evaluate V ( 2 ) = 4 π 3 ( 4 )( 3 )( 3 ) = 48 π and V ′ ( 2 ) : dt = ∂ V dt + ∂ V dt + ∂ V dV da db dc ∂ a ∂ b ∂ c dt = 4 π bc da dt + ac db dt + ab dc � � 3 dt � � At time t = 2 : = 4 π ( 3 )( 3 )(− . 5 ) + ( 4 )( 3 )(− . 9 ) + ( 4 )( 3 )(− . 9 ) 3 = 4 π ≈ − 109 . 33 in 3 / sec � � − 26 . 1 3 Prof. Tesler 2.5 Chain Rule Math 20C / Fall 2018 19 / 39
Recommend
More recommend