When working with integrals, you’ll frequently encounter integrals that appear to be the result of applying the chain rule. Substitution (also known as u-substitution) is a technique that can be used to solve these integrals. In this step by step guide to solving integrals using substitution, I will walk you through how to use substitution.

Please check out my Substitution Rule Infographic for a visual representation of this method.

You must know how to solve integrals using algebraic manipulations to apply substitution. To learn how to do this, please check out my article: Basic Integration Problems for Beginners.

What is the Substitution Rule?

The substitution rule is a method for simplifying integrals. It involves introducing a new variable (typically called u) to replace a more complicated part of the integral. Once we make the substitution, we can solve the integral using other integration methods.

When to Use the Substitution Rule

The substitution rule is beneficial when you notice a composite function where one function is inside another, and the inside function’s derivative (up to a multiplicative constant) also appears. For example, you might see something like \( 2xe^{x^2} \) or \( x^2\sin{x^3} \).

These integrals often have integrands that appear to result from applying the chain rule to a function, which is a good sign that substitution might help.

How to Use the Substitution Rule

Here are the steps to apply the substitution rule:

Step 1: Choosing the Substitution

The first thing you need to do is pick what you want to substitute for u. Usually, this will be the part of the integral inside another function or something that, when replaced, makes the integral simpler.

If you’re unsure where to start, try something and see if it works. Problem-solving generally requires trial and error. If you make the wrong decision, you can always go back and try something else.

Step 2: Finding the differential.

