Chapter 6 Chain Rule

6.1 Definition

Consider univariate functions y=y(x) and x=x(t). Note a change in t will result in a change in x, which subsequently results in a change in y. How does y change with t? One has the well known formula: dydt=dydxdxdt. How does this translate to the multivariate case? Consider a function z=z(x,y), where x=x(u,v) and y=y(u,v). As either u or v change both x and y will change, and subsequently z will change. How does z change with u, and how does z change with v? It would be theoretically possible to calculate this by a substitution of x=x(u,v) and y=y(u,v) into z=z(x,y), but for most functions this will a tedious computation.

More generally consider the function z=z(x1,x2,xn), which is dependent on n variables. Each of the xj is a function of k variables, that is, xj=xj(t1,t2,,tk). A variation in any of the ti, results in a change in each of the xi, which subsequently changes the value of z. How does z change with respect to change in each of the ti.

Chain Rule. Given z=z(x1,x2,xn) where xi=xi(t1,t2,,tk), it follows that zti=nj=1zxjxjti.

Note that the derivatives that appear on the right hand side of the Chain Rule will be routine to compute from the expressions z=z(x1,x2,xn) and xi=xi(t1,t2,,tk).

Consider z=z(x,y) where x=x(u,v) and y=y(u,v) as above. By the chain rule zu=zxxu+zyyu,zv=zxxv+zyyv.


Consider u=u(x,y,z) where x=x(α,β),y=y(α,β) and z=z(α,β). By the chain rule uα=uxxα+uyyα+uzzα.


Consider u=u(x,y) where x=x(α,β,γ) and y=y(α,β,γ). By the chain rule uβ=uxxβ+uyyβ.


Calculate uβ in Example 6.1.3, and uγ in Example 6.1.4.


Find the derivative of w=12xy+2 with respect to t along the path x=cost, y=sint. What is the value of the derivative at t=π2?

The question has a nice geometrical interpretation:


Note that w is a function of x and y, while x and y are both functions of t. Therefore by the Chain rule: wt=wxxt+wyyt=12y(sint)+12xcost=12sin2t+12cos2t=12cos(2t). At t=π2, evaluate: wt(π2)=12.

6.2 Implicit Differentiation

Suppose a function y(x) is given implicitly, that is, y(x) satisfies some equation F(x,y)=0. One can deduce a simple formula for dydx via the Chain Rule.

Given y(x) satisfying F(x,y)=0, then dydx=FxFy, if Fy0.

Let w=F(x,y), so w is a function of x and y. Now y is a function of x, and trivially so is x itself. Therefore by the Chain Rule: dwdx=wxxx+wydydx=Fx1+Fydydx=Fx+Fydydx.

Since w=F(x,y)=0 by definition, it follows that w is constant and so dwdx=0. By substitution 0=Fx+Fydydxdydx=FxFy=FxFy

provided Fy0.

Find dydx where y2x2sin(xy)=0.

Define F(x,y)=y2x2sin(xy). Calculate that:

Fx=2xycos(xy),Fy=2yxcos(xy).

Therefore by Lemma 6.2.1, provided Fy0:

dydx=2x+ycos(xy)2yxcos(xy).

6.3 Transforming Partial Differential Equations

In the Autumn term, we saw how to solve certain collections of ordinary differential equations (ODEs), that is equations that impose conditions on the derivatives of a univariate function. A partial differential equation (PDE), is an equation that imposes a condition on the partial derivatives of a multivariate function. The study of PDEs and their solutions is a deep and active area of research which can be further learnt about in the module MATH2012: Modelling with Differential Equations.

The one-dimensional wave equation for u(x,t) is the PDE

2ut2=c22ux2,

where c>0 is some constant.

The wave equation occurs frequently in natural phenonmenon:

  • Consider a horizontal vibrating string that is fixed at both ends. Let t represent time, x represent a distance along the string, and u(x,t) be the vertical displacement of the point x at time t. Then u(x,t) satisfies the wave equation.


  • Consider a sound wave emanating from a point source along a line. Let t represent time, x represent a point at displacement x from the source, and u(x,t) be the perturbation in air density at the point x at time t. Then u(x,t) satisfies the wave equation.


  • Consider a wave of water travelling along a cross section of a body of water. Let t represent time, x represent a point along the cross section, and u(x,t) be the sea level at the point x at time t. Then u(x,t) satisfies the wave equation.


The solution u(x,t) to the wave equation utt=c2uxx is of the form u(x,t)=f(xct)+g(x+ct) where f and g are some general functions.

Set α=α(x,t)=xct,andβ=β(x,t)=x+ct. The plan is to interpret the wave equation in terms of α,β rather than x,t. The differential equation will then be solved in terms of α,β before the solution is converted back to in terms of x,t.

Calculate that x=α+β2,andt=βα2c. By substitution, one could think of u as a function of α and β. Therefore by the Chain Rule ux=ux=uααx+uββx=uα1+uβ1=uα+uβ=uα+uβ.

Note that this equation holds for any function u. Therefore it this setting it is correct to state there is an equivalence of operators: x=α+β, that is, differentiating a function with respect to x is the same as the sum of the derivative with respect to α and the derivative with respect to β.

Similarly the Chain Rule gives ut=ut=cuα+cuβ=cuα+cuβ, and in terms of operators t=cα+cβ Now calculating the second order derivatives of u that appear in the PDE, one has

uxx=xux=(α+β)(uα+uβ)=uαα+uβα+uαβ+uββ=uαα+2uβα+uββutt=tut=(cα+cβ)(cuα+cuβ)=c2uααc2uβαc2uαβ+c2uββ=c2uαα2c2uαβ+c2uββ

By substitution into the wave equation

0=uttc2uxx=(c2uαα2c2uαβ+c2uββ)c2(uαα+2uβα+uββ)=4c2uαβuαβ=0

Solving this new differential equation:

uαβ=0uαβdβ=0dβuα=c(α)uαdα=c(α)dαu=f(α)+g(β),where dfdα=c.

Therefore

u(x,t)=f(xct)+g(x+ct)

is the general solution to the wave equation.

Physically the variable t represents time, and the variable x represents some sort of spatial displacement in a one-dimensional space. It follows that the solution to the wave equation is a combination of two general waves moving in opposite directions along the x-axis with speed c.