Tutorials › Calculus I › Factoring Expressions To Reveal A Substitution

Substitution and Reversing the Chain Rule · Tutorial 1135 of 1495

Factoring Expressions To Reveal A Substitution

Use algebraic identities to reveal a substitution pattern before integrating, then check that the resulting antiderivative differentiates to the original integrand.

Intermediate 9 min read

What You'll Learn

  • Factor expanded polynomials to recognize powers and shifted expressions.
  • Compare a proposed inner function with its derivative after rewriting.
  • Use substitution when the complete derivative factor is present.
  • Keep track of constant factors when converting the integral.
  • Recognize when a factorization does not provide a valid substitution.

Why Factor Before Choosing \(u\)?

A substitution can be difficult to see when an integrand is written as an expanded polynomial. A numerator such as \(x^2+2x+1\) may not immediately look like the derivative of a denominator. But factoring gives \((x+1)^2\), which can make the relationship clear.

The algebra does not change the integral: it reveals structure that was already present. Once the expression is rewritten, we can ask whether one part is the derivative of another part, up to a constant. If it is, substitution can turn the integral into a simpler one.

Key idea: Before choosing \(u\), factor or simplify polynomial expressions that may hide a composition or a derivative match. Then check the derivative of the proposed inner function against the whole factor multiplying the differential.

What Counts as a Useful Rewrite?

For an integral \(\int f(x)\,dx\), a substitution \(u=g(x)\) is useful when rewriting the integrand in terms of \(g(x)\) also reveals a factor proportional to \(g'(x)\,dx\). Here \(g'(x)\) is the derivative of the inner function. A constant multiple is acceptable because it can be taken outside the integral.

Factoring often reveals one of these patterns:

  • An expanded polynomial is a power, such as \(x^2+2x+1=(x+1)^2\).
  • A polynomial is a difference of squares, such as \(x^2-4=(x-2)(x+2)\).
  • A polynomial is the derivative of a composite denominator once its terms are grouped.
  • A high-degree polynomial is a power of a simpler expression, making that expression a natural choice for \(u\).

A factorization is useful for substitution only if the remaining factors fit together. It is not enough to spot a familiar expression somewhere in the integrand. The derivative factor must be present, possibly after multiplication or division by a constant.

Definition: A derivative match occurs when an integrand can be written in the form \(c\,g'(x)F(g(x))\), where \(c\) is a constant and \(g\) is differentiable. Then setting \(u=g(x)\) changes the integral into \(c\int F(u)\,du\).

A Reliable Routine

Use the following sequence when an integral contains polynomials that might hide a substitution:

1
Rewrite the polynomials.
Factor, group terms, or recognize a shifted power. Keep the equality exact, including constant terms.
2
Choose a candidate inner function.
Look for the expression that appears inside a power, logarithm, or denominator.
3
Differentiate it.
Calculate \(g'(x)\) and compare it with the full factor left beside the composite expression.
4
Account for constants and integrate.
Replace \(g'(x)\,dx\) by \(du\), including any constant multiplier, and integrate in \(u\).
5
Return to \(x\) and check.
Write an antiderivative in the original variable and differentiate it to compare with the original integrand.

Worked Examples

Worked Example: Factoring a Numerator to Match a Denominator

Evaluate \[ \int \frac{x^2+2x+1}{x^3+3x^2+3x+7}\,dx. \]

First factor the numerator and rewrite the denominator using the binomial expansion:

$$ x^2+2x+1=(x+1)^2 $$
$$ x^3+3x^2+3x+7=(x+1)^3+6. $$

Let \(u=(x+1)^3+6\). Its derivative is

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

The numerator is \((x+1)^2\), so \((x+1)^2\,dx=\frac{1}{3}\,du\). Therefore,

$$ \begin{aligned} \int \frac{x^2+2x+1}{x^3+3x^2+3x+7}\,dx &=\int \frac{(x+1)^2}{(x+1)^3+6}\,dx\\ &=\frac{1}{3}\int \frac{1}{u}\,du\\ &=\frac{1}{3}\ln|u|+C\\ &=\frac{1}{3}\ln|x^3+3x^2+3x+7|+C. \end{aligned} $$

The absolute value is needed for the logarithmic antiderivative on any interval where the denominator is nonzero. To check, differentiate the result:

$$ \frac{d}{dx}\left(\frac{1}{3}\ln|x^3+3x^2+3x+7|\right) = \frac{1}{3}\cdot \frac{3x^2+6x+3}{x^3+3x^2+3x+7} = \frac{(x+1)^2}{(x+1)^3+6}. $$

This is the original integrand in factored form.

Worked Example: Factoring Both the Numerator and the Derivative

Evaluate \[ \int \frac{x^2-4}{x^3-12x+5}\,dx. \]

The numerator is a difference of squares:

$$ x^2-4=(x-2)(x+2). $$

Now choose \(u=x^3-12x+5\), the denominator. Differentiating gives

$$ \frac{du}{dx}=3x^2-12=3(x^2-4)=3(x-2)(x+2). $$

Thus \(du=3(x^2-4)\,dx\), or \((x^2-4)\,dx=\frac{1}{3}\,du\). Substitution gives

$$ \begin{aligned} \int \frac{x^2-4}{x^3-12x+5}\,dx &=\frac{1}{3}\int \frac{1}{u}\,du\\ &=\frac{1}{3}\ln|u|+C\\ &=\frac{1}{3}\ln|x^3-12x+5|+C. \end{aligned} $$

Check the result by differentiating:

$$ \frac{d}{dx}\left(\frac{1}{3}\ln|x^3-12x+5|\right) = \frac{1}{3}\cdot\frac{3x^2-12}{x^3-12x+5} = \frac{x^2-4}{x^3-12x+5}. $$

The check holds wherever the denominator is nonzero, which is where the logarithmic expression is defined.

Worked Example: Recognizing a Power Hidden in an Expanded Polynomial

Evaluate \[ \int x\left(x^6-12x^4+48x^2-64\right)\,dx. \]

The degree-six polynomial is a cube of a quadratic expression. Expanding \((x^2-4)^3\) confirms the identity:

$$ \begin{aligned} (x^2-4)^3 &=(x^2-4)(x^2-4)(x^2-4)\\ &=(x^4-8x^2+16)(x^2-4)\\ &=x^6-4x^4-8x^4+32x^2+16x^2-64\\ &=x^6-12x^4+48x^2-64. \end{aligned} $$

The integrand is therefore \(x(x^2-4)^3\). Choose \(u=x^2-4\), so \(du=2x\,dx\), or \(x\,dx=\frac{1}{2}\,du\). Then

$$ \begin{aligned} \int x\left(x^6-12x^4+48x^2-64\right)\,dx &=\int x(x^2-4)^3\,dx\\ &=\frac{1}{2}\int u^3\,du\\ &=\frac{1}{2}\cdot\frac{u^4}{4}+C\\ &=\frac{(x^2-4)^4}{8}+C. \end{aligned} $$

For a check, differentiate:

$$ \frac{d}{dx}\left(\frac{(x^2-4)^4}{8}\right) = \frac{1}{8}\cdot4(x^2-4)^3\cdot2x = x(x^2-4)^3. $$

Expanding that final factor gives exactly the original integrand.

Why the Rewriting Is Valid

Factoring is an algebraic identity: it expresses a polynomial in a different form without changing its value. If the rewritten integrand has the form \(c\,g'(x)/g(x)\), where \(g(x)\ne 0\), the chain rule gives a direct justification for the logarithmic result.

Derivation: On any interval where \(g(x)\ne 0\), the derivative of \(\ln|g(x)|\) is \(g'(x)/g(x)\). Therefore, if algebraic rewriting shows that \(f(x)=c\,g'(x)/g(x)\), then $$ \frac{d}{dx}\bigl(c\ln|g(x)|\bigr) = c\frac{g'(x)}{g(x)} = f(x). $$ So \(c\ln|g(x)|+C\) is an antiderivative of \(f\) on that interval. The factorization does not create a new derivative match; it makes an existing equality easier to see.

For a power composition, the same reasoning uses the chain rule for powers: if the rewritten integrand is \(c\,g'(x)g(x)^n\), then an antiderivative for \(n\ne -1\) is \(c\,g(x)^{n+1}/(n+1)+C\), on intervals where the expression is defined.

A Common Mistake: Matching Only the Leading Term

In the second example, a tempting but incorrect step would be to notice that the derivative of \(x^3-12x+5\) begins with \(3x^2\), then treat it as \(3x^2\) and write

$$ \int \frac{x^2-4}{x^3-12x+5}\,dx \overset{\text{wrong}}{=} \frac{1}{3}\ln|x^3-12x+5|+C $$

The proposed answer happens to be correct, but that displayed reasoning is not: the derivative of the denominator is \(3x^2-12\), not \(3x^2\). It matches the numerator only after factoring the entire derivative:

$$ 3x^2-12=3(x^2-4). $$

A derivative match must include every term. Ignoring a constant or lower-degree term can make a plausible substitution invalid. Here, factoring shows that the full match does hold.

There is a related warning in the power example. The expression \(x^6-12x^4+48x^2-64\) factors as \((x^2-4)^3\), but that observation alone would not justify substituting \(u=x^2-4\) if the integrand were just \((x^2-4)^3\,dx\). Since \(du=2x\,dx\), the factor \(x\) is essential for this substitution. Always check both the composite expression and its derivative factor.

When Factoring Helps—and When It Does Not

Factoring is most useful when it reveals a complete pattern: a derivative match, a power composition, or a simpler expression after cancellation. It is not a promise that every polynomial integral can be handled by substitution. If no proposed inner function has its derivative present, factoring alone may not make substitution applicable.

Keep the domain in view, too. For a logarithmic answer, the inner function must be nonzero on the interval under consideration. An antiderivative can be stated separately on each interval that avoids its zeros. This is why logarithmic results are written with absolute values and why the calculation is understood on intervals where the denominator does not vanish.

The practical habit is simple: rewrite first, differentiate the proposed inner function exactly, and compare every term. That short algebraic check can distinguish a valid substitution from a pattern that only looks familiar.

Check Your Understanding

For each question, focus on what the factorization reveals and whether the derivative factor is complete.

  1. Factor \(x^2+6x+9\). If it is the numerator and the denominator is \((x+3)^3+2\), what substitution would you test?
  2. For \(g(x)=x^4-8x^2+3\), factor \(g'(x)\). Which quadratic factor could help you recognize a numerator derivative match?
  3. Rewrite \(x^6-6x^4+12x^2-8\) as a power of a quadratic expression.
  4. Why is a factor \(x\) needed to use \(u=x^2-4\) in the third worked example?
  5. What must be true of the inner function when using \(\ln|g(x)|\) as an antiderivative pattern?

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