Derivatives of Composite Functions

As with any derivative calculation, there are two parts to finding the derivative of a composition:

  1. seeing the pattern that tells you what rule to use: for the chain rule, we need to see the composition and find the "outer" and "inner" functions f and g. Then we
  2. apply the rule to find the derivative. This involves finding the derivatives of f and g, and then plugging them in to the rule.

a few popular functions
  power : x r
  polynomial : c n x n + c n-1 x n-1 + ... + c 0
  exponential : a x
  natural log : ln(x)
  sine : sin(x)
  cosine : cos(x)
  tangent : tan(x)
Seeing the pattern: How do we see function composition? We look for functions inside other functions (a list of a few of the functions that we know and love is shown to the right) -- in a composition a function replaces the x in one of these, as in the examples
sin(cos(x)),   tan4(x) + 1,   e1 + x, and   1/ ln(x).
What are the "outer" functions (f) and the "inner" functions (g) for these? The inner function replaces the variable in the outer function, so we look for functions in other functions: in our examples, the "inner" functions are
cos(x),   tan(x),   1 + x, and   ln(x),
because these are the functions plugged in (for the []s) to the functions
sin([] ),   []4 + 1,   e[], and   1/ [].

Let's take one more step and write these all out in a table that shows the composition and its outer function (f) and inner function (g):

f(g(x))     f([] )     g(x) (plugged in for the [])
sin(cos(x))      sin([] )     cos(x)
tan4(x) + 1       []4 + 1     tan(x)
e1 + x       e[]     1 + x
1/ ln(x)      1/ []     ln(x)

Applying the rule: Once we've seen that we're working with a composition, we apply the chain rule:

The derivative of a composition is the product of the derivative of the outer function (with the inner function plugged in) and the derivative of the inner function.
If
  z = f( g(x) )
then the derivative of z is
  z' = ( f(g(x)) )'
    = f '(g(x)) g '(x)
Or, if
  z = f( [] ), where [] = g(x)
then the derivative of z is
  z' = ( f( [] ) )'
    = f '( [] ) ( [] )'
    = f '( [] ) g '(x)

So to work out the derivative of a composition we

  1. find the derivatives of the outer and inner function
  2. multiply them together, and
  3. plug the inner function into the outer function
Don't forget the last step -- it's a common error to forget to do it. So, let's do these steps for the functions we were looking at before. We'll do them by adding columns to our table; the columns are numbered to correspond to the step numbers above.

f(g(x))     f([] )     g(x)     (1): f '([] )     (1): g '(x)     (2): f '([] ) g '(x)     (3): f '(g(x)) g '(x)
sin(cos(x))      sin([] )     cos(x)      cos([] )     -sin(x)     cos([] ) (-sin(x))     cos(cos(x)) (-sin(x))
tan4(x) + 1       []4 + 1     tan(x)       4 []3 + 0     1/ (cos(x))2     (4 []3 + 0) (1/ (cos(x))2)     (4 tan3(x)) (1/ (cos(x))2)
e1 + x      e[]     1 + x       e[]     1     (e[]) (1)     e1 + x
1/ ln(x)      1/ []     ln(x)      -1/ []2     1/ x     (-1/ []2) (1/ x)     (-1/(ln(x))2) (1/ x)
And the last column is the derivative of the composition f(g(x)) in the first column!

Summary: Let's summarize the steps we took to find derivatives of compositions.

  1. Recognize the composition: first we found the outer and inner functions f and g.
  2. Find the derivatives we need: then we found the derivatives of f and g.
  3. Plug into the formula: next, we put f '([]) and g '(x) into the chain rule formula.
  4. Make sure the inner function is re-substituted: finally, we plugged in g(x) for the [] in f'.

[]


see a chain rule example
practice test on the chain rule
practice gateway test
previous page

Deriv Tutorials: Composition
Last Modified: Tue May 1 10:28:02 EDT 2001
Comments to glarose@umich.edu
©2001 Gavin LaRose, UM Math Dept.