Using the chain rule to find derivatives.