Faculty of Mathematical Studies MA101 Calculus – Outline Notes: Partial Differentiation – The Chain Rule This is discussed in section 12.5 of Adams Suppose that f ( x, y ) is a function of two variables and that x and y are both functions of a single variable t. Substituting for x and y gives g (t ) f x( y), y(t ). We want to find g (t ) in terms of f, x, y, t. We can interpret the problem geometrically as follows. We plot z f ( x, y ) as a surface in 3 dimensions. The functions x(t ), y (t ) give a parametric description of a curve in the x-y plane. z f x( y), y(t ) then represents a curve lying in the surface above that in the x-y plane. z f x(t ), y(t ) z f ( x, y ) x x(t ), y y (t ) dg represents the rate of change of height with respect to t as we move along the curve on dt the surface. Example 1 Let f ( x, y) x 2 y 2 . Then z x 2 y 2 represents a parabola. Let x t , y 2t , which represents a line ( y 2 x ) in the x-y plane. Then z g (t ) t 2 (2t ) 2 5t 2 represents a curve formed by the plane vertically above y 2 x intersecting the surface. The diagram on the next page illustrates the situation. z y x Now g (t ) 10t , and this is the rate at which height changes with respect to t. Now let x cos t , y sin t. This represents a circle in the plane, and gives rise to a horizontal dz 0, which is consistent circle lying in the parabola. Then z cos 2 t sin 2 t 1, and so dt with the circle being at constant height. The Chain Rule We want to be able to calculate g (t ) when the various expressions are complicated. If we substitute we shall obtain an even worse expression. The chain rule enables us to calculate g (t ) in terms of separate derivatives. We shall derive the chain rule from the limit definition of the derivative, but in the course of the argument there are a number of assumptions which a more rigorous treatment would need to consider. g (t h) g (t ) f x(t h), y (t h) f x(t ), y (t ) h h f x(t h), y (t h) f x(t ), y (t h) f x(t ), y (t h) f x(t ), y (t ) h h f x(t h), y (t h) f x(t ), y (t h) x(t h) x(t ) x(t h) x(t ) h f x(t ), y (t h) f x(t ), y (t ) y (t h) y (t ) f dx f dy . . . y (t h) y (t ) h x dt y dt Example 2 We shall consider the two situations in example 1, now using the chain rule as derived above. (i) f ( x, y) x 2 y 2 , x(t ) t , y(t ) 2t. dg f dx f dy . . 2 x 1 2 y 2 2t 8t 10t. dt x dt y dt (ii) f ( x, y) x 2 y 2 , x(t ) cos t , y(t ) sin t. dg f dx f dy . . 2 x( sin t ) 2 y (cos t ) 2 cos t sin t 2 sin t cos t 0. dt x dt y dt Further Chain Rules As well as the formula for the chain rule it is important to be aware of the circumstances in which it applies. The further versions discussed here apply in different circumstances. Suppose that we have a function of one variable f (z ) and that z is a function of two variables, z g ( x, y ). This corresponds to a function f which depends only on the height z on the surface z g ( x, y ). Atmospheric pressure locally is an example. Example 3 Let w sin z, z x 2 y 2 . So w sin x 2 y 2 . We differentiate partially with respect to x thinking of y as a constant by using the ordinary one variable chain rule (we are effectively differentiating w sin x 2 k 2 . So we have w dw z cos x 2 y 2 2 x x dz x w dw z cos x 2 y 2 2 y y dz y Now suppose that z f ( x, y ) and that x and y are themselves functions of two variables. Given by x x(u, v), y y (u, v). To differentiate z with respect to u we keep v constant. So effectively x and y are now functions of the one variable u, and we can use the first chain rule, where the ordinary derivatives with respect to t are now partial derivatives with respect to u. Summary We shall now summarise all the chain rules with the conditions under which they are used, and give the extensions to n variables. 1 Suppose that f(x,y) is a function of two variables, and that x and y are functions of a single variable t. Substituting for x and y gives a function of t, g(t) = f(x(t),y(t)). dg f dx f dy We then have . dt x dt y dt 1A If z f ( x1 , x2 , , x n ) and x1 x1 ( t ), x2 x2 ( t ), , x n x n ( t ) then dz f dx1 f dx 2 f dx n . dt x1 dt x 2 dt x n dt 2 If w = f(z) and z = g(x,y) then w df z w df z and . x dz x y dz y 2A If w = f(z) and z g( x1, , x n ) then w df z w df z w df z ; ; ... ; . x1 dz x1 x 2 dz x 2 x n dz x n 3 Suppose z = f(x,y) and that x and y are expressed in terms of two variables u and v, so that x = x(u,v) and y = y(u,v). Then g(u,v) = f(x(u,v),y(u,v)) and we have g f x f y ; u x u y u 3A g f x f y . v x v y v Suppose z f ( x1 , x2 , , x m ) and x1 x1 ( u1 , , un ); x2 x2 ( u1 , , un ); ; x m x m ( u1 , , un ) then we have g f x1 f x 2 f x m ; u1 x1 u1 x 2 u1 x m u1 g f x1 f x 2 f x m ; u2 x1 u2 x 2 u2 x m u2 g f x1 f x 2 f x m . un x1 un x 2 un x m un Example 4 Suppose w x 2 y 2 z 2 and that x sin u cos v; y cos u cos v; z cos u sin v. Applying the chain rule gives w w x w y w z 2 x cos u 2 y ( sin u ) 2 z ( sin u ) u x u y u z u 2(sin u cos v) cos u 2(cos u cos v)( sin u ) 2(cos u sin v)( sin u ) 2 sin u cos u 2 cos u cos v 2 sin u cos v 2 sin u sin v. Tree Diagrams A helpful representation of chain rules is to use a tree diagram. The diagram for the chain rule used in example 4 is w x u y v u z v u v To construct the diagram we start with w. This is a function of three variables x, y, z, which therefore go at the next level down. Finally x, y, z are each functions of u, v, and so each w leads to u and to v. To write down the chain rule for we start at w and follow all possible u paths down to u. There are three such paths. Each path contains two components, and each leads to a partial derivative, which are multiplied together in pairs corresponding to each of the three paths from w down to u. We can therefore write w w x w y w z . u x u y u z u Notice that this is not a proof of the chain rule, it is simply a helpful way to construct the rule appropriate to any given arrangement of the functions and variables. Example 5 Suppose that w is a function of three variables w f ( x, y, z ) and that y itself is a function of x and z. The tree diagram corresponding to this situation is w x y x z y We use this tree diagram to write w f f x x y w f f z z y Now suppose that w x 2 y 2 z 2 , derived from the tree diagram to write w f f x x y w f f z z y y x y z y sin( xz). Then we use the chain rules we have y 2 x 2 y.z cos( xz) 2 x 2 sin( xz). z cos( xz), x y 2 z 2 y.x cos( xz) 2 z 2 sin( xz). x cos( xz). z In this particular example we can proceed by direct substitution since the expressions are not too complicated. This gives w x 2 y 2 z 2 x 2 sin 2 ( xz) z 2 , and we can partially differentiate this expression with respect to x and with respect to z to confirm the results above obtained by using the chain rule.
© Copyright 2026 Paperzz