How to use the chain rule and product rule together

Some derivatives use the chain rule and the product rule in the same problem. The order depends on how the function is built, so we’ll start by looking at what happens on the outside. The video works through a different example of the same idea.

Choose the rule from the outside operation

If the whole expression is a power of an inside function u, use the chain rule. Differentiate the outside power and multiply by u′. If u is a product, use the product rule to find u′. If the whole expression is already a product f(x)g(x), start with the product rule and differentiate each factor as needed.

(un)′=nun-1u′(fg)′=f′g+fg′

Example: Differentiate a power of a product

y=8(6xex)-4

The product 6xex is inside the power. Let u=6xex so that y=8u-4. The chain rule gives y′=-32u-5u′. To find u′, differentiate 6x and ex using the product rule.

u′=6ex+6xexu′=6ex(1+x)

Put u and u′ back into the derivative. The negative exponent puts (6xex)5 in the denominator. Cancel the common factor of ex and simplify the coefficient.

y′=-32(6xex)-5(6ex+6xex)y′=-192ex(1+x)7776x5e5xy′=-2(1+x)81x5e4x

This function and its derivative are defined for x≠0, because 6xex is zero only when x=0.

Example: Differentiate a product with a power as one factor

y=(x2+1)7(9x4)

This time the outside operation is multiplication. Let f(x)=(x2+1)7 and g(x)=9x4. The chain rule for f gives us a factor of 2x from differentiating x2+1. For g, we only need the power rule.

f′(x)=7(x2+1)6(2x)f′(x)=14x(x2+1)6g′(x)=36x3

Now add f′g and fg′. We can leave the result as a sum or factor out 18x3(x2+1)6 to simplify it.

y′=126x5(x2+1)6+36x3(x2+1)7y′=18x3(x2+1)6(9x2+2)