# Computing Derivatives

# The Chain Rule in Leibniz Notation

We stated the chain rule first in Lagrange notation. Since Leibniz notation lets us be a little more precise about what we're differentiating and what we're differentiating with respect to, we need to also be comfortable with the chain rule in Leibniz notation.

Suppose *y* is a function of *x*:

y = { *g*(*x*)}

and *z* is a function of *y*:

z = *f*(*y*)

Then *z* is a function of *x*:

z = *f*(*y*) = f({ *g*(*x*)})

Once again, we have an outside function and an inside function. The chain rule in Lagrange notation states that

(*f*(*g*(*x*))' = *f*'(*g*(*x*)) × *g'*(*x*).

In Leibniz notation, we would say

Since

- and (
*f*(*g*(*x*))' both mean "the derivative of*z*with respect to*x*,"

- and f'({
*g*(*x*)}) = f'(y) both mean "the derivative of*z*with respect to*y*," and

- and
*g'*(*x*) both mean "the derivative of*y*with respect to*x*,"

the two statements of the chain rule do mean the same thing:

We can remember the chain rule in Leibniz notation because it looks like a nice fraction equation where the *dy* terms cancel:

This may or may not be what's actually going on, but it works for our purposes and it's a great memory aid.

There are three steps to apply the chain rule in this form:

- determine what
*y*is (this is the same step as determining the inside and outside functions)

- apply the chain rule formula

- put everything in terms of the correct variable (for example, writing
*y*in terms of*x*)

The chain rule will be especially useful when we discuss related rates, where there will be problems with three different variables that all depend on each other in funny ways.

We can also use the chain rule with different letters, as long as we put the letters in the correct places. If we have

y = *g*(*x*) and z = *f*(*y*) = *f*({ *g*(*x*)}), the chain rule says

The { inside function} is the one that "cancels out':

The innermost variable, *x*, goes only in denominators:

and the outermost variable, *y*, goes only in numerators:

If we switch the letters, we need to make sure they go in the appropriate places.

The important thing is that the inside function needs to be the term that cancels out:

Now that we know how to write the chain rule with different letters, we can use it to find derivatives.