1. Home
  2. Explore
  3. Mathematics
  4. Chain Rule Differentiation

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Chain Rule Differentiation

Study Notes: The Chain Rule and Its Applications

The chain rule

The chain rule differentiates a composition of functions: a function formed by applying one function to the output of another. If

F(x)=G(H(x)),F(x)=G(H(x)),F(x)=G(H(x)),

then HHH is the inner function because it is evaluated first, and GGG is the outer function because it is applied afterward. Provided both functions are differentiable,

F′(x)=G′(H(x)) H′(x).F'(x)=G'(H(x))\,H'(x).F′(x)=G′(H(x))H′(x).

In words: differentiate the outer function, evaluate that derivative at the inner function, and multiply by the derivative of the inner function.

The chain rule is essential whenever an expression has a function nested inside another function, such as an exponential whose exponent is not simply xxx, or a power applied to a more complicated expression.

A useful way to identify the functions is to ask what happens first when a value is substituted for xxx. The operation performed first is the inner function; the operation performed last is the outer function.


Exponential functions and the chain rule

Exponential with a linear exponent

For

f(x)=e2x,f(x)=e^{2x},f(x)=e2x,

the inner function is H(x)=2xH(x)=2xH(x)=2x, and the outer function is G(u)=euG(u)=e^uG(u)=eu. Since G′(u)=euG'(u)=e^uG′(u)=eu and H′(x)=2H'(x)=2H′(x)=2,

f′(x)=e2x⋅2=2e2x.f'(x)=e^{2x}\cdot 2=2e^{2x}.f′(x)=e2x⋅2=2e2x.

The inner function must be differentiated even though the outer exponential function remains unchanged when differentiated.

A negative exponent

For

f(x)=e−x,f(x)=e^{-x},f(x)=e−x,

the inner function is H(x)=−xH(x)=-xH(x)=−x. Its derivative is −1-1−1, so

f′(x)=e−x(−1)=−e−x.f'(x)=e^{-x}(-1)=-e^{-x}.f′(x)=e−x(−1)=−e−x.

The negative sign comes from differentiating the exponent, not from differentiating the exponential function itself.

Distinguishing similar-looking exponential expressions

The placement of an exponent matters. The expression

ex2e^{x^2}ex2

means that xxx is squared first and the result is then used as the exponent. Its derivative is

ddxex2=ex2(2x)=2xex2.\frac{d}{dx}e^{x^2}=e^{x^2}(2x)=2xe^{x^2}.dxd​ex2=ex2(2x)=2xex2.

This is different from squaring exe^xex:

(ex)2=e2x,(e^x)^2=e^{2x},(ex)2=e2x,

whose derivative is

2e2x.2e^{2x}.2e2x.

Thus, ex2e^{x^2}ex2 and e2xe^{2x}e2x are different functions and have different derivatives.


Square roots and nested compositions

Consider

f(x)=e3x.f(x)=\sqrt{e^{3x}}.f(x)=e3x​.

There are two useful ways to differentiate this function.

Rewrite using exponent laws

A square root is a power of 12\frac1221​, so

e3x=(e3x)1/2=e3x/2.\sqrt{e^{3x}}=(e^{3x})^{1/2}=e^{3x/2}.e3x​=(e3x)1/2=e3x/2.

The inner function is 32x\frac32x23​x. Applying the chain rule gives

f′(x)=32e3x/2.f'(x)=\frac32e^{3x/2}.f′(x)=23​e3x/2.

Apply the chain rule to the nested functions

The original expression can also be viewed as three successive operations:

  1. Multiply xxx by 333.

  2. Raise eee to the resulting power.

  3. Take the square root.

Differentiating the outer square-root operation first gives

12(e3x)−1/2.\frac12(e^{3x})^{-1/2}.21​(e3x)−1/2.

The derivative of the inner expression e3xe^{3x}e3x is 3e3x3e^{3x}3e3x, so

f′(x)=12(e3x)−1/2⋅3e3x.f'(x)=\frac12(e^{3x})^{-1/2}\cdot 3e^{3x}.f′(x)=21​(e3x)−1/2⋅3e3x.

Simplifying yields

f′(x)=32e3x/2.f'(x)=\frac32e^{3x/2}.f′(x)=23​e3x/2.

Both methods give the same result. Rewriting with exponent laws can make a nested chain rule shorter, while differentiating each layer separately makes the composition explicit.


A power applied to a polynomial

The chain rule also works when a complicated function is raised to a large power. For example,

f(x)=(x3+5x2−4x+1)100.f(x)=\left(x^3+5x^2-4x+1\right)^{100}.f(x)=(x3+5x2−4x+1)100.

There is no need to expand this expression. Treat the polynomial as the inner function and the power function as the outer function:

  • The derivative of the outer function u100u^{100}u100 is 100u99100u^{99}100u99.

  • The derivative of the inner polynomial is 3x2+10x−43x^2+10x-43x2+10x−4.

Therefore,

