Why a Proposed Substitution Needs a Test
A substitution is not useful merely because an expression in the integrand looks like a possible choice for \(u\). The change of variable must account for the whole integrand: every factor must be rewritten, and the differential must be expressed consistently. If an \(x\) remains after the rewrite, the integral has not been converted into an integral in \(u\) alone.
This check is especially important when a proposed \(u\) has a derivative that vanishes somewhere. Solving for \(dx\) by dividing by \(du/dx\) is only valid where that derivative is nonzero. A substitution can fail as a single change of variable across such a point even when the original integrand is perfectly defined there.
What It Means for the Rewriting to Work
Suppose an integrand is \(f(x)\,dx\), and a proposed substitution is \(u=u(x)\). Differentiating gives \(du=u'(x)\,dx\). A direct substitution works when the integrand can be rewritten as \(G(u)\,du\), where \(G\) depends only on \(u\). For example, a factor \(u'(x)\,dx\) can be replaced together by \(du\).
Sometimes a calculation instead tries to solve for \(dx\): \(dx=du/u'(x)\). This step requires \(u'(x)\ne0\). It is valid only on intervals where that condition holds. If \(u'(x)=0\) at a point, the formula for \(dx\) is undefined there, regardless of whether the original integrand is defined.
There is an important distinction between solving for \(dx\) and matching a differential factor. If the integrand already contains \(u'(x)\,dx\), replace that whole factor by \(du\); do not divide by \(u'(x)\). The chain rule explains why this works.
The test is not a claim that every valid substitution must produce an immediately familiar antiderivative. It is a way to diagnose whether the proposed change has actually converted the integral into a \(u\)-integral, rather than leaving unaccounted \(x\)-dependence or using an invalid division.
Worked Example: A Quadratic Choice Leaves the Original Variable
Worked Example: Testing \(u=x^2+x+1\)
Consider $$ \int \frac{1}{x^2+x+1}\,dx $$ and test the proposed substitution \(u=x^2+x+1\).
First differentiate the proposed \(u\): $$ du=(2x+1)\,dx. $$ The denominator becomes \(u\), so the integrand is initially $$ \frac{1}{u}\,dx. $$ To replace \(dx\), one might write $$ dx=\frac{du}{2x+1}. $$ This division is valid only where \(2x+1\ne0\), that is, on intervals not containing \(x=-\tfrac12\). On either interval \((-\infty,-\tfrac12)\) or \((-\tfrac12,\infty)\), the rewrite is $$ \frac{1}{x^2+x+1}\,dx = \frac{1}{u(2x+1)}\,du. $$ The right-hand side still contains \(x\). Thus this proposed substitution has not produced an integrand in \(u\) alone without an additional branch-specific rewrite; as a direct substitution, it has left the original variable behind.
At \(x=-\tfrac12\), the formula \(dx=du/(2x+1)\) is undefined. This is not a singularity of the original integrand: completing the square gives $$ x^2+x+1=\left(x+\frac12\right)^2+\frac34, $$ so the denominator is at least \(\tfrac34\), and the integrand at \(x=-\tfrac12\) is \(\tfrac43\).
Check: The derivative \(du/dx=2x+1\) vanishes at \(x=-\tfrac12\), exactly where the attempted division fails. The original integrand remains defined there. The issue is the proposed rewriting, not the original integral.
Worked Example: Matching the Differential Factor
Worked Example: A Substitution That Accounts for Every Factor
Consider $$ \int (3x^2+2x+1)e^{x^3+x^2+x}\,dx. $$ Test \(u=x^3+x^2+x\).
Differentiating gives $$ du=(3x^2+2x+1)\,dx. $$ The exponential becomes \(e^u\), and the polynomial factor together with \(dx\) is exactly \(du\). Hence every factor has been rewritten: $$ (3x^2+2x+1)e^{x^3+x^2+x}\,dx=e^u\,du. $$ Therefore, $$ \int e^u\,du=e^u+C. $$ Returning to \(x\), an antiderivative is $$ e^{x^3+x^2+x}+C. $$
Check: Differentiating the proposed antiderivative gives $$ \frac{d}{dx}e^{x^3+x^2+x} = e^{x^3+x^2+x}(3x^2+2x+1), $$ which is the original integrand. No division by \(3x^2+2x+1\) was used; the matching factor and \(dx\) were replaced together by \(du\).
Worked Example: Do Not Divide When the Differential Already Matches
Worked Example: Using \(u=x^2+9\) Without Solving for \(dx\)
Consider $$ \int \frac{2x}{x^2+9}\,dx $$ with \(u=x^2+9\). Differentiating gives $$ du=2x\,dx. $$ The denominator is \(u\), and the numerator together with \(dx\) is \(du\). Thus $$ \frac{2x}{x^2+9}\,dx=\frac{1}{u}\,du, $$ so $$ \int \frac{1}{u}\,du=\ln|u|+C. $$ Since \(u=x^2+9>0\) for every real \(x\), \(\ln|u|=\ln u\). The result is $$ \ln(x^2+9)+C. $$
Check: Differentiating, $$ \frac{d}{dx}\ln(x^2+9)=\frac{2x}{x^2+9}, $$ which recovers the integrand. In particular, this check works at \(x=0\). At that point \(du/dx=2x=0\), so writing \(dx=du/(2x)\) would be invalid. It is unnecessary: the factor \(2x\,dx\) is already \(du\), and the resulting antiderivative is valid across \(x=0\).
A Reliable Diagnostic Procedure
Use the following sequence whenever you are testing a proposed substitution. The point is not to guess from one visible part of the integrand, but to verify the entire conversion before proceeding.
Write \(du=u'(x)\,dx\) explicitly. This shows what factor must be accounted for by the differential.
Replace each expression in \(x\) that can be written in terms of \(u\), and identify any factor \(u'(x)\,dx\) that can be replaced directly by \(du\).
Check that the transformed integrand is \(G(u)\,du\). If an \(x\) remains, the conversion is incomplete unless you can express it consistently in terms of \(u\) on a stated interval.
If you used \(dx=du/u'(x)\), state that \(u'(x)\ne0\) on the interval where the formula is used. Do not apply it at a zero of \(u'\).
After finding an antiderivative, differentiate it with respect to \(x\) and compare with the original integrand.
Common Mistake: Treating \(dx=du/u'(x)\) as Universal
A frequent error is to write \(dx=du/u'(x)\) as if it were valid everywhere, without checking where the denominator vanishes. In the first example, the incorrect calculation would be $$ dx=\frac{du}{2x+1} \quad\text{for every real }x. $$ That statement is not valid at \(x=-\tfrac12\), because its denominator is zero there.
The correction is to state the domain of the division: $$ dx=\frac{du}{2x+1} \quad\text{only where }x\ne-\frac12. $$ This formula can be used separately on intervals that avoid \(-\tfrac12\), but it cannot be used at that point. The original integrand \(1/(x^2+x+1)\) is defined there, with value \(\tfrac43\). Therefore, a singularity introduced by dividing during a substitution must not be mistaken for a singularity in the original problem.
A related mistake is to focus on the denominator or exponential and ignore the rest of the integrand. In the first example, \(x^2+x+1=u\) does rewrite the denominator, but the differential still has to be handled. In the second example, the exponential alone is not the full check: the polynomial factor is what supplies the matching derivative. Rewriting only the visually prominent expression is not enough.
Why This Check Matters
A substitution is a change in how the integral is represented. The chain rule is the reason a matching derivative factor can be absorbed into \(du\), and the same rule makes differentiation an effective final check. If the rewrite leaves \(x\) mixed with \(u\), then the calculation has not yet reached an integral expressed solely in the new variable.
Checking before integrating also exposes domain issues early. A derivative can vanish at an isolated point, as in \(u=x^2+9\) at \(x=0\), or at a point where an attempted division would conceal that the original integrand is regular, as in \(u=x^2+x+1\). Matching \(u'(x)\,dx\) directly avoids an unnecessary division; when division is used, its interval of validity must be stated.
Check Your Understanding
For each question, check both the transformed factors and any conditions needed for division.
- For \(\int 2x\,e^{x^2}\,dx\), test \(u=x^2\). What does the full integrand become in terms of \(u\) and \(du\)?
- For \(\int e^x\,dx\), test \(u=x^2\) on \(x>0\). What formula for \(dx\) results, and does it simplify the integrand?
- For \(\int \frac{1}{x^2+4}\,dx\), test \(u=x^2+4\). If you solve for \(dx\), where is the resulting formula valid, and what \(x\)-dependence remains?
- Why is it valid to replace \(2x\,dx\) by \(du\) when \(u=x^2+9\), even at \(x=0\)?
- What must be stated whenever a substitution calculation divides by \(u'(x)\)?