How to Use the Chain Rule to Find the Derivative of Nested Functions
Sometimes, when you need to find the derivative of a nested function with the chain rule, figuring out which function is inside which can be a bit tricky — especially when a function is nested inside another and then both of them are inside a third function (you can have four or more nested functions, but three is probably the most you’ll see).
Now it’s easy to see the order in which the functions are nested. The innermost function is inside the innermost parentheses — that’s
Next, the sine function is inside the next set of parentheses — that’s
sin(stuff)
Last, the cubing function is on the outside of everything — that’s stuff^{3}
Okay, now that you know the order of the functions, you can differentiate from outside in.

The outermost function is stuff cubed and its derivative is given by the power rule.

As with all chain rule problems, you multiply that by stuff’.

Put the stuff,
back where it belongs.

Use the chain rule again.

The stuff is
and its derivative is 10x – 4. Plug those things back in.

Now that you’ve got the derivative of
plug this result into the result from Step 3, which gives you the whole enchilada.

This can be simplified a bit.
It may have occurred to you that you can save some time by not switching to the word stuff and then switching back. That’s true, but the technique forces you to leave the stuff alone during each step of a problem. That’s the critical point. Make sure you DO NOT TOUCH THE STUFF.