Back to the on-screen lesson ·

The chain rule and implicit differentiation

Differentiating one function inside another, why the inner derivative is there, and the same rule applied to a curve given by a relation rather than a formula.

Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.

1. What you will learn

By the end of this lesson you can see the composite structure in an expression, name its inside and its outside, and differentiate it without losing the inner factor that the rule exists to supply. You can also differentiate a relation in $x$ and $y$ implicitly, find the slope at a named point on such a curve, and explain why the answer needs both coordinates.

2. What you bring to this

You can differentiate sums, products and quotients, and you know the five standard derivatives. What is missing is the case where one function is inside another — which, once you look, is most of the functions there are.

3. Words you will need

Composite: $f(g(x))$ — one function applied to the result of another.

Inside ($g$): what you would evaluate first.

Outside ($f$): what is wrapped around it.

Chain rule: $\dfrac{d}{dx}f(g(x)) = f'(g(x))\,g'(x)$.

Implicit: a curve given by a relation in $x$ and $y$ rather than by $y = f(x)$.

4. Differentiating something inside something else

Most functions are built by nesting: $\sin(4x)$, $(3x+1)^5$, $e^{2x}$, $\sqrt{x^2+1}$. For all of them the rule is one line:

$$\frac{d}{dx}f(g(x)) = f'(g(x)) \cdot g'(x)$$

In words: differentiate the outside, leaving the inside alone, then multiply by the derivative of the inside. The second factor is the whole content of the rule — the outer step alone is what a beginner writes, and it is wrong by exactly that factor.

The reason the factor is there is worth carrying. If $u$ changes three times as fast as $x$, and $y$ changes twice as fast as $u$, then $y$ changes six times as fast as $x$: rates multiply along a chain. In Leibniz notation the rule is $\dfrac{dy}{dx} = \dfrac{dy}{du}\dfrac{du}{dx}$, which looks like cancelling and is not, but is a good way to remember it.

Implicit differentiation is the chain rule doing a job that looks different. A curve like $x^2 + y^2 = 25$ is not a function of $x$, and need not be turned into one. Differentiate both sides with respect to $x$, treating $y$ as a function of $x$ — so $y^2$ differentiates to $2y\dfrac{dy}{dx}$, by the chain rule — then collect the $\dfrac{dy}{dx}$ terms, factor, and divide. The answer usually contains both $x$ and $y$, which is exactly right: naming a point on the curve takes two coordinates, so stating its slope does too.

Another way: picture

Picture three gears in a line. The first turns the second three times for every turn of its own; the second turns the third twice for every turn of its own. Turn the first once and the third turns six times. The chain rule is that multiplication, and the missing inner derivative is a gear left out of the calculation.

Another way: steps

  1. Name the inside — what you would evaluate first — and the outside.
  2. Differentiate the outside, carrying the inside through untouched.
  3. Multiply by the derivative of the inside.
  4. Nested twice? Apply the rule again to the inner composite.
  5. For a relation: differentiate both sides in $x$, collect the $\dfrac{dy}{dx}$ terms, factor and divide.

5. The same rule, four times

FunctionOutsideInsideDerivative
$(3x+1)^5$$u^5$$3x+1$$15(3x+1)^4$
$\sin(4x)$$\sin u$$4x$$4\cos(4x)$
$e^{2x}$$e^u$$2x$$2e^{2x}$
$\ln(5x+2)$$\ln u$$5x+2$$\dfrac{5}{5x+2}$

Every row has the same shape, and every final column carries a factor that the outer derivative alone would not produce. Reading down that column is the fastest way to make the omission feel wrong.

6. Three things that trip people up

Forgetting the inner derivative. $\dfrac{d}{dx}\sin(3x)$ is $3\cos(3x)$, not $\cos(3x)$. This single omission is the most common error in differential calculus, and it is silent — the answer looks entirely reasonable.

Differentiating the inside too. $\dfrac{d}{dx}(3x+1)^5$ is $15(3x+1)^4$, not $15(3)^4$. The outer step leaves the bracket exactly as it was; only the extra factor comes from the inside.

"$y$ differentiates to $1$." Under implicit differentiation $y$ is a function of $x$, so it differentiates to $\dfrac{dy}{dx}$. Treating it as a constant, or as the variable, makes the whole method collapse.

7. $\dfrac{d}{dx}\sqrt{x^2 + 1}$

  1. Inside $x^2+1$, outside $\sqrt{u} = u^{1/2}$.

    Name them first.

  2. Outer derivative: $\tfrac{1}{2}(x^2+1)^{-1/2}$, with the bracket untouched.

  3. Times the inner derivative $2x$: $\dfrac{x}{\sqrt{x^2+1}}$.

    The $2$s cancel.

8. Implicit: $x^2 + y^2 = 25$

  1. Differentiate both sides: $2x + 2y\dfrac{dy}{dx} = 0$.

    The $y^2$ term uses the chain rule.

  2. Collect and solve: $\dfrac{dy}{dx} = -\dfrac{x}{y}$.

  3. At $(3, 4)$ the slope is $-\tfrac{3}{4}$ — perpendicular to the radius, as a tangent to a circle must be.

    A check the answer passes.

9. Your turn: $\dfrac{d}{dx}\cos(x^2)$

  1. Inside $x^2$, outside $\cos u$.

  2. Outer derivative $-\sin(x^2)$, bracket untouched.

    Mind the minus.

  3. Your turn: work this step out. Its working is at the end of the packet.

    Times $2x$: $-2x\sin(x^2)$.

10. Guided practice

In $e^{2x}$, what is the inside function?

11. Guided practice

Differentiate $\sqrt{x^2 + 1}$.

12. Practice

Differentiate $(6x + 7)^{2}$.

Answer:

13. Practice

For $f(x) = (5x + 1)^3$, find $f'(4)$.

answer

14. Practice

For the curve $xy = 12$, what is $\dfrac{dy}{dx}$?

15. Practice

The point $(12, 5)$ lies on $x^2 + y^2 = 169$. What is the slope of the tangent there?

answer

16. Somewhere new

A square's side is growing at $2$ cm a second. How fast is its area growing at the instant the side is $2$ cm?

answer

17. Lesson test

Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.

18. Test question

Put the steps of implicit differentiation in order.

Number the steps in order (write the number in the box):

19. What you can do now

You can use the chain rule and differentiate implicitly. Without looking: what is the second factor in $\dfrac{d}{dx}f(g(x))$, and what does $y^2$ differentiate to with respect to $x$?

Working for the steps left to you

9. Your turn: $\dfrac{d}{dx}\cos(x^2)$, step 3