f′(x)=100(x3+5x2−4x+1)99(3x2+10x−4).f'(x)=100\left(x^3+5x^2-4x+1\right)^{99} \left(3x^2+10x-4\right).f′(x)=100(x3+5x2−4x+1)99(3x2+10x−4).

Keeping the inner expression in parentheses makes clear that the entire polynomial is raised to the 999999th power and that the entire polynomial derivative is multiplied afterward. Expanding a high power first creates a very long expression without making differentiation easier.


Using functional data with the chain rule

Suppose

H(x)=G(f(x)).H(x)=G(f(x)).H(x)=G(f(x)).

The chain rule gives

H′(x)=G′(f(x)) f′(x).H'(x)=G'(f(x))\,f'(x).H′(x)=G′(f(x))f′(x).

At a particular input, the required information is the value of the inner function, the derivative of the outer function at that value, and the derivative of the inner function. For example,

H′(2)=G′(f(2)) f′(2).H'(2)=G'(f(2))\,f'(2).H′(2)=G′(f(2))f′(2).

If the available data are

f(2)=8,f′(2)=−1,G′(8)=3,f(2)=8,\qquad f'(2)=-1,\qquad G'(8)=3,f(2)=8,f′(2)=−1,G′(8)=3,

then

H′(2)=G′(8)(−1)=3(−1)=−3.H'(2)=G'(8)(-1)=3(-1)=-3.H′(2)=G′(8)(−1)=3(−1)=−3.

Values such as G(2)G(2)G(2) or G(8)G(8)G(8) are not needed for this calculation. The chain rule requires G′G'G′ evaluated at f(2)f(2)f(2), rather than the value of GGG itself.


Concavity of an exponential function

A graph is concave down where its second derivative is negative. Consider

f(x)=e−x2.f(x)=e^{-x^2}.f(x)=e−x2.

First derivative

The inner function is −x2-x^2−x2, whose derivative is −2x-2x−2x. Therefore,

f′(x)=e−x2(−2x)=−2xe−x2.f'(x)=e^{-x^2}(-2x)=-2xe^{-x^2}.f′(x)=e−x2(−2x)=−2xe−x2.

Second derivative

The first derivative is a product, so the product rule is needed. The derivative of e−x2e^{-x^2}e−x2 also requires the chain rule:

f′′(x)=(−2)e−x2+(−2x)(e−x2(−2x)).f''(x)=(-2)e^{-x^2}+(-2x)\left(e^{-x^2}(-2x)\right).f′′(x)=(−2)e−x2+(−2x)(e−x2(−2x)).

After simplifying,

f′′(x)=(4x2−2)e−x2=2e−x2(2x2−1).f''(x)=(4x^2-2)e^{-x^2} =2e^{-x^2}(2x^2-1).f′′(x)=(4x2−2)e−x2=2e−x2(2x2−1).

Since e−x2e^{-x^2}e−x2 is positive for every real xxx, the sign of f′′(x)f''(x)f′′(x) is determined entirely by 2x2−12x^2-12x2−1. Thus, concavity is downward when

2x2−1<0,2x^2-1<0,2x2−1<0,

which is equivalent to

x2<12or∣x∣<12=22.x^2<\frac12 \qquad\text{or}\qquad |x|<\frac{1}{\sqrt{2}}=\frac{\sqrt{2}}{2}.x2<21​or∣x∣<2​1​=22​​.

Consequently, the graph is concave down on

(−22,22).\left(-\frac{\sqrt{2}}{2},\frac{\sqrt{2}}{2}\right).(−22​​,22​​).

The second derivative is zero at x=−22x=-\frac{\sqrt{2}}{2}x=−22​​ and x=22x=\frac{\sqrt{2}}{2}x=22​​. The graph changes concavity at these points, so they are inflection points. The function has a bell-shaped graph: it is concave down near its center and concave up outside that region.

Concavity describes how slopes change. Where a graph is concave down, its slopes are decreasing; where it is concave up, its slopes are increasing.


Population growth modeled exponentially

Suppose the population of Minnesota, measured in millions of people, is modeled ttt years after the year 2000 by

P(t)=4.919e0.00754t.P(t)=4.919e^{0.00754t}.P(t)=4.919e0.00754t.

Estimate the population in 2019

The year 2019 is 191919 years after 2000, so the model gives

P(19)=4.919e0.00754(19)≈5.677.P(19)=4.919e^{0.00754(19)} \approx 5.677.P(19)=4.919e0.00754(19)≈5.677.

The estimated population is approximately 5.6775.6775.677 million people. Because this is a model, the result is an estimate rather than a guaranteed exact population.

Estimate the population’s growth rate in 2019

Differentiate with respect to time. Applying the chain rule to the exponent gives

P′(t)=4.919e0.00754t(0.00754).P'(t)=4.919e^{0.00754t}(0.00754).P′(t)=4.919e0.00754t(0.00754).

Equivalently,

P′(t)=0.00754P(t).P'(t)=0.00754P(t).P′(t)=0.00754P(t).

At t=19t=19t=19,

