Skip to main content
K12 LibreTexts

5.5: Chain Rule

  • Page ID
    1241
  • The Chain Rule enables us to differentiate a composite function f∘g. But why is there the need to have a special way to determine the derivative of a composite function? Intuitively, it is because the variation of the domain of f is now governed by the function g(x) rather than just by x, and g's rate of change with respect to x should somehow be taken into account. Before proceeding, see if you find effect of g by comparing the derivative of f(x)=x2 with the derivative of f(x)=(5x)2 where g(x)=5x.


    The Chain Rule

    We want to derive a rule for the derivative of a composite function of the form f∘g in terms of the derivatives of f and g. This rule would allow us to differentiate complicated functions in terms of known derivatives of simpler functions.

    The rule that enables this is called the Chain Rule:

    If g is a differentiable function at x, and f is differentiable at g(x), then the composition function f∘g=f(g(x)) is differentiable at x. The derivative of the composite function is:

    \[ (f∘g)′(x)=f′(g(x))g′(x) \nonumber\]

    Or an equivalent statement:

    If u=u(x) and f=f(u), then \[ \frac{d}{dx}[f(u)]=f′(u)\frac{du}{dx} \nonumber\]

    Or another equivalent statement:

    If y is a function of u, and u is a function of x, then

    \[ \frac{dy}{dx}=\frac{dy}{du}⋅\frac{du}{dx} \nonumber\]

    Apply the chain rule to find the derivative of \[ f(x)=(2x^3−4x^2+5)^2\nonumber\]

    Using the chain rule, let \[ u=2x^3−4x^2+5.\nonumber\] Then

    \[ \frac{d}{dx}[(2x^2−4x^2+5)^2]=\frac{d}{dx}[u^2] \nonumber\]

    \[ =2u\frac{du}{dx} \nonumber\]

    \[ =2(2x^3−4x^2+5)(6x^2−8x) \nonumber\]

    The problem above is one of the most common types of composite functions. It is a power function of the type

    \[ y=[u(x)]^n \nonumber\]

    The rule for differentiating such functions is special case of the Chain Rule called the General Power Rule:

    If \[ y=[u(x)]^n \nonumber\], then \[\frac{dy}{dx}=n[u(x)]^{n−1}\frac{d}{dx}u(x) \nonumber\]


    Examples

    Example 1

    Earlier, you were asked if you find the effect of g on the derivative by comparing the derivative of f(x)=x2 with the derivative of f(x)=(5x)2 where g(x)=5x. The derivative of f(x)=x2 is f′(x)=2x, and the derivative of f(x)=(5x)2 is f′(x)=2(5x)5=2x⋅25. The effect of g in the composite function is to modify the rate of change of f(x)=x2.

    Example 2

    What is the slope of the tangent line to the function \[ y=\sqrt{x^2−3x+2} \nonumber\] that passes through point x=3?

    We can write \[ y=(x2−3x+2)^{\frac{1}{2}} \nonumber\] This example illustrates the point that n can be any real number including fractions. Using the General Power Rule,

    \[ \frac{dy}{dx}=\frac{1}{2}(x^2−3x+2)^{\frac{1}{2}-1}(2x−3) \nonumber\]

    \[ =\frac{1}{2}(x^2−3x+2)^{−\frac{1}{2}}(2x−3) \nonumber\]

    \[ =\frac{(2x−3)}{2\sqrt{x^2−3x+2}} \nonumber\]

    To find the slope of the tangent line, we simply substitute x=3 into the derivative:

    \[ \frac{dy}{dx}|_{x=3}=\frac{2(3)−3}{2\sqrt{3^2−3(3)+2}}=\frac{3}{2\sqrt{2}}=\frac{3\sqrt{2}}{4} \nonumber\]

    Example 3

    Find \[\frac{dy}{dx} \nonumber\] for \[ y=sin^3x \nonumber\]

    The function can be written as y=[sinx]3. Thus

    \[ \frac{dy}{dx}=\frac{d}{dx}[sinx]^3 \nonumber\]

    \[ =3[sinx]^2[cosx] \nonumber\]

    \[ =3sinx^2cosx \nonumber\]

    Example 4

    Find \[\frac{dy}{dx} \nonumber\] for \[ y=[cos(πx^2)]^3 \nonumber\]

    This example will show the application of the chain rule multiple times because there are several functions embedded within each other.

    The function y can be written in the form

    \[ y=(u(w))^3 \nonumber\] where

    \[u(w)=cos(w) \nonumber\]

    \[w(x)=πx^2 \nonumber\]

    Here are the steps for the solution:

    \[ \frac{dy}{dx}=\frac{d}{dx}[u(w)^3] \nonumber\]

    …Use u and w substitutions

    \[ =3⋅u(w)^2⋅\frac{du}{dx} \nonumber\]

    .…After using the General Power Rule

    \[ =3⋅u(w)^2⋅(\frac{du}{dw}⋅\frac{dw}{dx}) \nonumber\]

    …After using the Chain Rule for du/dx

    \[ =3⋅u(w)^2⋅[−sin(w)⋅2πx] \nonumber\]

    …After evaluating dudw and dwdx

    \[ =3[cos(πx^2)]^2⋅(−sin(πx^2)⋅2πx) \nonumber\]

    …After substituting for u and w

    \[ =−6πx[cos(πx^2)]^2sin(πx^2) \nonumber\]

    .…After simplification.

    Notice that we first used the General Power Rule and then used the Chain Rule, in the last step, we took the derivative of the argument.


    Review

    For #1-11, find f′(x).

    1. \[ f(x)=(2x^2−3x)^{39} \nonumber\]
    2. \[ f(x)=(x^3−\frac{5}{x^2})^{−3} \nonumber\]
    3. \[ f(x)=\frac{1}{\sqrt{3x^2−6x+2}} \nonumber\]
    4. \[ f(x)=sin^3x \nonumber\]
    5. \[ f(x)=sinx^3 \nonumber\]
    6. \[ f(x)=sin^3x^3 \nonumber\]
    7. \[ f(x)=tan(4x^5) \nonumber\]
    8. \[ f(x)=\frac{4x−sin^2}{2x} \nonumber\]
    9. \[ f(x)=\frac{sinx}{cos(3x−2)} \nonumber\]
    10. \[ f(x)=(5x+8)^3(x^3+7x)^{13} \nonumber\]
    11. \[ f(x)=(\frac{x−3}{2x−5})^3 \nonumber\]
    12. Find \[ \frac{dy}{dx} \nonumber\] for \[ y=5cos(3x^2−1) \nonumber\]
    13. Find the derivative of \[ \sqrt{x^3+x^5+89} \nonumber\]
    14. Find the derivative of sin(sin(sin(x))).
    15. By definition, any function composed with its inverse is just the identity: f(f−1(x))=x. differentiate both sides of this equation and solve algebraically for the derivative of the inverse.

    Review (Answers)

    To see the Review answers, open this PDF file and look for section 3.8.


    Vocabulary

    Term Definition
    chain rule The chain rule is the method for computing the derivative of a composite function. It states that for functions f(x) and g(x), (f∘g)′(x)=f′(g(x))g′(x).
    composite function A composite function is a function h(x) formed by using the output of one function g(x) as the input of another function f(x). Composite functions are written in the form h(x)=f(g(x)) or h=f∘g.
    derivative The derivative of a function is the slope of the line tangent to the function at a given point on the graph. Notations for derivative include f′(x), dy/dx, y′, df/dx and \frac{df(x)}{dx}.

    Additional Resources

    PLIX - Play, Learn, Interact, eXplore - Differentiation: Chain Rule

    Video: Chain Rule Introduction

    Practice: Chain Rule

    Real World: Goodbye Waves

    • Was this article helpful?