Tutorials › Calculus I › Nested Compositions In Indefinite Integrals

Substitution and Reversing the Chain Rule · Tutorial 1151 of 1495

Nested Compositions In Indefinite Integrals

Use a carefully chosen substitution to turn nested indefinite integrals into familiar antiderivatives, then verify each result by differentiation.

Intermediate 9 min read

What You'll Learn

  • Identify the argument of an outer function as a useful substitution in a nested composite.
  • Match the derivative of the chosen expression to the factors in the integrand.
  • Account for constant factors when rewriting the differential.
  • Integrate nested powers, exponentials, and trigonometric expressions by substitution.
  • Verify an indefinite integral by differentiating the proposed antiderivative.
  • Recognize when a substitution does not simplify the entire integrand.

Why Nested Expressions Need Careful Substitution

An expression such as \((5x^2-1)^6\) is built in layers: first \(x\) is squared and combined with constants, then the resulting expression is raised to a power. The chain rule differentiates these layers from the outside inward. Substitution reverses that process: we look for an inner expression whose derivative is also present in the integrand.

The key is not to choose an expression merely because it appears inside another one. A useful choice makes the rest of the integrand expressible in terms of the new variable, with its differential accounted for. In a nested expression, the argument of the outer function is often the useful choice. We will apply this idea to powers, exponentials, and trigonometric functions.

Central idea: If \(u=g(x)\), then \(du=g'(x)\,dx\). When an integrand contains a function of \(g(x)\) together with the factor \(g'(x)\), substitution replaces that nested expression by the simpler variable \(u\).

The Rule Behind the Method

