Integration by substitution

Some integrals look nothing like the standard forms in a table, yet they are secretly a chain-rule derivative in disguise. Integration by substitution is the trick that strips off that disguise. Spot an inner function sitting inside an outer one, notice that its derivative is lurking elsewhere in the integrand, rename the inner function tt, and the whole mess collapses into a one-line standard integral in tt. This sits in the Integrals sub-unit of Calculus, right after the basic standard forms, and it is the gateway technique before integration by parts and partial fractions. Two patterns recur constantly on this syllabus: ∫f′(x)[f(x)]n dx\int f'(x)[f(x)]^n\,dx and ∫f′(x)f(x) dx\int \dfrac{f'(x)}{f(x)}\,dx. Once you can recognise these two shapes on sight, a large fraction of exam integration questions fall quickly.

The core insight

Substitution runs the chain rule backwards: setting t=g(x)t=g(x) turns an integrand shaped like f(g(x)) g′(x)f(g(x))\,g'(x) into the plain integral ∫f(t) dt\int f(t)\,dt.

The core idea

Differentiation has the chain rule; integration by substitution is simply that rule read in reverse. If I=∫f(g(x)) g′(x) dxI=\int f(g(x))\,g'(x)\,dx, then setting t=g(x)t=g(x) gives dt=g′(x) dxdt=g'(x)\,dx, and the whole integral turns into a function of tt alone.

I=∫f(g(x)) g′(x) dx=∫f(t) dtI=\int f(g(x))\,g'(x)\,dx=\int f(t)\,dt

where: g(x)g(x) is the "inner function" chosen as the new variable tt, g′(x) dxg'(x)\,dx is the leftover piece of the integrand that must exactly match dtdt, and ff is whatever standard function remains once tt replaces g(x)g(x). Two specific instances of this idea are worth memorising outright, because they appear over and over in this syllabus. Substituting t=f(x)t=f(x) into ∫f′(x)[f(x)]n dx\int f'(x)[f(x)]^n\,dx turns it into ∫tn dt\int t^n\,dt, giving

∫f′(x) [f(x)]n dx=[f(x)]n+1n+1+C(n≠−1)\int f'(x)\,[f(x)]^n\,dx=\frac{[f(x)]^{n+1}}{n+1}+C \qquad (n\neq-1)

where: f(x)f(x) is any differentiable function, f′(x)f'(x) is its derivative appearing as a factor in the integrand, nn is a real number other than −1-1, and CC is the constant of integration. The same substitution t=f(x)t=f(x) applied to ∫f′(x)f(x) dx\int \dfrac{f'(x)}{f(x)}\,dx turns it into ∫dtt\int \dfrac{dt}{t}, giving the log form

