DerivativesTopic #5 of 32

Chain Rule

Differentiating composite functions using the chain rule.

The Chain Rule Formula

If y=f(g(x))y = f(g(x)), then:

dydx=f(g(x))g(x)\frac{dy}{dx} = f'(g(x)) \cdot g'(x)

Or equivalently, if y=f(u)y = f(u) and u=g(x)u = g(x):

dydx=dydududx\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}

Alternative Notation

ddx[f(g(x))]=f(g(x))g(x)\frac{d}{dx}[f(g(x))] = f'(g(x)) \cdot g'(x)

"Derivative of the outside (evaluated at inside) times derivative of the inside"

General Power Rule

A special case of the chain rule:

ddx[u(x)]n=n[u(x)]n1u(x)\frac{d}{dx}[u(x)]^n = n \cdot [u(x)]^{n-1} \cdot u'(x)

Examples

  • ddx[(3x+1)5]=5(3x+1)43=15(3x+1)4\frac{d}{dx}[(3x + 1)^5] = 5(3x + 1)^4 \cdot 3 = 15(3x + 1)^4
  • ddx[(x2+1)1/2]=12(x2+1)1/22x=xx2+1\frac{d}{dx}[(x^2 + 1)^{1/2}] = \frac{1}{2}(x^2 + 1)^{-1/2} \cdot 2x = \frac{x}{\sqrt{x^2 + 1}}

Chain Rule with Common Functions

FunctionDerivative
[u(x)]n[u(x)]^nn[u]n1un \cdot [u]^{n-1} \cdot u'
sin(u)\sin(u)cos(u)u\cos(u) \cdot u'
cos(u)\cos(u)sin(u)u-\sin(u) \cdot u'
tan(u)\tan(u)sec2(u)u\sec^2(u) \cdot u'
eue^ueuue^u \cdot u'
ln(u)\ln(u)1uu\frac{1}{u} \cdot u'
aua^uauln(a)ua^u \cdot \ln(a) \cdot u'

Multiple Chain Rules

For nested compositions, apply the chain rule repeatedly:

ddx[f(g(h(x)))]=f(g(h(x)))g(h(x))h(x)\frac{d}{dx}[f(g(h(x)))] = f'(g(h(x))) \cdot g'(h(x)) \cdot h'(x)

Examples

Example 1: Basic chain rule

f(x)=sin(x2)f(x) = \sin(x^2)

f(x)=cos(x2)2x=2xcos(x2)f'(x) = \cos(x^2) \cdot 2x = 2x \cos(x^2)

Example 2: Exponential composition

f(x)=e3x2xf(x) = e^{3x^2 - x}

f(x)=e3x2x(6x1)f'(x) = e^{3x^2 - x} \cdot (6x - 1)

Example 3: Nested functions

f(x)=sin(x3)f(x) = \sqrt{\sin(x^3)}

Let u=sin(x3)u = \sin(x^3), so f=u=u1/2f = \sqrt{u} = u^{1/2}

f(x)=12[sin(x3)]1/2cos(x3)3x2f'(x) = \frac{1}{2} \cdot [\sin(x^3)]^{-1/2} \cdot \cos(x^3) \cdot 3x^2

=3x2cos(x3)2sin(x3)= \frac{3x^2 \cos(x^3)}{2\sqrt{\sin(x^3)}}

Example 4: Quotient inside function

f(x)=ln(x+1x1)f(x) = \ln\left(\frac{x + 1}{x - 1}\right)

f(x)=x1x+1(x1)(x+1)(x1)2f'(x) = \frac{x - 1}{x + 1} \cdot \frac{(x - 1) - (x + 1)}{(x - 1)^2}

=x1x+12(x1)2= \frac{x - 1}{x + 1} \cdot \frac{-2}{(x - 1)^2}

=2(x+1)(x1)= \frac{-2}{(x + 1)(x - 1)}

=2x21= \frac{-2}{x^2 - 1}

Tips

  1. Identify the "outer" and "inner" functions
  2. Take the derivative of outer, leaving inner unchanged
  3. Multiply by the derivative of inner
  4. Don't forget to apply chain rule to trigonometric arguments!