← MATH 347 MathScape 0 MATH347

Chain Rule and u-Substitution (forward and backward)

11 min read

Jump to a section
Textbook: Logan, A First Course in Differential Equations, 3rd ed.  •  Chapter: 1  •  Section: 3

Quick Reference

Field Value
Textbook Logan, A First Course in Differential Equations, 3rd ed.
Chapter.Section.Subsection 1.3.1 Separation of Variables (integration step), as a prerequisite skill feeding that subsection
Pages pp. 22 to 30
Course MATH347 (Differential Equations)
Role in the course A calculus review skill that makes the central integration step of separation of variables legitimate

The page range above is verified against the cited edition. The single integration step on pp. 22 to 23 is where the chain rule, read backward, does the real work.


Try This First

Before any rule or formula, work this small case with a pencil.

A function is built by composition: the outside is “square it” and the inside is $u = 3t + 1$. So the whole function is $y = (3t + 1)^2$.

  1. Expand $(3t+1)^2$ into a polynomial and differentiate it the slow way.
  2. Now look at your answer. Can you see the number $3$ (the derivative of the inside) sitting as a factor?
Check your two answers against each other

Expanding first: $(3t+1)^2 = 9t^2 + 6t + 1$, so the derivative is $18t + 6$.

Factoring that result: $18t + 6 = 6(3t + 1) = 2(3t+1)\cdot 3$.

The piece $2(3t+1)$ is the derivative of the outside (“square it” becomes “two times it”), evaluated at the inside. The leftover factor $3$ is the derivative of the inside. Multiplying those two pieces is the chain rule, and you just saw it appear on its own.

The pattern you noticed, an inside-function derivative showing up as a factor, is the one idea this skill rests on. Reading it forward is the chain rule. Reading it backward is u-substitution. Differential equations need both directions.

An Intuitive Picture

Think of a composed function as a two-stage machine. An input $t$ goes into the first stage and produces an inside value $u$. That $u$ goes into the second stage and produces the output $y$. When $t$ moves a little, $u$ moves at its own rate, and then $y$ moves at its own rate relative to $u$. The total rate at which $y$ responds to $t$ is the product of those two rates. A fast inside stage feeding a fast outside stage gives a very fast overall response, which is why the two rates multiply rather than add.

Reading the machine in reverse is just as concrete. If you are handed an integrand that already carries the inside-stage rate as a factor, you can “undo” the outer machine and integrate as if the inside were a single new variable. That reverse reading is u-substitution, and it is the move that closes the integral at the heart of separation of variables.

Prerequisite Hub

Three calculus skills you already met lead into this, and two differential-equations skills follow from it. The map shows where to review and where this leads.

Builds On

Skill Course Why you need it here
Chain Rule (chain-rule) MATH161 u-substitution is this rule read backward; the forward rule must be automatic first
u-Substitution for Indefinite Integrals (u-substitution-indefinite) MATH162 the separation-of-variables integral only closes when you recognize a substitution
Implicit Differentiation (implicit-differentiation) MATH161 differentiating $x(t)$ that is inside another function is the same move that drives implicit differentiation

Unlocks

Skill What it adds
Separable Equations (separable-de) the first solution method for first-order equations, whose key step is exactly the backward chain rule shown here
Antiderivatives and Initial Value Problems (antiderivatives-ivp) recovering a function from its rate, then pinning down the constant with one data point

Prerequisite Map

Before You Start: Prerequisite Check

📋 Can you do these? (Click to reveal self-test)

Test yourself on these prerequisite skills:

  1. Chain rule (forward): Differentiate $y = \sin(t^2)$.

    Check

    $\dfrac{dy}{dt} = \cos(t^2)\cdot 2t = 2t\cos(t^2)$. The outside derivative $\cos$ is evaluated at the inside $t^2$, then multiplied by the inside derivative $2t$.

  2. u-substitution (backward): Evaluate $\displaystyle\int 2t\cos(t^2)\,dt$.

    Check

    Let $u = t^2$, so $du = 2t\,dt$. The integral becomes $\displaystyle\int \cos(u)\,du = \sin(u) + C = \sin(t^2) + C$. This is the previous problem run in reverse.

  3. Differentiating a named function of $t$: If $x = x(t)$, what is $\dfrac{d}{dt}\big[\ln|x|\big]$?

    Check

    $\dfrac{d}{dt}\big[\ln|x|\big] = \dfrac{1}{x}\cdot\dfrac{dx}{dt}$. The factor $\dfrac{dx}{dt}$ appears because $x$ is itself a function of $t$. This is the implicit-differentiation move, and it is exactly what separation of variables relies on.