Suppose \(F\) is continuous on an interval and \(H\) is an antiderivative of \(F\) there, so \(H'(u)=F(u)\). Let \(g\) be differentiable, with its values in that interval. The chain rule gives

$$ \frac{d}{dx}H(g(x)) = H'(g(x))g'(x) = F(g(x))g'(x). $$

Therefore, whenever an integrand has the form \(F(g(x))g'(x)\), an antiderivative is \(H(g(x))\). In substitution notation, we set \(u=g(x)\) and \(du=g'(x)\,dx\), so the integral becomes \(\int F(u)\,du\). We then find an antiderivative in \(u\) and replace \(u\) by \(g(x)\). The arbitrary constant \(C\) is included because all antiderivatives of the same function on an interval differ by a constant.

Theorem: If \(H'=F\) on an interval containing the values of \(g\), and \(g\) is differentiable, then $$ \int F(g(x))g'(x)\,dx=H(g(x))+C $$ on any interval where the expressions are defined.

This result explains why substitution works: it is precisely the chain rule run backward. The derivative factor \(g'(x)\) is essential. A constant multiple of it is also enough, provided that constant is carried through the calculation.

A Practical Way to Choose \(u\)

In a composite such as \(F(g(x))\), begin by considering \(u=g(x)\), the argument being fed into the outer function \(F\). Then calculate \(du\) and compare it with the other factors in the integrand. A successful choice has two features:

  • The outer function becomes a familiar expression in \(u\), such as \(u^n\), \(e^u\), or \(\sin u\).
  • The remaining factors can be replaced by a constant multiple of \(du\), leaving an integral entirely in \(u\).

The derivative factor may be written in a different-looking form, so compare it algebraically rather than relying only on visual matching. If the factor is a constant multiple of \(g'(x)\), that constant remains as a multiplier or divisor in the transformed integral.

Worked Example: A Nested Power

Worked Example: A Nested Power

Evaluate \(\int 10x(5x^2-1)^6\,dx\).

The outer operation is raising the expression \(5x^2-1\) to the sixth power. Set \(u\) equal to that expression:

$$ u=5x^2-1. $$

Differentiate:

$$ du=10x\,dx. $$

The factor \(10x\,dx\) in the integral is exactly \(du\). Thus

$$ \int 10x(5x^2-1)^6\,dx = \int u^6\,du = \frac{u^7}{7}+C. $$

Replace \(u\) with \(5x^2-1\):

$$ \int 10x(5x^2-1)^6\,dx = \frac{(5x^2-1)^7}{7}+C. $$

To check, differentiate the proposed antiderivative:

$$ \frac{d}{dx}\left(\frac{(5x^2-1)^7}{7}\right) = \frac{1}{7}\cdot 7(5x^2-1)^6\cdot 10x = 10x(5x^2-1)^6. $$

This is the original integrand, so the antiderivative is correct.

Worked Example: An Exponential of a Nested Expression

Worked Example: An Exponential of a Nested Expression

Evaluate \(\int 12x(3x^2+2)^2 e^{(3x^2+2)^3}\,dx\).

The exponential is the outer function, and its argument is the nested expression \((3x^2+2)^3\). Choose that entire argument as \(u\):

$$ u=(3x^2+2)^3. $$

Differentiate using the chain rule. The derivative of the outer cube contributes a factor of \(3(3x^2+2)^2\), and the derivative of \(3x^2+2\) is \(6x\):

$$ du=3(3x^2+2)^2(6x)\,dx =18x(3x^2+2)^2\,dx. $$

The factor in the original integral is \(12x(3x^2+2)^2\,dx\), which is \(\frac{2}{3}du\), since \(\frac{2}{3}\cdot18x=12x\). Therefore

$$ \int 12x(3x^2+2)^2 e^{(3x^2+2)^3}\,dx = \frac{2}{3}\int e^u\,du = \frac{2}{3}e^u+C. $$

Substituting back gives

$$ \int 12x(3x^2+2)^2 e^{(3x^2+2)^3}\,dx = \frac{2}{3}e^{(3x^2+2)^3}+C. $$

Check by differentiation:

$$ \frac{d}{dx}\left(\frac{2}{3}e^{(3x^2+2)^3}\right) = \frac{2}{3}e^{(3x^2+2)^3}\cdot18x(3x^2+2)^2 = 12x(3x^2+2)^2e^{(3x^2+2)^3}. $$

The result differentiates to the original integrand. Choosing the complete exponent as \(u\) lets the exponential become \(e^u\) and gathers the nested chain-rule factors into \(du\).

Worked Example: A Trigonometric Function of a Trigonometric Expression

Worked Example: Nested Sines

Evaluate \(\int \cos(3x)\sin(\sin(3x))\,dx\).

The outer sine has argument \(\sin(3x)\), so set

$$ u=\sin(3x). $$

Then

$$ du=3\cos(3x)\,dx, \qquad \cos(3x)\,dx=\frac{1}{3}du. $$

The factor \(\cos(3x)\,dx\) therefore matches the derivative of \(u\) up to the constant factor \(\frac{1}{3}\). Substituting gives

$$ \int \cos(3x)\sin(\sin(3x))\,dx = \frac{1}{3}\int \sin u\,du = -\frac{1}{3}\cos u+C. $$

Returning to \(x\),

$$ \int \cos(3x)\sin(\sin(3x))\,dx = -\frac{1}{3}\cos(\sin(3x))+C. $$

Differentiate to check:

$$ \frac{d}{dx}\left(-\frac{1}{3}\cos(\sin(3x))\right) = -\frac{1}{3}\left[-\sin(\sin(3x))\cdot3\cos(3x)\right] = \cos(3x)\sin(\sin(3x)). $$

The derivative is exactly the integrand. In particular, \(u=\sin(3x)\) does match the displayed factors: its differential is \(3\cos(3x)\,dx\), so only the constant factor \(\frac{1}{3}\) is needed.

Why the Differential Factor Matters

The substitution does not replace an expression in isolation. It replaces both the chosen expression and its derivative factor. For example, if \(u=g(x)\), then \(du=g'(x)\,dx\); it is not generally valid to replace \(g(x)\) by \(u\) while leaving every other factor untouched. The transformed integral must contain only \(u\) and \(du\).

A common error is to omit the constant multiplier in the differential. In the nested-sines example, treating \(\cos(3x)\,dx\) as \(du\) would give the incorrect result \(-\cos(\sin(3x))+C\). Differentiating that proposed answer exposes the error:

$$ \frac{d}{dx}\left[-\cos(\sin(3x))\right] = 3\cos(3x)\sin(\sin(3x)), $$

which is three times the required integrand. Since \(du=3\cos(3x)\,dx\), the correct replacement is \(\cos(3x)\,dx=\frac{1}{3}du\). Including that factor produces \(-\frac{1}{3}\cos(\sin(3x))+C\), whose derivative was checked above.

When a Choice Is Not Yet Useful

A substitution is useful only if it accounts for the whole integrand. Suppose one sets \(u=3x^2+2\) in the exponential example. The exponential would become \(e^{u^3}\), and the remaining power would become \(u^2\). That substitution does not turn the integral into a basic exponential integral in \(u\). The choice \(u=(3x^2+2)^3\), by contrast, makes the exponential \(e^u\) and its derivative supplies the other factors up to a constant.

This comparison illustrates a practical test: after proposing \(u\), write out \(du\) and rewrite every factor in the integral. If some part remains in terms of \(x\), or if the resulting integral is not simpler, the choice has not accomplished the intended reversal of the chain rule. Not every nested expression has a direct substitution of this form.

Takeaway: Choose the argument of the outer function when its derivative is represented in the remaining factors. Include any constant multiple in \(du\), integrate in \(u\), substitute back, and differentiate the result to check it.

Check Your Understanding

For each question, identify the proposed inner expression and pay attention to its derivative factor.

  1. Evaluate \(\int 6x(3x^2+4)^5\,dx\) by substitution, and verify the result by differentiation.
  2. For \(\int 8x e^{4x^2-1}\,dx\), what constant multiple of \(du\) is \(8x\,dx\) if \(u=4x^2-1\)?
  3. Evaluate \(\int \cos(2x)\cos(\sin(2x))\,dx\) by choosing the argument of the outer cosine as \(u\).
  4. Differentiate \(\frac{1}{3}e^{(x^2+1)^3}\) and state the integrand it is an antiderivative of.
  5. Why is it necessary to rewrite all factors in terms of \(u\) and \(du\) before integrating?

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon