U-substitution in a definite integral: do you change the limits?

7 min read

Short answer Yes, if you finish the integral in uu. The limits of a definite integral are values of xx, so when you substitute u=g(x)u = g(x) they change too: the new limits are g(a)g(a) and g(b)g(b), and the answer comes straight out of the uu-integral. The other correct way is to find the antiderivative, write it back in terms of xx, and use the old limits. What never works is the mix: the new variable with the old limits.

A substitution changes the variable. In an indefinite integral that is the whole story: you integrate in uu, put xx back, and add CC. A definite integral carries two more numbers, the limits, and they belong to the variable too. Forget them and you get a clean, confident, wrong answer.

Why the limits change

In ∫abf(x) dx\displaystyle\int_a^b f(x)\,dx the limits say xx runs from aa to bb. After the substitution u=g(x)u = g(x) the variable is uu, and uu does not run from aa to bb. When x=ax = a, u=g(a)u = g(a); when x=bx = b, u=g(b)u = g(b). Those are the new limits.

Recipe U-substitution with limits.

  1. Choose u=g(x)u = g(x) and work out du=g′(x) dxdu = g'(x)\,dx.
  2. Put each old limit into u=g(x)u = g(x) to get the new ones.
  3. Rewrite the integral entirely in uu, the limits included.
  4. Integrate and put in the new limits. Do not go back to xx.

Example 1: two ways, one answer

Evaluate ∫012x (x2+1)3 dx\displaystyle\int_0^1 2x\,(x^2+1)^3\,dx.

Step 1. The inside of the cube is x2+1x^2 + 1, and its derivative 2x2x stands in front of it.

u=x2+1du=2x dx\begin{aligned} u &= x^2 + 1 \\ du &= 2x\,dx \end{aligned}

Step 2. The new limits come from putting the old ones into u=x2+1u = x^2 + 1.

x=0 ⁣:u=02+1=1x=1 ⁣:u=12+1=2\begin{aligned} x = 0\colon \quad u &= 0^2 + 1 = 1 \\ x = 1\colon \quad u &= 1^2 + 1 = 2 \end{aligned}

Step 3. The whole integral in uu, then the new limits.

∫012x (x2+1)3 dx=∫12u3 du=[u44]12=164−14=154\begin{aligned} \int_0^1 2x\,(x^2+1)^3\,dx &= \int_1^2 u^3\,du \\[6pt] &= \Big[\frac{u^4}{4}\Big]_1^2 \\[6pt] &= \frac{16}{4} - \frac{1}{4} \\[6pt] &= \frac{15}{4} \end{aligned}

The other way. Find the antiderivative first, go back to xx, and use the old limits.

∫2x (x2+1)3 dx=∫u3 du=u44+C=(x2+1)44+C\begin{aligned} \int 2x\,(x^2+1)^3\,dx &= \int u^3\,du \\[6pt] &= \frac{u^4}{4} + C \\[6pt] &= \frac{(x^2+1)^4}{4} + C \end{aligned} ∫012x (x2+1)3 dx=[(x2+1)44]01=164−14=154\begin{aligned} \int_0^1 2x\,(x^2+1)^3\,dx &= \Big[\frac{(x^2+1)^4}{4}\Big]_0^1 \\[6pt] &= \frac{16}{4} - \frac{1}{4} \\[6pt] &= \frac{15}{4} \end{aligned}

The same answer, as it must be. The two integrals measure the same area, reshaped by the substitution:

Two graphs side by side, drawn to the same scale. On the left, the area under y = 2x(x² + 1)³ from x = 0 to x = 1 is shaded. On the right, the area under y = u³ from u = 1 to u = 2 is shaded. Both areas are 15/4. y = 2x(x2 + 1)3 y = u3 0 1 x 0 1 2 u 15/4 15/4 x from 0 to 1 u from 1 to 2
The same area before and after the substitution.

The mix that goes wrong

Careful Substituting and keeping the old limits gives a wrong answer that looks perfectly reasonable.

∫01u3 du=[u44]01=14\int_0^1 u^3\,du = \Big[\frac{u^4}{4}\Big]_0^1 = \frac{1}{4}

That is the area under u3u^3 from u=0u = 0 to u=1u = 1, a region that has nothing to do with the question. The same slip happens in the other order: going back to xx is forgotten, and the limits of xx go into u44\frac{u^4}{4}. Either way, the limits and the variable must belong together.

Example 2: limits that come out upside down

Evaluate ∫0π/2sin⁡x cos⁡2x dx\displaystyle\int_0^{\pi/2} \sin x\,\cos^2 x\,dx.

Step 1. The cosine is squared, and the derivative of the cosine is almost in front of it.

u=cos⁡xdu=−sin⁡x dxsin⁡x dx=−du\begin{aligned} u &= \cos x \\ du &= -\sin x\,dx \\ \sin x\,dx &= -du \end{aligned}

Step 2. The new limits, in the same order as the old ones.

x=0 ⁣:u=cos⁡0=1x=π2 ⁣:u=cos⁡π2=0\begin{aligned} x = 0\colon \quad u &= \cos 0 = 1 \\ x = \tfrac{\pi}{2}\colon \quad u &= \cos\tfrac{\pi}{2} = 0 \end{aligned}

The lower limit is now the larger number. Keep it where it is: the minus sign from dudu will turn it round.

Step 3. The integral in uu.