P′(19)=0.00754P(19)≈0.0428.P'(19)=0.00754P(19)\approx 0.0428.P′(19)=0.00754P(19)≈0.0428.

Since population is measured in millions of people and time is measured in years, the rate has units of millions of people per year. Therefore, the model estimates growth at about

0.0428 million people per year=42.8 thousand people per year.0.0428\text{ million people per year} =42.8\text{ thousand people per year}.0.0428 million people per year=42.8 thousand people per year.

The derivative gives an instantaneous rate: it describes how quickly the modeled population is changing at the specified time.


Compound interest and rates of change

Suppose an account begins with PPP dollars and earns an annual interest rate of RRR percent, compounded twice each year. If RRR is the numerical percent value—for example, R=4R=4R=4 for a 4%4\%4% rate—the amount after TTT years is

A=P(1+R200)2T.A=P\left(1+\frac{R}{200}\right)^{2T}.A=P(1+200R​)2T.

The factor of 200200200 accounts for expressing the rate as a percentage and dividing the annual rate across two compounding periods. The exponent 2T2T2T counts the total number of compounding periods.

Rate of change with respect to time

Treat PPP and RRR as constants and differentiate with respect to TTT. The exponent 2T2T2T is an inner function, so the chain rule contributes a factor of 222. Differentiating the exponential expression also contributes the natural logarithm of its base:

dAdT=2P(1+R200)2Tln⁡(1+R200).\frac{dA}{dT} = 2P\left(1+\frac{R}{200}\right)^{2T} \ln\left(1+\frac{R}{200}\right).dTdA​=2P(1+200R​)2Tln(1+200R​).

This derivative measures how quickly the account balance changes as time passes. Since AAA is measured in dollars and TTT in years, its units are dollars per year.

For a particular balance, interest rate, and time, evaluating this derivative estimates the account’s instantaneous dollar growth rate at that moment.

Rate of change with respect to the interest rate

Now treat PPP and TTT as constants and differentiate with respect to RRR. The inner function is 1+R2001+\frac{R}{200}1+200R​, whose derivative with respect to RRR is 1200\frac{1}{200}2001​. Applying the power rule and then the chain rule gives

dAdR=2TP200(1+R200)2T−1.\frac{dA}{dR} = \frac{2TP}{200} \left(1+\frac{R}{200}\right)^{2T-1}.dRdA​=2002TP​(1+200R​)2T−1.

This derivative measures how the account balance changes as the interest-rate number RRR changes, with the initial deposit and time held fixed.

Its units are dollars per percentage point. For example, a change from 4%4\%4% to 5%5\%5% is a change of one percentage point. It is not described as a 1%1\%1% increase: the increase from 444 to 555 is 25%25\%25% relative to the original rate, but the change relevant to this derivative is one percentage point.

Ordinary and partial derivative notation

When a formula contains several quantities that may be treated as variables, a derivative taken with respect to one quantity while holding the others fixed may be written using partial derivative notation, such as ∂A∂T\frac{\partial A}{\partial T}∂T∂A​ or ∂A∂R\frac{\partial A}{\partial R}∂R∂A​. This notation emphasizes which variable changes and which quantities are held constant. The underlying differentiation rules are the same.


Deriving the quotient rule

Let

Q(x)=f(x)g(x),Q(x)=\frac{f(x)}{g(x)},Q(x)=g(x)f(x)​,

where fff and ggg are differentiable and g(x)≠0g(x)\neq 0g(x)=0. A quotient can be rewritten as a product:

Q(x)=f(x)(g(x))−1.Q(x)=f(x)\bigl(g(x)\bigr)^{-1}.Q(x)=f(x)(g(x))−1.

Apply the product rule, followed by the chain rule to differentiate (g(x))−1\bigl(g(x)\bigr)^{-1}(g(x))−1:

Q′(x)=f′(x)(g(x))−1+f(x)[−(g(x))−2g′(x)].Q'(x) = f'(x)\bigl(g(x)\bigr)^{-1} + f(x)\left[-\bigl(g(x)\bigr)^{-2}g'(x)\right].Q′(x)=f′(x)(g(x))−1+f(x)[−(g(x))−2g′(x)].

Writing the terms as fractions gives

Q′(x)=f′(x)g(x)−f(x)g′(x)g(x)2.Q'(x)=\frac{f'(x)}{g(x)} -\frac{f(x)g'(x)}{g(x)^2}.Q′(x)=g(x)f′(x)​−g(x)2f(x)g′(x)​.

To combine them, give both fractions the denominator g(x)2g(x)^2g(x)2:

Q′(x)=f′(x)g(x)−f(x)g′(x)g(x)2.Q'(x) = \frac{f'(x)g(x)-f(x)g'(x)}{g(x)^2}.Q′(x)=g(x)2f′(x)g(x)−f(x)g′(x)​.

This is the quotient rule. Its numerator can be remembered as “low times derivative of high, minus high times derivative of low,” while its denominator is the square of the original denominator.

The rule follows from the product rule and chain rule; it does not need to be treated as an independent formula.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent