Online Textbook Practice Tests 1500 Calculus Problems Solved About

4.4: Integration by Substitution

In Section 2.4 we differentiated composite functions. We now learn to integrate composite functions, which requires a variable change using a substitution. At the end of this section, you'll build your pattern recognition and be able to compute simple substitutions in your head. We discuss the following topics:

Substitution Rule

The theme of the Integration chapter has been learning to go backward. The Chain Rule states that, for differentiable functions \(F\) and \(g,\) \begin{equation} \deriv{}{x} [F(g(x))] = F'(g(x)) \, g'(x) \pd \label{eq:chain-rule} \end{equation} Now let's discuss a strategy to transform \(F'(g(x)) \, g'(x)\) back to the composite function \(F(g(x)).\) Consider \begin{equation} \int F'(g(x)) \, g'(x) \di x \pd \label{eq:composite-integral} \end{equation} We know, from \(\eqref{eq:chain-rule},\) that this integral equals \(F(g(x)) + C.\) But we need to map the integral to this answer; we need to determine a procedure to allow antidifferentiation. We convert the integral into a simpler form by performing a substitution: Let \(u = g(x).\) Differentiating both sides of this equality gives \[\deriv{u}{x} = g'(x) \or \di u = g'(x) \di x \pd\] If we compare these components to \(\eqref{eq:composite-integral},\) then we see \[ \int F'(\underbrace{g(x)}_{u}) \, \underbrace{g'(x) \di x}_{\di u} = \int F'(u) \di u = F(u) + C \pd \] This substitution gave the much easier integral \(\int F'(u) \di u.\) Since \(u = g(x),\) reexpressing the answer in terms of \(x\) gives \[F(g(x)) + C \pd\] This procedure, called a \(\bf u\)-substitution (or using the Substitution Rule), enabled us to convert the integral in \(\eqref{eq:composite-integral}\) to the antiderivative \(F(g(x)) + C.\) Or if \(F' = f,\) then we can write the Substitution Rule as \begin{equation} \int f(g(x)) \, g'(x) \di x = \int f(u) \di u \label{eq:u-sub-f} \end{equation} if \(u = g(x).\)

Our strategy in integrating composite functions, therefore, is to let \(u\) be the inner function. The integrand should contain the derivative of the inner function; we then change the entire integral to be in terms of \(u,\) including the differential. This transformation gives us an easier integral. The full Substitution Rule is as follows.