∫0π/2sin⁡x cos⁡2x dx=∫10u2 (−du)=−∫10u2 du=∫01u2 du=[u33]01=13\begin{aligned} \int_0^{\pi/2} \sin x\,\cos^2 x\,dx &= \int_1^0 u^2\,(-du) \\[6pt] &= -\int_1^0 u^2\,du \\[6pt] &= \int_0^1 u^2\,du \\[6pt] &= \Big[\frac{u^3}{3}\Big]_0^1 \\[6pt] &= \frac{1}{3} \end{aligned}

Swapping the limits changes the sign of an integral, and that is exactly what the minus sign was waiting for. Had the limits been put the “right way up” at the start, the answer would have come out as −13-\frac{1}{3}.

Example 3: a logarithm

Evaluate ∫1eln⁡xx dx\displaystyle\int_1^e \frac{\ln x}{x}\,dx.

Step 1. The derivative of ln⁡x\ln x is 1x\frac{1}{x}, and it is right there.

u=ln⁡xdu=dxx\begin{aligned} u &= \ln x \\ du &= \frac{dx}{x} \end{aligned}

Step 2. The new limits.

x=1 ⁣:u=ln⁡1=0x=e ⁣:u=ln⁡e=1\begin{aligned} x = 1\colon \quad u &= \ln 1 = 0 \\ x = e\colon \quad u &= \ln e = 1 \end{aligned}

Step 3. The integral in uu.

∫1eln⁡xx dx=∫01u du=[u22]01=12\begin{aligned} \int_1^e \frac{\ln x}{x}\,dx &= \int_0^1 u\,du \\[6pt] &= \Big[\frac{u^2}{2}\Big]_0^1 \\[6pt] &= \frac{1}{2} \end{aligned}

Which way to choose

Changing the limits is usually shorter: once the integral is in uu, the answer is a number and there is nothing to translate back. Going back to xx is the better choice when you need the antiderivative anyway, or when the substitution is hard to reverse cleanly into new limits. Both ways are correct, as long as each set of limits stays with its own variable.

Try it

Evaluate each integral with a substitution and new limits, then open the answers.

(a) ∫02x ex2 dx(b) ∫0π/4tan⁡x sec⁡2x dx(c) ∫01xx2+1 dx\text{(a)}\ \int_0^2 x\,e^{x^2}\,dx \qquad \text{(b)}\ \int_0^{\pi/4} \tan x\,\sec^2 x\,dx \qquad \text{(c)}\ \int_0^1 \frac{x}{x^2+1}\,dx
Answers

(a) u=x2u = x^2, du=2x dxdu = 2x\,dx, so x dx=12 dux\,dx = \frac{1}{2}\,du. The limits: x=0x = 0 gives u=0u = 0, and x=2x = 2 gives u=4u = 4.

∫02x ex2 dx=12∫04eu du=12[eu]04=e4−12\int_0^2 x\,e^{x^2}\,dx = \frac{1}{2}\int_0^4 e^u\,du = \frac{1}{2}\Big[e^u\Big]_0^4 = \frac{e^4 - 1}{2}

(b) u=tan⁡xu = \tan x, du=sec⁡2x dxdu = \sec^2 x\,dx. The limits: tan⁡0=0\tan 0 = 0 and tan⁡π4=1\tan\frac{\pi}{4} = 1.

∫0π/4tan⁡x sec⁡2x dx=∫01u du=[u22]01=12\int_0^{\pi/4} \tan x\,\sec^2 x\,dx = \int_0^1 u\,du = \Big[\frac{u^2}{2}\Big]_0^1 = \frac{1}{2}

(c) u=x2+1u = x^2 + 1, du=2x dxdu = 2x\,dx, so x dx=12 dux\,dx = \frac{1}{2}\,du. The limits: x=0x = 0 gives u=1u = 1, and x=1x = 1 gives u=2u = 2.

∫01xx2+1 dx=12∫12duu=12[ln⁡u]12=ln⁡22\int_0^1 \frac{x}{x^2+1}\,dx = \frac{1}{2}\int_1^2 \frac{du}{u} = \frac{1}{2}\Big[\ln u\Big]_1^2 = \frac{\ln 2}{2}

In short

When you substitute in a definite integral, the limits change with the variable: put each old limit into u=g(x)u = g(x), finish in uu, and never go back to xx. Or go back to xx first and keep the old limits. Never the mix. And if the new lower limit comes out larger, leave it where it is.

The chapter on the definite integral in the study guide below works through substitution with limits, integration by parts with limits, and the areas and volumes they measure. The part on trigonometric integrals is one of the parts you can get free by email.

Frequently asked questions

Do you change the limits in u-substitution?

Yes, if you finish the integral in uu: the new limits are the values of uu at the old ones. If you go back to xx before putting the limits in, you keep the original limits instead.

How do you find the new limits?

Put each old limit into the substitution. With u=x2+1u = x^2 + 1 and limits 00 and 11, the new limits are 02+1=10^2 + 1 = 1 and 12+1=21^2 + 1 = 2.

What if the new lower limit is bigger than the upper one?

Leave the limits in that order. An integral with its limits swapped is the negative of the original, ∫ba=−∫ab\int_b^a = -\int_a^b, and a minus sign from dudu usually turns it back.

Do you add + C to a definite integral?

No. The constant would cancel when you subtract the value at the lower limit from the value at the upper limit, so a definite integral is just a number.

Can I skip changing the limits?

Yes, if you write the antiderivative back in terms of xx before putting in the limits. What you cannot do is integrate in uu and then use the limits of xx.

  • u substitution
  • definite integral
  • changing the limits
  • integration by substitution

← All lessons

Free download

The trigonometry formula sheet

Every trigonometry formula on nine printable pages: exact values, the reduction rules, every identity, and a full-page unit circle chart. No sign-up, just the PDF.

Download the PDF