If you struggled: review the three prerequisite skills in the hub above before continuing.


The Chain Rule (Forward)

State the forward rule precisely so the backward rule has something to reverse.

Chain Rule. If $y = f(u)$ and $u = g(t)$ are differentiable, then the composition $y = f(g(t))$ is differentiable and

$$\frac{dy}{dt} = \frac{dy}{du}\cdot\frac{du}{dt} = f'(g(t))\cdot g'(t).$$

In words: differentiate the outside function with the inside left alone, then multiply by the derivative of the inside. The two rates multiply.

u-Substitution (Backward)

Integration by substitution is the chain rule read in reverse.

Substitution Rule. If $u = g(t)$ has a continuous derivative and $f$ is continuous on the range of $g$, then

$$\int f(g(t))\,g'(t)\,dt = \int f(u)\,du.$$

The factor $g'(t)\,dt$ becomes $du$, which is exactly the inside-derivative factor that the chain rule produced going forward. When you spot that factor in an integrand, you can collapse the composition into a single variable $u$, integrate, and then put $g(t)$ back.

Why the Chain Rule Matters for Differential Equations

This is the reason the skill belongs to a differential-equations course.

Official definition (Logan). When solving $x' = f(x)g(t)$ by separation of variables, the step

$$\int \frac{1}{f(x)}\,\frac{dx}{dt}\,dt = \int \frac{1}{f(x)}\,dx$$

integrates with respect to $t$ while remembering that $x$ is a function of $t$. Recognizing this as the reverse of the chain rule (u-substitution) is what makes the integration legitimate.

Cite: Logan, 3rd ed., §1.3.1 Separation of Variables, pp. 22 to 23 (integration step).

Read the equation slowly. On the left, the integration variable is $t$, and $\dfrac{dx}{dt}$ sits inside as a factor. That factor is precisely the inside-derivative the chain rule manufactures. Treating $x$ as the new variable (set $u = x(t)$, so $du = \dfrac{dx}{dt}\,dt$) turns the left side into the right side. Without that backward chain-rule reading, the jump from a $t$-integral to an $x$-integral would have no justification.

How the Step Looks in Practice

Consider the equation $x' = x g(t)$, so $f(x) = x$. Following the definition above:

$$\int \frac{1}{x}\,\frac{dx}{dt}\,dt = \int \frac{1}{x}\,dx = \ln|x| + C_1.$$

The first equality is the substitution $u = x(t)$, $du = \dfrac{dx}{dt}\,dt$, run backward. The second is a standard antiderivative. The same single move recurs for every separable equation, which is why fluency here pays off repeatedly.

Worked Examples

Example 1: Forward, Then Backward (the round trip)

Forward. Differentiate $y = e^{t^2}$.

Predict first: the output is an exponential of a growing inside, so the rate should grow and should carry a factor from the inside.

$$\frac{dy}{dt} = e^{t^2}\cdot \frac{d}{dt}\big[t^2\big] = e^{t^2}\cdot 2t = 2t\,e^{t^2}.$$

The factor $2t$ is the inside derivative, matching the prediction.

Backward. Evaluate $\displaystyle\int 2t\,e^{t^2}\,dt$.

The integrand already carries the factor $2t$, which signals a substitution. Let $u = t^2$, so $du = 2t\,dt$:

$$\int 2t\,e^{t^2}\,dt = \int e^{u}\,du = e^{u} + C = e^{t^2} + C.$$

The integral undoes the derivative exactly. Forward and backward are the same fact seen from two sides.

Example 2: Supplying the Missing Constant Factor

Evaluate $\displaystyle\int t\,e^{t^2}\,dt$.

Predict first: this is almost Example 1, but the convenient $2$ is missing, so a constant will need adjusting.

Let $u = t^2$, so $du = 2t\,dt$, which means $t\,dt = \tfrac{1}{2}\,du$. The integrand $t\,e^{t^2}\,dt$ becomes $e^{u}\cdot\tfrac{1}{2}\,du$:

$$\int t\,e^{t^2}\,dt = \frac{1}{2}\int e^{u}\,du = \frac{1}{2}e^{u} + C = \frac{1}{2}e^{t^2} + C.$$

Check by differentiating the answer: $\dfrac{d}{dt}\Big[\tfrac{1}{2}e^{t^2}\Big] = \tfrac{1}{2}\cdot e^{t^2}\cdot 2t = t\,e^{t^2}$, which is the original integrand. The constant $\tfrac{1}{2}$ was exactly what the missing factor required.

