You are on page 1of 2

Jim Lambers

MAT 280
Fall Semester 2016-17
Lecture 8 Example

Composition of Functions of Several Variables


Let f : R3 → R be a function of the form w = f (x, y, z). That is, w is the only dependent
variable (output), and x, y, z are the independent variables (inputs). Next, let g : R2 → R3 be
a function of the form hx(s, t), y(s, t), z(s, t)i = g(s, t). In this case, x, y, z are the dependent
variables, and s, t are the independent variables. The components of g(s, t), which are x(s, t),
y(s, t) and z(s, t), are called the component functions of the vector-valued function g.
It follows that the composition of f with g is a new function h, defined by
w = h(s, t) = (f ◦ g)(s, t) = f (g(s, t)) = f (x(s, t), y(s, t), z(s, t)).
Note that the dependent variable of h is the same as that of the outer function f , while its
independent variables are those of the inner function g.
Example Let f (x, y, z) = x2 + y 2 + z 2 , and let
g(s, t) = hx(s, t), y(s, t), z(s, t)i = hes cos t, es sin t, ti.
Then
h(s, t) = f (g(s, t)) = x(s, t)2 + y(s, t)2 + z(s, t)2 = (es cos t)2 + (es sin t)2 + t2 = e2s + t2 .


Derivatives
Because f has one output (dependent variable) and three inputs (independent variables), its
derivative, or Jacobian matrix, has one row and three columns:
h i
Jf (x, y, z) = ∇f (x, y, z) = ∂f
∂x
∂f
∂y
∂f
∂z .
In general, when a function f has only one output, the derivative of f is known as the gradient
of f , which is denoted by ∇f .
Because g has three outputs and two inputs, its derivative has three rows and two columns:
   ∂x ∂x 
∇x(s, t) ∂s ∂t
 
∂y ∂y ∂g ∂g
Jg (s, t) =  ∇y(s, t)  =  ∂s ∂t  = .
∇z(s, t) ∂z ∂z ∂s ∂t
∂s ∂t
Note that each row is a gradient of one of the component functions of g, and each column is a
derivative of g with respect to one of the independent variables.
Example The derivatives of f and g from the previous example are
   
Jf (x, y, z) = fx fy fz = 2x 2y 2z ,
  s
e cos t −es sin t
 
xs xt
Jg (s, t) =  ys yt  =  es sin t es cos t  .
zs z t 0 1


1
The Chain Rule
Using the multivariable Chain Rule,
Jf ◦g = (Jf ◦ g)Jg ,
the derivative of h(s, t) = f (g(s, t)) is
 ∂x ∂x 
h i ∂s ∂t
∂f ∂f ∂f ∂y ∂y
Jh (s, t) = ∇f (x(s, t), y(s, t), z(s, t))Jg (s, t) = ∂x ∂y ∂z

∂s ∂t
.
∂z ∂z
∂s ∂t

Because the outer function f has one output and the inner function g has two inputs, the
derivative of h = f ◦ g, which has one output and two inputs, has one row and two columns.
Each entry of this product can be expressed as a dot product. Recall that the dot product
of two vectors u = hu1 , u2 , . . . , un i and v = hv1 , v2 , . . . , vn i is defined by
u · v = u1 v1 + u2 v2 + · · · + un vn .
We then have
∂g ∂g
 
Jh (s, t) = ∇f · ∂s ∇f · ∂t
.
In general, to obtain the entry in row i, column j of the derivative of h, we take the dot product
of row i of the derivative of the outer function f with column j of the derivative of the inner
function g.
In this case, computing these dot products yields
 
∂h ∂h
Jh (s, t) =
∂s ∂t
  ∂x   ∂x  
h i ∂s h i ∂t
=  ∂f ∂f ∂f ·  ∂y 
∂x ∂y ∂z
∂f ∂f
∂s
∂f
∂x·  ∂y  
∂y ∂z ∂t
∂z ∂z
∂s ∂t
 
∂f ∂x ∂f ∂y ∂f ∂z ∂f ∂x ∂f ∂y ∂f ∂z
= + + + + .
∂x ∂s ∂y ∂s ∂z ∂s ∂x ∂t ∂y ∂t ∂z ∂t

Example Using the functions from the preceding examples, we obtain


 s 
e cos t
∂h ∂g 
= 2x(s, t) 2y(s, t) 2z(s, t) ·  es sin t 

= ∇f ·
∂s ∂s
0
s s
= 2x(s, t)e cos t + 2y(s, t)e sin t + 2z(s, t)(0)
= 2e2s cos2 t + 2e2s sin2 t = 2e2s .
Similarly,
−es sin t
 
∂h ∂g
= 2x(s, t) 2y(s, t) 2z(s, t) ·  es cos t 
 
= ∇f ·
∂t ∂t
1
s s
= −2x(s, t)e sin t + 2y(s, t)e cos t + 2z(s, t)
= −2e2s cos t sin t + 2e2s sin t cos t + 2t = 2t.


You might also like