∫f′(x)f(x) dx=ln⁡∣f(x)∣+C\int \frac{f'(x)}{f(x)}\,dx=\ln|f(x)|+C

where: the modulus is essential because f(x)f(x) may be negative over part of the domain, and ln⁡∣t∣\ln|t| is only defined for t≠0t\neq0. The general procedure behind both boxed results is always the same four moves: choose t=g(x)t=g(x) so that dtdt (up to a constant factor) matches what is left in the integrand, rewrite the entire integral purely in terms of tt, integrate using a standard form, then resubstitute t=g(x)t=g(x) and append CC. The hardest part is rarely the algebra — it is spotting the shape. An integrand qualifies for substitution whenever you can point at one visible piece and say "that looks like the derivative of this other piece sitting next to it." The two boxed results are not the only place substitution shows up, but they cover the large majority of exam integrands on this syllabus. Integrals such as ∫sec⁡2x tan⁡x dx\int\sec^2x\,\tan x\,dx (here f(x)=tan⁡xf(x)=\tan x, so f′(x)=sec⁡2xf'(x)=\sec^2x, giving the power form with n=1n=1) or ∫2xx2+4 dx\int\dfrac{2x}{x^2+4}\,dx (here f(x)=x2+4f(x)=x^2+4, so f′(x)=2xf'(x)=2x, giving the log form directly) are both instances of the same pairing, just dressed differently. Training your eye to separate an integrand into "inner function" and "its derivative, possibly times a constant" is what makes substitution fast rather than a trial-and-error search.

Figure
A chain rule arrow going from f of g of x to f prime of g of x times g prime of x, with a reverse arrow labelled substitution t equals g of x going back from the derivative form to the plain integral of f of t dt
Substitution reverses the chain rule f( g(x) ) f'( g(x) ) times g'(x) derivative, by the chain rule differentiate integrate, t = g(x) integral of f(t) dt integral of f'(g(x)) g'(x) dx Same two boxes, opposite direction: naming the inner function t undoes the chain rule
Derivation ADeriving the power-form substitution result

Starting from the plain rule that ∫tn dt=tn+1n+1+C\int t^n\,dt=\dfrac{t^{n+1}}{n+1}+C for n≠−1n\neq-1, show step by step that substituting t=f(x)t=f(x) into the integral ∫f′(x) [f(x)]n dx\int f'(x)\,[f(x)]^n\,dx reproduces the boxed formula [f(x)]n+1n+1+C\dfrac{[f(x)]^{n+1}}{n+1}+C exactly, so that the shortcut can be applied directly on sight without repeating the substitution every time.

Step 1. Begin with the target integral I=∫f′(x) [f(x)]n dxI=\int f'(x)\,[f(x)]^n\,dx, where ff is differentiable and n≠−1n\neq -1. The integrand visibly has two pieces: the factor [f(x)]n[f(x)]^n, and alongside it the factor f′(x)f'(x), which is exactly the derivative of the base of that power.

Step 2. Introduce the substitution t=f(x)t=f(x). Differentiating both sides with respect to xx gives dtdx=f′(x)\dfrac{dt}{dx}=f'(x), so dt=f′(x) dxdt=f'(x)\,dx. This is the key move: the "extra" factor f′(x) dxf'(x)\,dx in the original integral is precisely dtdt, with nothing left over and no compensating constant needed.

Step 3. Rewrite II entirely in terms of tt. Since [f(x)]n[f(x)]^n becomes tnt^n and f′(x) dxf'(x)\,dx becomes dtdt, the integral is now I=∫tn dtI=\int t^n\,dt, a plain power-rule integral with no trace of xx remaining.

Step 4. Apply the standard power rule for integration, valid because n≠−1n\neq -1: ∫tn dt=tn+1n+1+C\int t^n\,dt=\dfrac{t^{n+1}}{n+1}+C, where CC is the constant of integration collected at this stage.

Step 5. Resubstitute t=f(x)t=f(x) to return the answer to the original variable xx: I=[f(x)]n+1n+1+CI=\dfrac{[f(x)]^{n+1}}{n+1}+C, which is exactly the boxed result quoted above. The case n=−1n=-1 is excluded here because it would need ∫t−1 dt=ln⁡∣t∣+C\int t^{-1}\,dt=\ln|t|+C instead, which is the separate log-form result derived the same way.

Worked example

Evaluate ∫2x x2+1  dx\displaystyle\int 2x\,\sqrt{x^2+1}\;dx.

Step 1. Choose the substitution. Let t=x2+1t=x^2+1, so dtdx=2x\dfrac{dt}{dx}=2x, i.e. dt=2x dxdt=2x\,dx. The factor 2x dx2x\,dx sitting next to x2+1\sqrt{x^2+1} is exactly dtdt, so this substitution absorbs the entire integrand with nothing left over.

Step 2. Rewrite the integral purely in terms of tt. Since x2+1=t=t1/2\sqrt{x^2+1}=\sqrt{t}=t^{1/2} and 2x dx=dt2x\,dx=dt,

∫2xx2+1 dx=∫t1/2 dt\int 2x\sqrt{x^2+1}\,dx=\int t^{1/2}\,dt

Step 3. Integrate using the power rule with n=12n=\tfrac12.

∫t1/2 dt=t3/23/2+C=23t3/2+C\int t^{1/2}\,dt=\frac{t^{3/2}}{3/2}+C=\frac{2}{3}t^{3/2}+C

Step 4. Resubstitute t=x2+1t=x^2+1 to return to xx.

∫2xx2+1 dx=23(x2+1)3/2+C\boxed{\int 2x\sqrt{x^2+1}\,dx=\frac{2}{3}(x^2+1)^{3/2}+C}

Competitive stretch

The log-form pattern is worth seeing worked once too, since it is just as common in exams. Evaluate ∫tan⁡x  dx\displaystyle\int\tan x\;dx. Rewriting tan⁡x=sin⁡xcos⁡x\tan x=\dfrac{\sin x}{\cos x} and letting t=cos⁡xt=\cos x gives dt=−sin⁡x dxdt=-\sin x\,dx, so sin⁡x dx=−dt\sin x\,dx=-dt. The integral becomes ∫−dtt=−ln⁡∣t∣+C\displaystyle\int\frac{-dt}{t}=-\ln|t|+C, and resubstituting t=cos⁡xt=\cos x gives −ln⁡∣cos⁡x∣+C-\ln|\cos x|+C, which is conventionally rewritten using −ln⁡∣cos⁡x∣=ln⁡∣sec⁡x∣-\ln|\cos x|=\ln|\sec x| as

∫tan⁡x dx=ln⁡∣sec⁡x∣+C\boxed{\int\tan x\,dx=\ln|\sec x|+C}

A near-free check after any substitution problem: differentiate the final answer and confirm it reproduces the original integrand. That single habit catches almost every sign slip, missing constant, or incomplete resubstitution before it costs exam marks.

Common traps

  • Leaving a stray xx in the integrand after substituting — this means dxdx was not fully converted into dtdt, so the substitution is incomplete or the wrong variable was chosen.
  • Forgetting a compensating constant multiple — for instance if the integrand contains x dxx\,dx but dt=2x dxdt=2x\,dx, a factor of 12\tfrac12 must be inserted to match.
  • Stopping at the answer in terms of tt and forgetting to resubstitute back to xx — an integral must always be reported in the original variable.
  • Applying the ∫f′(x)/f(x) dx→ln⁡∣f(x)∣\int f'(x)/f(x)\,dx\to\ln|f(x)| shortcut when the numerator is only a constant multiple of the derivative of the denominator, not the exact derivative — always verify the derivative relationship before using the shortcut, and adjust with a constant factor if needed.
  • Dropping the modulus sign in ln⁡∣f(x)∣\ln|f(x)|, which matters whenever f(x)f(x) takes negative values anywhere on the interval being integrated over.

Ask the tutor: not sure which substitution to try on an integral like ∫x ex2 dx\int x\,e^{x^2}\,dx, or want your final answer checked by differentiating it back — ask the AI tutor to walk through it with you.

How do I know which part of the integrand to call t?

Look for a function whose derivative appears elsewhere in the integrand, possibly scaled by a constant. If you see x2+1x^2+1 sitting inside a square root and a lone factor of xx (or 2x2x) nearby, that xx is a strong signal because it is the derivative of x2+1x^2+1. Similarly, a denominator paired with something resembling its derivative on top signals the log-form pattern. With practice, spotting this pairing becomes close to instant.

What happens if I choose the wrong substitution?

Nothing dangerous happens — you simply cannot finish. After substituting, if the integral still contains a leftover xx that will not cancel or convert using dtdt, the chosen tt was not the right inner function, or a compensating constant was missed. Try a different tt, most often the innermost function under a root, power, or in a denominator, and check whether its derivative (up to a constant) is visible elsewhere in the integrand.

Why does the log form need the modulus sign but the power form does not?

The natural logarithm ln⁡t\ln t is only defined for t>0t>0, but f(x)f(x) in ∫f′(x)/f(x) dx\int f'(x)/f(x)\,dx can be negative over parts of its domain, so ln⁡∣f(x)∣\ln|f(x)| is needed to keep the antiderivative valid wherever f(x)≠0f(x)\neq0. The power form [f(x)]n+1/(n+1)[f(x)]^{n+1}/(n+1) has no such restriction for most integer or rational nn, since raising a real number to a power is generally still defined even when the base is negative.

Before this

Where this leads