Example 3: The Separation-of-Variables Integration Step

Set up the integral that solves $x' = x\,t$ by separation of variables, then carry out the backward chain-rule step. (Here $f(x) = x$ and $g(t) = t$.)

Separating the variables collects all $x$ on one side and all $t$ on the other, then integrates both sides:

$$\int \frac{1}{x}\,\frac{dx}{dt}\,dt = \int t\,dt.$$

Predict first: the left side should collapse to a logarithm, since $\dfrac{1}{x}$ integrates to $\ln|x|$, and the right side is a simple power.

Left side, by the backward chain rule with $u = x(t)$ and $du = \dfrac{dx}{dt}\,dt$:

$$\int \frac{1}{x}\,\frac{dx}{dt}\,dt = \int \frac{1}{u}\,du = \ln|x| + C_1.$$

Right side:

$$\int t\,dt = \frac{t^2}{2} + C_2.$$

Combining the constants into a single $C$ gives the implicit relation $\ln|x| = \dfrac{t^2}{2} + C$. The legitimacy of converting the left $t$-integral into an $x$-integral rests entirely on recognizing the substitution. That recognition is the skill of this page.

Common Misconceptions

Common misconception

composition can be differentiated piece by piece, multiplying the parts as written. A reader who writes $\dfrac{d}{dt}\sin(t^2) = \cos(t^2)$ and stops has differentiated the outside but forgotten the inside-derivative factor. Test the shortcut on the small case $y = (3t+1)^2$ from the opener: the careful answer is $18t + 6$, while differentiating “the outside only” gives $2(3t+1) = 6t + 2$, which is wrong by a factor coming from the inside. The product of two rates is not the rate of the outside alone.

Common misconception

in a substitution, the $dt$ and $du$ are interchangeable bookkeeping. A reader who replaces $f(g(t))$ by $f(u)$ but leaves $dt$ in place is missing that $du = g'(t)\,dt$ carries the inside derivative. Test it on $\displaystyle\int t\,e^{t^2}\,dt$: pretending $dt = du$ would give $e^{t^2}$ with no $\tfrac{1}{2}$, and differentiating that back returns $2t\,e^{t^2}$, not the original $t\,e^{t^2}$. The differential is not a passive label; it tracks exactly the factor the chain rule introduced.

Common misconception

in separation of variables, $\dfrac{dx}{dt}$ can simply be dropped once you integrate over $x$. The factor $\dfrac{dx}{dt}$ inside the $t$-integral is what permits the change to an $x$-integral; it becomes $du$ under $u = x(t)$. Dropping it without the substitution detaches the step from any rule and produces an answer that fails the differentiate-back check. The variable $x$ depends on $t$, so its rate cannot be ignored.

Practice Problems

Level 1 Forward Chain Rule

Differentiate $y = (5t + 2)^4$.

Thought Process

Identify the outside (“fourth power”) and the inside ($5t + 2$). Differentiate the outside with the inside left alone, then multiply by the inside derivative.

Show Answer

Outside derivative: $4(5t+2)^3$. Inside derivative: $5$.

$$\frac{dy}{dt} = 4(5t+2)^3\cdot 5 = 20(5t+2)^3.$$

Level 2 Backward: Clean Substitution

Evaluate $\displaystyle\int 3t^2\cos(t^3)\,dt$.

Thought Process

The integrand carries the factor $3t^2$. The derivative of $t^3$ is $3t^2$, so the substitution $u = t^3$ should absorb that factor cleanly into $du$.

Show Answer

Let $u = t^3$, so $du = 3t^2\,dt$.

$$\int 3t^2\cos(t^3)\,dt = \int \cos(u)\,du = \sin(u) + C = \sin(t^3) + C.$$

Check: $\dfrac{d}{dt}\big[\sin(t^3)\big] = \cos(t^3)\cdot 3t^2$, the original integrand.

Level 3 Backward: Adjust the Constant

Evaluate $\displaystyle\int \frac{t}{t^2 + 1}\,dt$.

Thought Process

The denominator is $t^2 + 1$, whose derivative is $2t$. The numerator is only $t$, so a constant factor will need adjusting after the substitution.

Show Answer

Let $u = t^2 + 1$, so $du = 2t\,dt$, which gives $t\,dt = \tfrac{1}{2}\,du$.