THE SUBSTITUTION RULE
Let \(g\) be a differentiable function whose range is an interval \(I,\) and let \(f\) be continuous over \(I.\) To evaluate the integral \(\int f(g(x)) \, g'(x) \di x,\) substitute \(u = g(x).\) Then \(\di u = g'(x) \di x,\) and \[ \int f(g(x)) \, g'(x) \di x = \int f(u) \di u \pd \tag*{\(\eqref{eq:u-sub-f}\)} \]
EXAMPLE 1
\[\int 2x \cos(x^2) \di x \]
In the composite function \(\cos(x^2),\) the inner function is \(x^2.\) Its derivative is \(2x,\) which is in the integrand. Or, by analogy to \(\eqref{eq:u-sub-f},\) we have \(f(g(x)) = \cos(x^2)\) and \(g'(x) = 2x.\) Thus, it is useful to perform a \(u\)-substitution with \(u = x^2.\) Then \(\dd u = 2x \di x.\) We have \[\int \cos\underbrace{(x^2)}_u \underbrace{(2x) \di x}_{\dd u} = \int \cos u \di u = \sin u + C \cma\] where \(C\) is an arbitrary constant. This substitution transforms \(\int 2x \cos(x^2) \di x\) to \(\int \cos u \di u,\) an easier integral for which we readily identify the answer \(\sin u + C.\) Finally, we convert back in terms of \(x.\) Since we chose \(u = x^2,\) our answer becomes \[\boxed{\sin(x^2) + C}\] Our answer is correct because differentiating this function gives \(2x \cos(x^2),\) which is our integrand.

When we perform a \(u\)-substitution, all quantities in the integral must be expressed in terms of \(u.\) No \(x\)-terms should remain; they must be converted to \(u.\) Think of the new integral as being in the \(u\)-world, since we perform the subsequent operations in terms of \(u.\)

EXAMPLE 2
\[\int x^3 \sqrt{x^4 + 3} \di x \]
If we substitute \(u = x^4 + 3,\) then \(\dd u = 4x^3 \di x.\) Apart from the constant \(4,\) the term \(x^3\) shows up in the integrand. To proceed with the substitution, we rewrite the integral as \[\int \par{\tfrac{1}{4}} 4x^3 \sqrt{x^4 + 3} \di x \pd\] The integral therefore becomes \[\int \tfrac{1}{4} \underbrace{\sqrt{x^4 + 3}}_{\sqrt u} \, \underbrace{(4x^3) \di x}_{\dd u} = \int \tfrac{1}{4} \sqrt u \di u \pd\] Because \(1/4\) is a constant, we move it out of the integral by the Constant Multiple Rule (see Section 4.1). Thus, we have \[\tfrac{1}{4} \int u^{1/2} \di u = \tfrac{1}{4} \par{\tfrac{2}{3} u^{3/2}} + C = \tfrac{1}{6} u^{3/2} + C \pd\] We declared \(u = x^4 + 3,\) so converting back yields \[\boxed{\tfrac{1}{6} \par{x^4 + 3}^{3/2} + C}\]

Integrating \(f(ax + b)\)

EXAMPLE 3
Find \(\int e^{kx} \di x\) if \(k\) is a nonzero constant.
The composite function is \(e^{kx}.\) If we use the Substitution Rule with the inner function \(u = kx,\) then \(\dd u = k \di x.\) The term \(k\) isn't in the integrand, but we rewrite the integral as \[\int \par{\tfrac{1}{k}} k e^{kx} \di x \pd\] Now we see \[\int \tfrac{1}{k} \underbrace{e^{kx}}_{e^u} \, \underbrace{k \di x}_{\dd u} = \int \tfrac{1}{k} e^u \di u \pd\] This substitution is successful because we obtain the integral \(\int \tfrac{1}{k} e^u \di u,\) which is expressed entirely in terms of \(u.\) Since \(1/k\) is a constant, we take it out of the integral by the Constant Multiple Rule (see Section 4.1). We therefore have, for any number \(C,\) \[\tfrac{1}{k} \int e^u \di u = \tfrac{1}{k} e^u + C \pd\] Finally, we reexpress our answer in terms of \(x.\) Since we let \(u = kx,\) we have \[\boxed{\tfrac{1}{k} e^{kx} + C}\]

Compare the result of Example 3 to the derivative \[\deriv{}{x} \par{e^{kx}} = k e^{kx} \pd\] When we differentiate \(e^{kx},\) we multiply by \(k;\) but when we integrate \(e^{kx},\) we divide by \(k.\) Let's generalize this notion: Consider the composite function \(f(ax + b)\) for \(a \ne 0.\) This family of functions appears frequently, so we want to easily recognize its derivatives and integrals. By the Chain Rule, if \(f\) is differentiable, then \[\deriv{}{x} [f(ax + b)] = af'(ax + b) \pd\] Instead of multiplying by \(a,\) we divide by \(a\) when we integrate: \begin{equation} \int f(ax + b) \di x = \tfrac{1}{a} F(ax + b) + C \pd \label{eq:int-reverse-chain} \end{equation}

INTEGRATING \(f(ax + b)\)
Let \(F\) be an antiderivative of \(f.\) If \(a \ne 0,\) then for any constant \(C,\) \[ \int f(ax + b) \di x = \tfrac{1}{a} F(ax + b) + C \pd \eqlabel{eq:int-reverse-chain} \]

PROOF To evaluate \(\int f(ax + b) \di x,\) we want to substitute the inner function \(ax + b,\) whose derivative is \(a.\) Thus, we rewrite the integral as \[\int \par{\tfrac{1}{a}} \, a f(ax + b) \di x \pd\] Now letting \(u = ax + b,\) we have \(\dd u = a \di x\) and so we see \[\int \tfrac{1}{a} f(\underbrace{ax + b}_{u}) \, \underbrace{a \di x}_{\dd u} = \tfrac{1}{a} \int f(u) \di u \pd \] If \(F\) is an antiderivative of \(f,\) then the integral becomes, for any value \(C,\) \[\tfrac{1}{a} F(u) + C = \tfrac{1}{a} F(ax + b) + C \pd\] \[\qedproof\]

EXAMPLE 4
Evaluate the following integrals.
  1. \(\ds \int \cos(3x + 1) \di x\)
  2. \(\ds \int (6x - 2)^3 \di x\)
  3. \(\ds \int \frac{1}{5x + 8} \di x\)
  1. The inner function \(3x + 1\) takes the form \(ax + b.\) An antiderivative of cosine is sine. Hence, by \(\eqref{eq:int-reverse-chain}\) the integral becomes \[\boxed{\tfrac{1}{3} \sin(3x + 1) + C}\]

  2. We identify the inner function to be \(6x - 2,\) which is linear. An antiderivative of \(u^3\) is \(u^4/4,\) so using \(\eqref{eq:int-reverse-chain}\) gives \[\tfrac{1}{6} \cdot \tfrac{1}{4} (6x - 2)^4 + C = \boxed{\tfrac{1}{24} (6x - 2)^4 + C}\]

  3. In the composite function, the inner function is \(5x + 8.\) An antiderivative of \(1/u\) is \(\ln \abs{u},\) so \(\eqref{eq:int-reverse-chain}\) gives \[\boxed{\tfrac{1}{5}\ln \abs{5x + 8} + C}\]

Changing Bounds

Consider the definite integral \[\int_a^b f(g(x)) g'(x) \di x \cma\] whose bounds are \(x = a\) and \(x = b.\) When we perform \(u\)-substitution on a definite integral, we need to convert everything to \(u,\) but the integral's bounds are in terms of \(x.\) Thus, if you substitute \(u = g(x),\) then you have two options: The first option is to write your answer in terms of \(x\) and substitute the bounds \(b\) and \(a.\) The second option is to change the bounds to be in terms of \(u \col\) When \(x = a,\) \(u = g(a);\) when \(x = b,\) \(u = g(b).\) The integral then becomes \[\int_{g(a)}^{g(b)} f(u) \di u \cma\] and you evaluate without converting back to \(x.\) Usually, the second option is easier.

EXAMPLE 5
\[\int_0^1 x^2 (x^3 + 1)^4 \di x\]

We substitute \(u = x^3 + 1\) because \(\dd u = 3x^2 \di x.\) The term \(x^2\) appears in the integrand, so this substitution takes us into the \(u\)-world: \[\int \tfrac{1}{3} (\underbrace{x^3 + 1}_{u})^4 \, \underbrace{3x^2 \di x}_{\dd u} = \tfrac{1}{3} \int u^4 \di u \pd\] Thus, the definite integral becomes \[\tfrac{1}{3} \int_{x = 0}^{x = 1} u^4 \di u \pd\] We now have two subsequent options; this solution covers both methods.

Method 1 We find an antiderivative of \(u^4\) in terms of \(x.\) Doing so gives \[\tfrac{1}{5} u^5 + C = \tfrac{1}{5} (x^3 + 1)^5 + C \pd\] Now we use Part II of the Fundamental Theorem of Calculus with our original bounds in terms of \(x \col\) \[ \ba \tfrac{1}{3} \int_{x = 0}^{x = 1} u^4 \di u &= \tfrac{1}{3} \cdot \tfrac{1}{5} (x^3 + 1)^5 \intEval_0^1 \nl &= \tfrac{1}{15} \parbr{(1^3 + 1)^5 - (0^3 + 1)^5} \nl &= \boxed{\tfrac{31}{15}} \ea \]

Method 2 After we perform the substitution to obtain the definite integral \(\tfrac{1}{3} \int_{x = 0}^{x = 1} u^4 \di u,\) we change the bounds to be in terms of \(u.\) When \(x = 0,\) \(u = 0^3 + 1 = 1;\) when \(x = 1,\) \(u = 1^3 + 1 = 2.\) Expressing the bounds in terms of \(u\) yields \[\tfrac{1}{3} \int_1^2 u^4 \di u \pd\] Now we integrate strictly with \(u\); we don't return to the \(x\)-world. We get \[ \ba \tfrac{1}{3} \cdot \tfrac{1}{5} u^5 \intEval_1^2 &= \tfrac{1}{15} (2^5 - 1^5) \nl &= \boxed{\tfrac{31}{15}} \ea \]

Integrals with Trigonometric Functions

In Section 4.1 we learned that \(\int \cos x \di x\) \(= \sin x + C\) and \(\int \sin x \di x\) \(= - \cos x + C.\) The Substitution Rule enables us to determine antiderivatives for the remaining four trigonometric functions: tangent, cotangent, secant, and cosecant.

Let's begin by determining an antiderivative for \(\cot x.\) Because \(\cot x\) \(= \cos x /\sin x,\) we have \[\int \cot x \di x = \int \frac{\cos x}{\sin x} \di x \pd\] We choose the substitution \(u = \sin x\) because the differential \(\dd u = \cos x \di x\) lies in the integral. Then the integral becomes \[\int \frac{1}{u} \di u = \ln \abs u + C = \ln \abs{\sin x} + C \pd\] To integrate secant, we employ a clever trick: We multiply the numerator and denominator by the sum \((\sec x + \tan x)\) to get \[\int \sec x \di x = \int \sec x \cdot \frac{\sec x + \tan x}{\sec x + \tan x} \di x = \int \frac{\sec^2 x + \sec x \tan x}{\sec x + \tan x} \di x \pd \] Letting \(u = \sec x + \tan x,\) we see \(\dd u = \par{\sec x \tan x + \sec^2 x} \di x\) and so the integral becomes \[ \int \frac{1}{u} \di u = \ln \abs u + C = \ln \abs{\sec x + \tan x} + C \pd \] The same tricks enable us to attain the antiderivatives of \(\tan x\) and \(\csc x.\)

EXAMPLE 6
\[\int \tan x \di x\]
Since \(\tan x\) \(= \sin x/\cos x,\) we see \[\int \tan x \di x = \int \frac{\sin x}{\cos x} \di x \pd\] We let \(u = \cos x\) because \(\dd u = -\sin x \di x,\) so the integral becomes \[-\int \frac{1}{u} \di u = - \ln \abs u + C = - \ln \abs{\cos x} + C = \ln \abs{\frac{1}{\cos x}} + C = \boxed{\ln \abs{\sec x} + C}\]

The following table represents the integrals of all six trigonometric functions. In Sections 6.2 and 6.3, it will be essential to have them memorized.

INTEGRALS OF TRIGONOMETRIC FUNCTIONS
\(\ds \int \sin x \di x = -\cos x + C\) \(\ds \int \cos x \di x = \sin x + C\)
\(\ds \int \tan x \di x = \ln \abs{\sec x} + C\) \(\ds \int \cot x \di x = \ln \abs{\sin x} + C\)
\(\ds \int \sec x \di x = \ln \abs{\sec x + \tan x} + C\) \(\ds \int \csc x \di x = - \ln \abs{\csc x + \cot x} + C\)
EXAMPLE 7
\[\int 2 e^{4 \sec x} \sec x \tan x \di x\]
Observe that \[\int 2 e^{4 \sec x} \sec x \tan x \di x = \tfrac{1}{2} \int e^{4 \sec x} (4\sec x \tan x) \di x \pd\] We therefore substitute \(u = 4 \sec x\) because the differential \(\dd u = 4 \sec x \tan x \di x\) appears in the integral. Doing so gives \[\tfrac{1}{2} \int e^u \di u = \tfrac{1}{2} e^u + C = \boxed{\tfrac{1}{2} e^{4 \sec x} + C}\]

Another common family of integrals contains polynomials in the denominator. To evaluate these integrals, we often complete the square (see Section 0.7) and then use the Substitution Rule; the result features inverse trigonometric functions. The following integrals are therefore useful for this procedure.

COMMON INTEGRALS WITH INVERSE TRIGONOMETRIC FUNCTIONS
\begin{align} \int \frac{1}{\sqrt{1 - u^2}} \di u &= \asin u + C \label{eq:int-asin} \nl \int \frac{1}{u^2 + 1} \di u &= \atan u + C \label{eq:int-atan} \end{align}
EXAMPLE 8
\[\int \frac{1}{x^2 + 2x + 5} \di x\]
Completing the square, we see \[ \ba x^2 + 2x + 5 &= x^2 + 2x + \underline{1} - \underline{1} + 5 \nl &= (x + 1)^2 + 4 \pd \ea \] The integral therefore becomes \[ \int \frac{1}{(x + 1)^2 + 4} \di x = \tfrac{1}{4} \int \frac{1}{\par{\dfrac{x + 1}{2}}^2 + 1} \di x \pd \] To convert the integral to match \(\eqref{eq:int-atan},\) we substitute \(u = (x + 1)/2.\) Then \(\dd u = \tfrac{1}{2} \di x\) and so the integral becomes \[ \ba \tfrac{1}{2} \int \frac{1}{u^2 + 1} \di u &= \tfrac{1}{2} \atan u + C \nl &= \boxed{\tfrac{1}{2} \atan \par{\frac{x + 1}{2}} + C} \ea \]

Integrals of Odd and Even Functions

Many integral calculations are facilitated by using symmetry. Suppose that a function \(f\) is continuous on \([-a, a].\) Then the following properties help us evaluate \(\int_{-a}^a f(x) \di x.\)

INTEGRALS OF ODD AND EVEN FUNCTIONS
Let \(f\) be a continuous function on \([-a, a].\)
  1. If \(f\) is odd, then \(\int_{-a}^a f(x) \di x\) \(= 0.\)
  2. If \(f\) is even, then \(\int_{-a}^a f(x) \di x\) \(= 2 \int_0^a f(x) \di x.\)
FIGURE 1A
FIGURE 1B

Recall that a definite integral equals a positive number if the region enclosed by \(f\) is above the \(x\)-axis, but a definite integral returns a negative number if the region is below the \(x\)-axis. In Figure 1A the region above the \(x\)-axis has the same area as the region below the \(x\)-axis. Thus, the signed areas cancel, so part (a) states that the integral equals \(0.\) For the special case of \(f(x) \geq 0\) on \([-a, a],\) part (b) says the area under \(f\) from \(-a\) to \(a\) is twice the area from \(0\) to \(a\) due to symmetry (Figure 1B).

PROOF Using the Additive Interval Property, we get \begin{align} \int_{-a}^a f(x) \di x &= \int_{-a}^0 f(x) \di x + \int_0^a f(x) \di x \nonum \nl &= -\int_0^{-a} f(x) \di x + \int_0^a f(x) \di x \pd \label{eq:int-split} \end{align} Substituting \(u = -x\) shows \(\dd u = -\dd x;\) when \(x = -a,\) \(u = a.\) Accordingly, we see \[-\int_0^{-a} f(x) \di x = -\int_0^a f(-u) (-\dd u) = \int_0^a f(-u) \di u \pd\] So \(\eqref{eq:int-split}\) becomes \begin{equation} \int_{-a}^a f(x) \di x = \int_0^a f(-u) \di u + \int_0^a f(x) \di x \pd \label{eq:int-split-2} \end{equation} If \(f\) is odd, then \(f(-u) = -f(u)\) and so \(\eqref{eq:int-split-2}\) becomes \[ \ba \int_{-a}^a f(x) \di x = - \int_0^a f(u) \di u + \int_0^a f(x) \di x = 0 \pd \ea \] Conversely, if \(f\) is even, then \(f(-u) = f(u)\) and so \(\eqref{eq:int-split-2}\) becomes \[\int_{-a}^a f(x) \di x = \int_0^a f(u) \di u + \int_0^a f(x) \di x = 2 \int_0^a f(x) \di x \pd\] \[\qedproof\]

EXAMPLE 9
\[\int_{-3}^3 \frac{x^5 \cos x}{\sqrt{36 - x^2}} \di x\]
Note that \[\frac{(-x)^5 \cos (-x)}{\sqrt{36 - (-x)^2}} = - \frac{x^5 \cos x}{\sqrt{36 - x^2}} \pd\] Hence, the integrand is odd. So by symmetry, the integral equals \(\boxed 0.\)

Substitution Rule We use the Substitution Rule (also called \(\bf u\)-substitution) to integrate composite functions in which the derivative of the inner function lies in the integrand. Let \(g\) be a differentiable function whose range is an interval \(I,\) and let \(f\) be continuous over \(I.\) To evaluate the integral \(\int f(g(x)) \, g'(x) \di x,\) substitute \(u = g(x).\) Then \(\dd u = g'(x) \di x,\) and \[ \int f(g(x)) \, g'(x) \di x = \int f(u) \di u \pd \eqlabel{eq:u-sub-f} \]

Integrating \(f(ax + b)\) Let \(F\) be an antiderivative of \(f.\) If \(a \ne 0,\) then for any constant \(C,\) \[ \int f(ax + b) \di x = \tfrac{1}{a} F(ax + b) + C \pd \eqlabel{eq:int-reverse-chain} \]

Changing Bounds When we integrate \(\int_a^b f(g(x)) g'(x) \di x,\) we have a choice: The first option is to convert our final answer to \(x\) and substitute the bounds \(b\) and \(a.\) The second option is to change the bounds to be in terms of \(u \col\) \[\int_a^b f(g(x)) g'(x) \di x = \int_{g(a)}^{g(b)} f(u) \di u \cma\] and evaluate without converting back to \(x.\)

Integrals with Trigonometric Functions The following table shows the integrals for all six trigonometric functions:

\(\ds \int \sin x \di x = -\cos x + C\) \(\ds \int \cos x \di x = \sin x + C\)
\(\ds \int \tan x \di x = \ln \abs{\sec x} + C\) \(\ds \int \cot x \di x = \ln \abs{\sin x} + C\)
\(\ds \int \sec x \di x = \ln \abs{\sec x + \tan x} + C\) \(\ds \int \csc x \di x = - \ln \abs{\csc x + \cot x} + C\)

When a polynomial is on the denominator, try completing the square, performing a substitution, and using one of the following formulas: \begin{align} \int \frac{1}{\sqrt{1 - u^2}} \di u &= \asin u + C \cma \eqlabel{eq:int-asin} \nl \int \frac{1}{u^2 + 1} \di u &= \atan u + C \pd \eqlabel{eq:int-atan} \end{align}

Integrals of Odd and Even Functions Evaluating definite integrals is made easier through properties of symmetry. Let \(f\) be a continuous function on \([-a, a].\)

  1. If \(f\) is odd, then \(\int_{-a}^a f(x) \di x\) \(= 0.\)
  2. If \(f\) is even, then \(\int_{-a}^a f(x) \di x\) \(= 2 \int_0^a f(x) \di x.\)