← Back to course

Nested Chains and Higher-Order Derivatives

You’ll be able to

The chain rule does not stop after one layer

For y = f(g(h(x))), the derivative is f′(g(h(x))) · g′(h(x)) · h′(x) — one factor per layer, each evaluated at everything inside it. The reliable method is to peel from the outside in and write the factors as you go, rather than trying to see the whole thing at once. sin³(4x²) is three layers: the cube, then the sine, then 4x². Its derivative is 3sin²(4x²) · cos(4x²) · 8x. Students who lose marks here almost always lost the innermost factor.

Second derivatives, implicitly

To find d²y/dx² from an implicit relation, differentiate the equation once to get dy/dx, then differentiate that expression again — treating y as a function of x throughout, so every y that gets differentiated produces another dy/dx. The final step is the one students skip: substitute the expression for dy/dx back in, so the answer is written in terms of x and y only. An answer containing dy/dx is not finished.

Mixing rules in one expression

Real exam expressions combine rules: x²·e^(3x) needs the product rule with a chain rule inside the second factor. The order of operations is structural — identify the outermost operation first. If the expression is fundamentally a product, start with the product rule and let the chain rule appear inside one of its pieces. Starting with the wrong outer rule produces an answer that is wrong from the first line.

Chain rule, three layers
d/dx f(g(h(x))) = f′(g(h(x))) · g′(h(x)) · h′(x)
One factor per layer. The count of factors should equal the count of function layers — a quick check that nothing was dropped.
Worked example

Given x² + y² = 25, find d²y/dx² in terms of x and y.

  1. 1.Differentiate implicitly: 2x + 2y·(dy/dx) = 0, so dy/dx = −x/y.
  2. 2.Differentiate dy/dx = −x/y again with the quotient rule, remembering y is a function of x: d²y/dx² = −[(1)(y) − (x)(dy/dx)] / y².
  3. 3.Substitute dy/dx = −x/y into that expression: −[y − x(−x/y)] / y² = −[y + x²/y] / y².
  4. 4.Combine the numerator over y: −[(y² + x²)/y] / y² = −(x² + y²)/y³.
  5. 5.Use the original relation x² + y² = 25 to simplify: d²y/dx² = −25/y³.
Answer: d²y/dx² = −(x² + y²)/y³ = −25/y³. Substituting the first derivative back in is what removes dy/dx from the answer.
Tip

On an implicit second derivative, the original equation is usually still available to simplify the final expression — as x² + y² = 25 did here. Look for it before deciding the answer is as ugly as it appears.

Checkpoint

What is the derivative of y = cos³(5x)?

Checkpoint

While finding d²y/dx² implicitly, a student arrives at an expression that still contains dy/dx. What should happen next?

On the exam

Nested chain rule questions are frequently multiple choice with all the right pieces and one missing factor among the distractors. Count your factors against the number of layers before choosing.

Answer the 2 checkpoints as you read.

Sign in to save your progress