MathAnalysisCalculusIntegrals

U-substitution

13 minutes read

We've already learned about finding direct antiderivatives to common functions. However, integrands seldom consist of pure unadulterated functions in this manner. In this topic, we will take a look at the relationship between the chain rule and the integration of composite functions. Moreover, we'll learn about a technique used to reshape and simplify these integrands into expressions that have known direct antiderivatives.

Integration of composite functions

Let's consider the following derivative

ddxf(g(x))\frac{d}{dx} f(g(x))Using the chain rule, we know that

ddxf(g(x))=ddgf(x)ddxg(x)\frac{d}{dx} f(g(x)) = \frac{d}{dg} f(x) \cdot \frac{d}{dx} g(x)Thus, the following must be true

ddgf(x)ddxg(x)dx=f(g(x))+C\int \frac{d}{dg} f(x) \cdot \frac{d}{dx} g(x) dx = f(g(x)) + CAs an example, let's consider the following integral:

tan(x)dx\int \tan(x) dx First, let's recall that

tan(x)=sin(x)cos(x)\tan(x) = \frac{\sin(x)}{\cos(x)}Then, we can rewrite our original integral as

1cos(x)sin(x)dx\int \frac{1}{\cos(x)} \cdot \sin(x) dxLet's also recall the antiderivative of 1x\frac{1}{x},

ddxln(x)=1x    1xdx=lnx+C\frac{d}{dx} \ln(x) = \frac{1}{x} \implies \int \frac{1}{x} dx = \ln|x| + CWe can generalize the argument of the logarithm as g(x)g(x), and apply the chain rule as follows

ddxln(g(x))=1g(x)ddxg(x)    1g(x)g(x)dx=lng(x)+C\frac{d}{dx} \ln(g(x)) = \frac{1}{g(x)} \cdot\frac{d}{dx} g(x) \implies \int \frac{1}{g(x)} \cdot g'(x) dx = \ln|g(x)| + CThen, if we define

g(x)=cos(x)g(x) = \cos(x)we'll have the following

1cos(x)(cos(x))dx=lncos(x)+C1cos(x)sin(x)dx=lncos(x)+C\int \frac{1}{\cos(x)} \cdot (\cos(x))' dx = \ln|\cos(x)| + C \Rightarrow -\int \frac{1}{\cos(x)} \cdot \sin(x) dx = -\ln|\cos(x)| + COr, in other words

tan(x)dx=lncos(x)+C\int \tan(x) dx = -\ln|\cos(x)| + C

U-substitution

In the previous example, while trying to solve the integral tan(x)dx\int \tan(x) dx, we were able to integrate the following composite function by applying the chain rule:

f(g(x))=1cos(x);f(x)=1x and g(x)=cos(x)f(g(x)) = \frac{1}{\cos(x)} \quad ; \quad f(x)=\frac{1}{x} \text{ and } g(x) = \cos(x)since we knew the derivative of the inner function g(x)=sin(x)g'(x) = -\sin(x) was the remaining factor of the integrand.

In order to find the right combination of factors to fit this reverse chain rule process, a technique called u-substitution (or also integration by change of variables) is often employed. Let's take a look at how it works with another example:

I=2x3x2+5 dxI=\int 2x \cdot 3^{x^2+5} \ dxHere, II is a placeholder for the antiderivative resulting from solving the integral.

Let's define the following substitution:

u=x2+5u = x^2 + 5We can differentiate both sides to obtain

ddxu=ddx(x2+5)    dudx=2x    du=2xdx\frac{d}{dx}u = \frac{d}{dx}(x^2 + 5) \implies \frac{du}{dx} = 2x \implies du = 2xdxSubstituting our new expressions in the original integral,

I=2x3x2+5 dx=3x2+52x dxI=3udu\begin{align*} I &= \int 2x \cdot 3^{x^2+5} \ dx = \int 3^{x^2+5} \cdot 2x \ dx \\ I &= \int 3^u du \end{align*}Now, we already know the direct antiderivative of that expression!

3udu=3uln(3)+C\int 3^u du = \frac{3^u}{\ln(3)} + CAll we need to do now is substitute back our expression for uu to find the solution of the original integral:

I=3(x2+5)ln(3)+CI = \frac{3^{(x^2 + 5)}}{\ln(3)} + C

It is important to clarify that dudx\frac{du}{dx} is NOT a fraction. Even though it appears as if we are multiplying by dxdx freely on both sides, in reality, this only works because we are following the process of integration by reversing the chain rule and, in general, du=u(x)dxdu = u'(x)dx is true for single-variable differential forms (more information).

Let's try u-substitution with the same example from the previous section:

I=tan(x)dx=sin(x)cos(x)dxI=\int \tan(x) dx = \int \frac{\sin(x)}{\cos(x)}dxLet's define uu,

u=cos(x)u = \cos(x)And find dudu

ddxu=ddxcos(x)    dudx=sin(x)    du=sin(x)dx    du=sin(x)dx\frac{d}{dx} u = \frac{d}{dx}\cos(x) \implies \frac{du}{dx} = -\sin(x) \implies du = -\sin(x)dx \implies -du = \sin(x)dx

Then, we have

I=1uduI = -\int \frac{1}{u}duWe already know how to solve that integral:

I=1udu=lnu+CI=-\int \frac{1}{u}du = -\ln|u|+CNow, we reverse the change of variables u=cos(x)u=\cos(x)

I=lncos(x)+CI= -\ln|\cos(x)|+CFinally,

tan(x)dx=lncos(x)+C\int \tan(x) dx = -\ln|\cos(x)|+C

U-substitution: integral of the secant function

We can use uu-substitution to find the antiderivative for the secant function:

I=sec(x)dxI =\int \sec(x) dxFirst, let's recall a couple of derivatives:

ddxsec(x)=sec(x)tan(x)ddxtan(x)=sec2(x)}    ddx(sec(x)+tan(x))=sec(x)(tan(x)+sec(x))\begin{rcases} &\frac{d}{dx} \sec(x) = \sec(x) \cdot\tan(x) \\ &\frac{d}{dx} \tan(x) = \sec^2(x) \end{rcases} \implies \frac{d}{dx} \left(\sec(x) + \tan(x) \right) = \sec(x) \cdot \left( \tan(x) + \sec(x) \right)With this knowledge, let's manipulate our integrand by multiplying and dividing by (tan(x)+sec(x))\left( \tan(x) + \sec(x) \right), like so

sec(x) dx=sec(x)(tan(x)+sec(x)tan(x)+sec(x))dx\int \sec(x) \ dx = \int \sec(x) \cdot \left( \frac{\tan(x) + \sec(x)}{\tan(x) + \sec(x)} \right) dxNow, we can define uu

u=tan(x)+sec(x)    du=sec(x)(tan(x)+sec(x)) dxu = \tan(x) + \sec(x) \implies du = \sec(x) \cdot \left( \tan(x) + \sec(x) \right) \ dxSubstituting in,

I=sec(x)(tan(x)+sec(x)tan(x)+sec(x))dx    I=1u duI = \int \sec(x) \cdot \left( \frac{\tan(x) + \sec(x)}{\tan(x) + \sec(x)} \right) dx \implies I = \int \frac{1}{u} \ duWe already know the antiderivative for this integral,

I=1u du=lnu+CI = \int \frac{1}{u} \ du = \ln|u| + CSo, we only need to reverse our change of variables

I=lnu+C    I=lntan(x)+sec(x)+CI = \ln|u| + C \implies I = \ln|\tan(x) + \sec(x) | +CFinally,

sec(x)dx=lntan(x)+sec(x)+C\int \sec(x) dx = \ln|\tan(x) + \sec(x) | +C

U-substitution: another example

Let's consider the following integral

I=1(x+1)x dxI =\int \frac{1}{(x+1) \cdot x} \ dx

We can perform some algebraic manipulation to break down this integral before doing any change of variables,

I=1(x1)x dx=xx+1(x1)x dx=x+x1(x1)x dxI=(x(x1)x dx+x1(x1)x dx)I=1x1 dx1x dx\begin{align*} I &= \int \frac{1}{(x - 1) \cdot x} \ dx = \int \frac{x-x+1}{(x - 1) \cdot x} \ dx = -\int \frac{-x + x -1}{(x -1) \cdot x} \ dx \\ I &= - \left( \int \frac{-x}{(x - 1) \cdot x} \ dx + \int \frac{x-1}{(x - 1) \cdot x} \ dx \right) \\ I &= \int \frac{1}{x - 1} \ dx - \int \frac{1}{x} \ dx \end{align*}Or, in other words

I=I1+I2; with I1=1x1 dx and I2=1x dxI = I_1 + I_2 \quad ; \text{ with } I_1 =\int \frac{1}{x - 1} \ dx \text{ and } I_2 =- \int \frac{1}{x} \ dx

We know I2I_2 has a direct antiderivative,

I2=lnx+CI_2 = - \ln|x| +CSo, let's perform a uu-substitution on I1I_1 to find its antiderivative:

u=x1    ddxu=ddx(x1)du=1dxdu=dx\begin{align*} u = x-1 \implies \frac{d}{dx}u &= \frac{d}{dx}(x-1) \\ du &= 1 \cdot dx \\ du &= dx \end{align*}Then,

I1=1x1 dx=1u du=lnu+CI_1 = \int \frac{1}{x-1} \ dx = \int \frac{1}{u} \ du = \ln|u| + CReversing the change of variables,

I1=lnu+C    I1=lnx1+CI_1 = \ln|u| + C \implies I_1 = \ln|x-1| + CThus,

I=lnx1lnx+CI =\ln|x-1| - \ln|x| + C

Two approaches to the u-substitution method

Let's consider the following integral

I=1ex+1dxI = \int \frac{1}{e^x + 1} dxThere are two ways to approach a change of variables: either to define the uu-substitution and differentiate implicitly to find dudu, or to define the uu-substitution, solve for xx and then differentiate. Let's take a look at both.

First approach: differentiate implicitly to find dudu

Let's start by defining the uu-substitution:

u=ex+1u = e^x + 1Now, let's define dudu:

ddxu=ddx(ex+1)    du=exdx\frac{d}{dx} u = \frac{d}{dx} (e^x +1) \implies du = e^x dx

In this case, we can see the expression exdxe^x dx does not appear anywhere in the original integral. To change this, let's multiply and divide the original integrand by exe^x:

I=exex1ex+1dx=exex(ex+1) dxI = \int \frac{e^x}{e^x} \cdot \frac{1}{e^x + 1} dx = \int \frac{e^x}{e^x \cdot (e^x + 1)} \ dxNow, because u=ex+1u = e^x + 1, then

ex=u1e^x = u - 1

Substituting in our new expressions,I=exex(ex+1) dx=1(u1)u duI = \int \frac{e^x}{e^x \cdot (e^x + 1)} \ dx = \int \frac{1}{(u - 1) \cdot u} \ duWe already know the solution for this integral from the previous section:

I=lnu1lnu+CI =\ln|u-1| - \ln|u| + CSo, we just perform the change of variables back to obtain

I=ln(ex)ln(ex+1)+CI =\ln(e^x) - \ln(e^x+1) + C

Second approach: solve for xx and then differentiate

First, let's define the uu-substitution:

u=ex+1u = e^x + 1Now, let's solve for xx,

x=ln(u1)x = \ln(u -1)Differentiate both sides to find dxdx,

ddux=dduln(u1)    dxdu=1u1    dx=1u1 du\frac{d}{du} x = \frac{d}{du}\ln(u-1) \implies \frac{dx}{du} =\frac{1}{u -1} \implies dx = \frac{1}{u -1} \ duSubstituting both xx and dxdx in the original integral,

I=1ex+1dx    I=1u1u1 du=1u(u1) duI = \int \frac{1}{e^x + 1} dx \implies I = \int \frac{1}{u} \cdot \frac{1}{u - 1} \ du = \int \frac{1}{u \cdot (u - 1)} \ duWhich is the same integral as before. Then,

I=1u(u1)dx=lnu1lnu+CI = \int \frac{1}{u \cdot (u - 1)} dx = \ln|u-1| - \ln|u| + CAnd,

I=ln(ex)ln(ex+1)+CI = \ln(e^x) - \ln(e^x + 1) + C

Change of variables: yet another example

I=54+x+3 dxI=\int \frac{5}{4+\sqrt{x+3}} \ dxLet's define the following substitution:

u=x+3u = \sqrt{x+3}Solving for xx,

x=u23x=u^2 -3Differentiating both sides to find dxdx,

dxdu=ddu(u23)    dxdu=2u    dx=2u du\frac{dx}{du} = \frac{d}{du} (u^2-3) \implies \frac{dx}{du} = 2u \implies dx = 2u \ du

Substitute our new expressions for xx and dxdx in the original integral,

I=54+u2u duI = \int \frac{5}{4+u} \cdot 2u \ du

Here, we need to perform yet another change of variables. Let's use the symbol vv for this one

v=4+uv = 4 + uThen,

dduv=ddu(4+u)    dv=du\frac{d}{du}v = \frac{d}{du} (4+u) \implies dv = duAnd so,

I=54+u2u du    I=5v2(v4) dvI = \int \frac{5}{4+u} \cdot 2u \ du \implies I = \int \frac{5}{v} \cdot 2(v-4) \ dvRearranging and taking constants out of the integral,

I=10v4v dv=10(dv41v dv)I = 10 \cdot \int \frac{v-4}{v} \ dv = 10 \cdot \left( \int dv - 4 \int \frac{1}{v} \ dv \right)We are left with two integrals with direct antiderivatives:

I=10dv401v dv=10v40lnv+CI = 10 \int dv - 40 \int \frac{1}{v} \ dv = 10 v - 40\ln|v| +CFinally, we reverse all the changes of the variable from the last one to the first one:

I=10v40lnv+C    I=10(4+u)40ln4+u+C    10(4+x+3)40ln4+x+3+CI = 10 v - 40\ln|v| +C \implies I = 10 \cdot (4 + u) - 40 \ln|4+u| +C \implies 10 \cdot (4 + \sqrt{x+3}) - 40 \ln\left|4+ \sqrt{x+3}\right| +CThus,

54+x+3 dx=40+10x+340ln4+x+3+C\int \frac{5}{4+\sqrt{x+3}} \ dx = 40 + 10\sqrt{x+3} - 40 \ln \left|4+\sqrt{x+3} \right| +C

Common pitfalls of u-substitution

When defining uu we choose an expression that is a part of the original integrand. The resulting integral, after substituting both uu and dudumust be easier to solve than the original one; in fact, ideally it should be an integral with a direct antiderivative. If the resulting integral is more difficult to solve than the original one, you might want to redefine uu and try again.

Remember that the antiderivative of a composite function is not just the antiderivative of the outer-most function. Not taking into account the remaining factors when defining uu can lead to unexpected results. It is always good to remember that uu-substitution is all about reversing the chain rule. So the choice of factors that define uu must be such that the new integrands are of the form: f(u)uduf(u) \cdot u' du

For example, let's consider the following integral

I=e3x2+2(2x) dxI=\int e^{3x^2+2} \cdot (2x) \ dx

We might be tempted to define uu as follows

u=2x    x=12u    dx=12duu = 2x \implies x = \frac{1}{2} u \implies dx = \frac{1}{2} duBut then, we'll have

I=12e34u2+2u duI=\frac{1}{2}\int e^{\frac{3}{4}u^2+2} \cdot u \ duWhich is hardly a simpler integral.

However, if we remember that

ddx(3x2+2)=6x dx\frac{d}{dx} (3x^2+2) = 6x \ dxWe know we have a similar factor in the same integrand.

Thus, if instead, we define uu as

u=3x2+2    du=6x dxu = 3x^2 +2 \implies du = 6x \ dxWe'll have

I=13eu duI =\frac{1}{3}\int e^u \ duWhich is a much simpler integral to solve!

Conclusion

In this topic we have learned:

  • Integrals that have composite functions as antiderivatives can be solved by applying the chain rule in reverse.
  • The uu-substitution technique can help us with this process by simplifying more complicated expressions into simpler ones, usually with direct antiderivatives.
  • The uu-substitution technique can be applied as many times as necessary, as long as all the changes of variable are reversed.
  • There are two approaches after having defined the uu-substitution itself: differentiate implicitly to find dudu, or solve for xx and then differentiate to find dxdx.

In addition, we've learned the rule to determine the antiderivative for the secant function:

f(x)=sec(x)    sec(x)dx=lntan(x)+sec(x)+Cf(x) = \sec(x) \implies\int \sec(x) dx = \ln|\tan(x) + \sec(x) | +C

3 learners liked this piece of theory. 0 didn't like it. What about you?
Report a typo