$$\int \frac{t}{t^2 + 1}\,dt = \frac{1}{2}\int \frac{1}{u}\,du = \frac{1}{2}\ln|u| + C = \frac{1}{2}\ln(t^2 + 1) + C.$$

The absolute value is dropped because $t^2 + 1 > 0$ for every $t$.

Check: $\dfrac{d}{dt}\Big[\tfrac{1}{2}\ln(t^2+1)\Big] = \tfrac{1}{2}\cdot\dfrac{2t}{t^2+1} = \dfrac{t}{t^2+1}$.

Level 4 The Separation Step

The equation $x' = x^2\,t$ separates to $\displaystyle\int \frac{1}{x^2}\,\frac{dx}{dt}\,dt = \int t\,dt$. Carry out the left integral using the backward chain rule, and write the implicit relation.

Thought Process

On the left, set $u = x(t)$ so that $du = \dfrac{dx}{dt}\,dt$. The left integral becomes $\displaystyle\int \frac{1}{u^2}\,du = \int u^{-2}\,du$. Integrate both sides and combine constants.

Show Answer

Left side, with $u = x$ and $du = \dfrac{dx}{dt}\,dt$:

$$\int \frac{1}{x^2}\,\frac{dx}{dt}\,dt = \int u^{-2}\,du = -u^{-1} + C_1 = -\frac{1}{x} + C_1.$$

Right side:

$$\int t\,dt = \frac{t^2}{2} + C_2.$$

Combining constants into one $C$:

$$-\frac{1}{x} = \frac{t^2}{2} + C.$$

This is the implicit relation tying $x$ to $t$. The backward chain rule is what licensed turning the $t$-integral on the left into an $x$-integral.

Level 5 Justify and Reverse

A classmate writes $\displaystyle\int \frac{1}{x}\,\frac{dx}{dt}\,dt = \ln|t| + C$, reasoning that the integration variable is $t$. Find the flaw, give the correct result, and explain in one sentence which variable the logarithm depends on.

Thought Process

The integrand is $\dfrac{1}{x}\cdot\dfrac{dx}{dt}$, not $\dfrac{1}{t}$. The factor $\dfrac{dx}{dt}\,dt$ is the differential of $x$, so the substitution $u = x(t)$ collapses the whole integrand to $\dfrac{1}{u}\,du$. The logarithm must come out in $x$, not $t$.

Show Answer

The flaw: the classmate integrated $\dfrac{1}{x}$ as if it were $\dfrac{1}{t}$, ignoring the factor $\dfrac{dx}{dt}$. That factor is the inside derivative; it cannot be discarded.

Correct result: let $u = x(t)$, so $du = \dfrac{dx}{dt}\,dt$, and

$$\int \frac{1}{x}\,\frac{dx}{dt}\,dt = \int \frac{1}{u}\,du = \ln|x| + C.$$

Which variable: the logarithm depends on $x$ (the unknown function), not on $t$, because the substitution turned the integral into one over $x$.

One way to see it is the substitution above. Another way to see it is to differentiate the proposed answer: $\dfrac{d}{dt}\ln|x| = \dfrac{1}{x}\dfrac{dx}{dt}$, which matches the integrand, while $\dfrac{d}{dt}\ln|t| = \dfrac{1}{t}$ does not. Which check do you find more convincing, and why?

Mastery Checklist

Novice (Level 1-2):

Competent (Level 3-4):

Proficient (Level 5):

Mental Model

The two-stage machine, read both directions.

Forward, a composed function is a machine where input $t$ produces an inside value $u$, and $u$ produces the output $y$. The overall rate is the product of the two stage rates, which is the chain rule.

Backward, an integral whose integrand already carries the inside-stage rate as a factor can be collapsed to a single variable, integrated, and unpacked. That is u-substitution. Separation of variables runs the machine backward with the inside variable being the unknown function $x(t)$ itself.


Connections

Looking back:

Looking ahead:

Real-world connections:

Resources

Resource Where What it covers
Logan, 3rd ed. §1.3.1 Separation of Variables (integration step, p. 22) PDF the primary source for the integration step this page supports
OpenStax Calculus Vol. 2 §4.3 Separable Equations OpenStax separate then integrate, with a parallel worked treatment
Stewart Ch. 9 §9.1 prerequisite list (power, product, chain rules; exponential derivatives) ~/math347-ingest/math_guides/MATH_347/Stewart Chapter 9/Section 1/stewart_calculus_chapter_9_section_1_modeling_with_differential_equations.tex the forward-rule review that this skill assumes


Last updated: 2026-06-16