Gauth

Calculus

The Chain Rule, Explained Plainly

Almost every derivative you will be asked for after the first week of calculus is a composite function in disguise. Here is how to see the layers and differentiate them without losing a factor.

By the Gauth editorial teamHow this content is produced and checkedUpdated 10 September 2026

The idea

A composite function is one function feeding another. is not composite — there is one operation and it acts directly on the variable. is composite, because the squaring happens first and hands its result to the sine. Two machines in a row, and the order matters.

The chain rule says that rates multiply along that pipeline. Suppose a car moves twice as fast as a bicycle and the bicycle moves three times as fast as a walker. The car is six times as fast as the walker; you multiplied the two rates. Derivatives behave the same way. If depends on and depends on , then nudging nudges at rate , and that nudge in moves at rate . The two effects compound:

The appears to cancel. That is not a proof — these are limits, not fractions — but it is a reliable way to remember which pieces you need and it generalises correctly to longer chains.

The same statement in function notation is the one you will write in an exam. If , then:

Read it as three instructions rather than one formula. Differentiate the outer function. Copy the inner function inside it, unchanged. Multiply by the derivative of the inner function. Nearly every mistake in this topic is a failure to do one of those three things, and knowing which one you dropped is most of the fix.

When you need it

The trigger is simple: a function is being applied to something that is not a bare . Scan the expression for arguments and check each one.

These all need the chain rule:

  • A bracket raised to a power, such as or .
  • A root, which is a power wearing a disguise: is .
  • A named function with a non-trivial argument: , , .
  • Anything in an exponent other than a constant, including and .

These do not:

  • — the base is the variable itself, so the power rule finishes the job.
  • — a sum. Differentiation distributes, so handle the terms separately.
  • — a product at the top level, so you open with the product rule instead, then use the chain rule inside if a factor needs it.

The hard cases are the ones where two rules stack. When that happens, the outermost operation decides which rule you write down first, and the walkthrough below is built around exactly that question.

Find the outer and inner functions

Imagine evaluating the expression at x = 2 with a calculator. What is the very last key you would press?

The method

1. Name the layers from the outside in. Write them down. For the layers are: square root (outermost), cosine, then . Naming them costs five seconds and prevents the single most common error, which is losing a layer.

2. Differentiate the outer layer and nothing else. Treat the entire inner expression as one letter. If you can differentiate you can differentiate — the shape of the derivative is identical, and the argument rides along unchanged.

3. Multiply by the derivative of the inner layer. This is where the factor appears. It multiplies the whole of step 2; it does not get substituted into the argument. The distinction is the difference between and the wrong answer .

4. Repeat until the inside is a bare variable. For three layers the statement is:

5. Simplify by factoring, not expanding. A chain rule answer is almost always a product, and the marker wants it left that way. Pull out the lowest power of the inner expression and any numerical common factor. Expanding into a polynomial is more work and harder to check.

Worked examples

Worked example

  1. 1

    Identify the layers. The last operation is the fifth power, so the outer function is the power and the inner function is the quadratic inside the bracket.

  2. 2

    Differentiate the outer function with the inner expression left exactly as it is.

  3. 3

    Differentiate the inner function on its own.

  4. 4

    Multiply the two results and tidy the constant.

Answer

Worked example

  1. 1

    The top-level operation is a multiplication, so this opens with the product rule. The chain rule appears when you differentiate the square root.

  2. 2

    Differentiate the square root as a power. Outer is the one-half power, inner is 5x minus 1, whose derivative is 5.

  3. 3

    Apply the product rule f'g + fg'.

  4. 4

    Put both terms over the common denominator, writing the first term as 4x(5x-1) over that same denominator.

  5. 5

    Expand the numerator and collect like terms, then factor out x.

Answer

Worked example

  1. 1

    Three layers this time: the logarithm on the outside, the cosine in the middle, and 3x on the inside.

  2. 2

    Differentiate the logarithm, keeping its argument intact.

  3. 3

    Multiply by the derivative of the middle layer, which itself needs the chain rule: the derivative of cos(3x) is minus sin(3x) times 3.

  4. 4

    Combine the factors.

  5. 5

    Recognise sine over cosine as the tangent and write the answer compactly.

Answer

Try one of your own

Type any derivative and you will get the same layer-by-layer working, with the rule named at each step. If you want the full method table for a harder function, the derivative calculator with steps handles products, quotients, and chains together, and the calculus solver takes the same problem in photograph form.

Solve a calculus problem now

First solution free

One of these five lines is wrong

One of these lines is wrong. Click it.

Where people go wrong

The vanishing inner derivative

Writing and stopping. The factor of 4 is gone. This is the most common error in the topic because the answer looks finished. Catch it by expanding a small case once: , whose derivative is — three times four, not three. Once you have seen the factor appear from honest expansion you stop dropping it.

Differentiating the inside in place

Writing . The inner derivative has been substituted into the argument rather than multiplied. The inner function must survive unchanged inside the outer derivative: . Test it at : the true derivative is 0, while , so the wrong version fails immediately.

Peeling one layer too few

With , people reach and stop, forgetting the third layer. The correct derivative is . Counting the layers before you start and counting the factors in your answer is a two-second audit that catches this every time — three layers means three factors.

Reaching for the chain rule when the product rule is needed

is not a composite function. It is a product of two functions, one of which happens to be composite. The chain rule cannot start this problem. Deciding the top-level operation first — as the decision tree above does — keeps the two rules from blurring together. The same discipline pays off later when you meet substitution in integrals, which is the chain rule read backwards.

Practice

Four problems, easiest first. Simplify fully — two of these collapse to something much shorter than the raw chain rule output.

Chain rule practice

Answers are checked here — nothing is sent anywhere.

  1. 1
  2. 2
  3. 3
  4. 4

Frequently asked questions

How do I know whether a problem needs the chain rule?
Look at the argument of every function in the expression. If any function is applied to something other than a bare x — a bracket, a sum, a product, another function — that function is composite and needs the chain rule. sin(x) does not; sin(2x) does. x^5 does not; (x^2+1)^5 does.
Why do you multiply by the derivative of the inside?
Because rates compose. If y changes three times as fast as u, and u changes four times as fast as x, then y changes twelve times as fast as x. The chain rule is that multiplication written in calculus notation: dy/dx = (dy/du)(du/dx).
Can I just expand the bracket instead?
For a small integer power you can, and it is a good way to check yourself. Expanding (4x+1)^3 gives 64x^3 + 48x^2 + 12x + 1, whose derivative is 192x^2 + 96x + 12 = 12(4x+1)^2 — exactly what the chain rule produces. For (3x^2+1)^20 or anything with a sine or a logarithm in it, expansion is not available.
What happens when a function has three or more layers?
You get one factor per layer. Differentiate the outermost layer with everything inside left alone, multiply by the derivative of the next layer in, and keep going until the layer you are differentiating is just x. Nothing about the rule changes; there are simply more factors in the product.
How do I check a chain rule answer without a calculator?
Substitute a convenient number into both your derivative and a numerical difference quotient. Take x = 1 and compute [f(1.001) - f(0.999)] / 0.002. If your derivative at x = 1 agrees to three decimal places, the algebra is almost certainly right. A missing inner-derivative factor shows up immediately as a clean multiple, such as your answer being exactly a third of the true value.

Keep going

Gauth AIAsk me for any help!