Once you’ve chosen your substitution, the next step is to find its differential given by \( du = f'(x)dx \). Often, the differential won’t match up with exactly what’s in the integral, but as long as it matches up to a multiplicative constant, no worries, just multiply both sides of the differential by a suitable constant.

If you need help with the derivative, please check out my guide on how to differentiate a function step by step.

Step 3: Substituting into the Integral

Now that you have your substitution and its differential, you can rewrite the original integral in terms of u.

Step 4: Integrating with Respect to the New Variable

Now that the integral is in terms of u, you can solve it using other integration techniques.

Step 5: Reversing the Substitution

Once you’ve computed the integral, you must switch back to the original variable x by substituting for u.

Worked Out Examples

We now work through several examples using the substitution rule. Our first example illustrates the procedure.

Example 1: Use a substitution to solve the following integrals.

(a) \( \int 2xe^{x^2} dx \)

Solution: Let \( u = x^2 \). Computing the differential gives

$$u = 2x \, dx.$$

Substituting these into the integral, we arrive at

$$\int e^u \, du.$$

Integrating this expression, we obtain

$$e^u + C,$$

or in terms of x we have

$$e^{x^2} + C.$$

(b) \( \int x^2\sin{(x^3)} dx \)

Solution: Letting \( u = x^3 \) and calculating the differential we find

$$du = 3x^2 \, dx.$$

Multiplying both sides by \( \frac{1}{3} \) gives us

$$\frac{1}{3}du = x^2 \, dx.$$

Rewriting the integral in terms of u, we obtain

$$\frac{1}{3} \int \sin(u) \, du.$$

Integrating, we arrive at

$$- \frac{1}{3} \cos(u) + C,$$

which is

$$-\frac{1}{3} \cos(x^3) + C.$$

The following example shows that algebraic manipulation or a trigonometric identity is sometimes needed before the opportunity to use a substitution presents itself.

Example 2: Compute the integrals:

(a) \( \int e^{x + e^x} dx \)

Solution: Using exponent rules, we see this is equivalent to

$$\int e^xe^{e^x} dx.$$

Letting \( u = e^x \), the differential is \( du = e^xdx \). With these substitutions, the integral becomes

$$\int e^u du.$$

Integrating, we obtain

$$e^u + C.$$

Substituting in for u, we arrive at

$$e^{e^x} + C.$$

(b) \( \int \tan{x} dx \)

Solution: Use the quotient identity for tangent to get

$$\int \frac{\sin{x}}{​\cos{x}}dx.$$

Let \( u = \cos{x} \) then the differential is

$$du = -\sin{x}dx.$$

Multiplying both sides by -1, we get

$$-du = \sin{x} dx.$$

Making the substitutions yields

$$\int -\frac{1}{u}du.$$​

Integrating gives

$$-\ln{|u|} + C,$$

Which is equivalent to

$$-\ln{|\cos{x}|} + C.$$

Lastly, we simplify using logarithmic, exponential, and trigonometric identities:

$$\ln{|\cos{x}|^{-1}} + C$$

$$\ln{|\frac{1}{\cos{x}}|} + C$$

$$\ln{|\sec{x}|} + C.$$

(c) \( \int \sec{x} dx \)

Solution: Multiply and divide by \( \sec{x} + \tan{x} \):

$$\int \frac{\sec{x} (\sec{x} + \tan{x})}{\sec{x} + \tan{x}} \, dx.$$

Upon distributing, we get

$$\int \frac{(\sec{x} \tan{x} + \sec^2{x})}{\sec{x} + \tan{x}} dx.$$

Let \( u = \sec{x} + \tan{x} \) then the differential is

$$ du = \sec{x} \tan{x} + \sec^2{x} \, dx$$

Substituting into the integral gives

$$ \int \frac{1}{u} du.$$

Lastly, we integrate and back substitute to arrive at

$$\ln{|u|} + C$$

$$\ln{|\sec{x} + \tan{x}|} + C.$$

Next, we give an example where we have to solve our substitution for x to get everything written in terms of u.

Example 3: Evaluate \( \int x\sqrt{x-1} dx \).

Solution: Let \( u = x – 1 \). Adding 1 to both sides gives

$$u + 1 = x.$$

Next, we compute the differential to obtain \( du = dx \). Now, we substitute these into the integral to arrive at

$$ \int (u+1)\sqrt{u} du.$$

Rewriting the root in terms of a fractional exponent, we find

$$ \int (u+1)u^{\frac{1}{2}} du.$$

Now, we use the distributive property to get

$$ \int uu^{\frac{1}{2}} + u^{\frac{1}{2}} du.$$

Simplifying using exponent rules gives

$$\int u^{\frac{3}{2}} + u^{\frac{1}{2}} du.$$

Integrating, we arrive at

$$\frac{2}{5}u^{\frac{5}{2}} + \frac{2}{3}u^{\frac{3}{2}} + C. $$

In terms of square roots, this is

$$\frac{2}{5}\sqrt{u^5} + \frac{2}{3}\sqrt{u^3} + C,$$

Or in terms of x

$$\frac{2}{5}\sqrt{(x – 1)^5} + \frac{2}{3}\sqrt{(x -1)^3} + C.$$

Lastly, let’s see what to do when we have a sum of functions.

Example 4: Find the antiderivatives.

(a) \( \int e^{2x} + 2\sec^2{(2x)} dx \)

Solution: Both integrals require the same substitution, namely \( u = 2x \), so there is no need to split it into two. The differential is \( du = 2dx \). Dividing both sides of the differential by 2 gives \( \frac{1}{2}du =dx \). Substituting into the integral, we obtain

$$\frac{1}{2} \int e^u + 2\sec^2{u} du.$$

Integrating and simplifying, we arrive at

$$\frac{1}{2}(e^u + 2\tan{u}) + C$$

$$\frac{1}{2}e^u + \tan{u} + C.$$

Which is equivalent to

$$\frac{1}{2}e^{2x} + \tan{(2x)} + C.$$

(b) \( \int \frac{1}{x} – \frac{1}{(x+1)^2} dx \)

The first function is one of the standard functions we know how to integrate. The second, however, requires a substitution to solve, so we write the integral as a sum of two integrals using linearity:

$$\int \frac{1}{x}dx – \int \frac{1}{(x+1)^2} dx.$$

In the second integral, let \( u = x + 1 \), then the differential is \( du = dx \). Substituting into the second integral, we obtain

$$\int \frac{1}{x}dx – \int \frac{1}{u^2} dx.$$

Rewriting the second integral in terms of negative exponents gives us

$$\int \frac{1}{x}dx – \int u^{-2} dx.$$

Integrating, we arrive at

$$\ln{|x|} + u^{-1} + C,$$

Or in terms of positive exponents

$$\ln{|x|} + \frac{1}{u} + C,$$

Back substituting, we get

$$\ln{|x|} + \frac{1}{x + 1} + C.$$

(c) \( \int \frac{\ln{x}}{x} + 2xe^{x^2 + 1} dx \)

Solution: Both functions require a different substitution, so we begin by applying linearity to split it into two integrals

$$\int \frac{\ln{x}}{x}dx + \int 2xe^{x^2 + 1} dx.$$

For the first integral, let \( u = \ln{x} \), then \( du = \frac{1}{x} \). Similarly, for the second integral, let \( v = x^2 + 1 \), then \( dv = 2xdx \). By making these substitutions, we obtain

$$\int u du + \int e^v dv.$$

Now, we integrate to get

$$\frac{1}{2}u^2 + e^v + C.$$

Finally, we substitute u and v to get our expression in terms of x:

$$\frac{1}{2}\ln^2{x} + e^{x^2 + 1} + C.$$

Definite Integrals and Substitution

If you’re working with definite integrals (those that have limits), there’s one more thing you need to do. When making the substation, you’ll need to change the limits of integration to match the new variable.

For our last example, we demonstrate how to use the substitution rule to evaluate a definite integral.

Example 5: Calculate \( \int_0^{\sqrt{\pi}} 2x\cos{x^2} dx \).

Solution: Let \( u = x^2 \), then \( du = 2xdx \). Next, we calculate the new limits to get \( 0^2 = 0 \) and \( \sqrt{\pi}^2 = \pi \). Hence,

$$\int_0^{\pi} \cos{u} du$$

Integrating gives us

$$\sin{u}|_0^{\pi}$$

Applying the Fundamental Theorem of Calculus, we arrive at

$$\sin{\pi} – \sin{0}$$

$$1 – 0$$

$$1$$

Conclusion

The substitution rule is a frequently used technique for solving integrals. Once you master the method, it becomes a powerful tool to simplify integrals.

Frequently Asked Questions

Use substitution when you see a function and its derivative within the integral. For example, if the integrand has the form \( f(g(x))g'(x) \) substitution is a good strategy.

No, substitution works best for integrals that resemble the derivative of a composite function. If substitution doesn’t work, other methods such as integration by parts, partial fractions, or trigonometric identities might be necessary.