Integration by substitution

By Martin McBride, 2023-12-08
Tags: integration by substitution chain rule
Categories: integration calculus


Integration by substitution is a method that can be used to find definite and indefinite integrals. It can be used to evaluate integrals that match a particular pattern, that would be difficult to evaluate by any other method.

It is related to the chain rule in differentiation. Integration by substitution can be thought of as the reverse process of differentiating using the chain rule. Many of the standard patterns we look for when trying to apply substitution were originally derived from the chain rule.

This method is sometimes called integration by change of variables. It is also sometimes called u-substitution because the new variable is traditionally called u.

Simple example of substitution

As a simple example, we will evaluate this indefinite integral:

Exponential integral

It might not be immediately obvious how to solve this, but we can simplify the integral by expressing it in terms of a new variable, u, given by:

Exponential integral

We will see later how we might guess this substitution. It will also be useful to know the value for du in terms of dx. This can be found quite easily by differentiating the expression for u:

Exponential integral

Now let's rearrange the integral from above:

Exponential integral

We have just swapped the terms and introduced a factor of 3 into the x squared term, dividing the integral by 3 to cancel it out. This means that the two terms in the integral both look very simple in terms of u:

Exponential integral

Substituting these terms into the integral gives:

Exponential integral

This is now straightforward to integrate:

Exponential integral

All we need to do now is substitute for u to obtain the integral in terms of x:

Exponential integral

This graph shows the original function on the left and its indefinite integral (with C = 0) on the right. The right-hand graph looks plausible as a representation of the area under the left-hand curve.

Exponential integral

Checking the result

As a double-check, we can differentiate the result above. We should get back to the original expression. Here is the integral:

Exponential derivative

This is a function of a function (it is the exponential of the cube of x), so we must apply the chain rule:

Exponential derivative

Here are f and g in this example:

Exponential derivative

And here are their derivatives:

Exponential derivative

Plugging these values into the chain rule formula gives this:

Exponential derivative

Rearranging and cancelling the 3 top and bottom gives:

Exponential derivative

Not only does this verify that integration by substitution works in this case, but it also gives us some insight into why it works. The expression to be integrated looks like the result of a chain rule differentiation. That is to say, it is the product of two terms. One term is a function of a function, f(g(x)). The other term is the derivative of the inner term, g'(x). Whenever we see something of that form, it might be a candidate for the change of variable approach.

Variable substitution for definite integral

Next, we will look at a definite integral. We will look at the cotangent function:

Cotangent integral

At first, this might not seem to fit the pattern, but we can use:

Cotangent integral

As before, we use the substitution u equal to the inner function, g(x):

Cotangent integral

This allows us to find du in terms of dx:

Cotangent integral

So our integral now becomes:

Cotangent integral

Here, as before, we have arranged the original integrand to separate out the du term. Notice also that we have to express the limits of the integral in terms of u rather than x. When x is equal to a, u is equal to sin a. We can now evaluate the definite integral without having to substitute u with x:

Cotangent integral

This uses the standard result that the integral of 1/x is the log of the modulus of x. If we wanted to find the indefinite integral of the cotangent we would have to substitute u as before:

Cotangent integral

This graph shows the cotangent function (on the left), with the area under the curve between π/6 and π/3 shaded:

Cotangent integral

The indefinite integral of this function is shown on the right, with a value of C chosen such that the curve is 0 when x is π/6. Therefore, the value of the curve when x is π/3 should represent the shaded area. This value is slightly over 0.5. The shaded area has a width of about 0.5 and an average height of about 1, so again it looks plausible that its area would be about 0.5.

General case

In the general case, we are trying to integrate a function of the form:

General case

We will assume that we know the indefinite integral of f(x), which we will call F(x).

For definite integrals, the general case is:

General case

For indefinite integrals, the general case is:

General case

Proof

We have already seen all the elements of the proof of integration by substitution, but we will finish by bringing them all together. We will look at the definite integral, the indefinite case has a similar proof. We aim to prove that the following 2 integrals are equal:

Proof

We will, again, use F(x) to represent the indefinite integral of f(x). We can apply the chain rule to F composed with g like this:

Proof

Since F is the indefinite integral of f, the derivative of F is simply f. So we can replace F' with f:

Proof

The RHS happens to be the exact thing we are trying to integrate. Swapping left and right and taking the definite integral of both sides gives:

Proof

Notice that on the RHS we are integrating the derivative of F. This is just F (by the fundamental theorem of calculus):

Proof

Now we will use u to represent g(x) (changing the limits too):

Proof

Since F is the integral of f, we can write this as:

Proof

Which proves the formula for integration by substitution.

See also



Join the GraphicMaths Newletter

Sign up using this form to receive an email when new content is added:

Popular tags

adder adjacency matrix alu and gate angle area argand diagram binary maths cartesian equation chain rule chord circle cofactor combinations complex polygon complex power complex root cosh cosine cosine rule cpu cube decagon demorgans law derivative determinant diagonal directrix dodecagon ellipse equilateral triangle eulers formula exponent exponential exterior angle first principles flip-flop focus gabriels horn gradient graph hendecagon heptagon hexagon horizontal hyperbola hyperbolic function infinity integration by substitution interior angle inverse hyperbolic function inverse matrix irregular polygon isosceles trapezium isosceles triangle kite koch curve l system locus maclaurin series major axis matrix matrix algebra minor axis nand gate newton raphson method nonagon nor gate normal not gate octagon or gate parabola parallelogram parametric equation pentagon perimeter permutations polar coordinates polynomial power probability probability distribution product rule pythagoras proof quadrilateral radians radius rectangle regular polygon rhombus root set set-reset flip-flop sine sine rule sinh sloping lines solving equations solving triangles square standard curves star polygon straight line graphs surface of revolution symmetry tangent tanh transformations trapezium triangle turtle graphics vertical volume of revolution xnor gate xor gate