Making a Fast Switch: Variable Substitution - Indefinite Integrals - Calculus II For Dummies

Calculus II For Dummies, 2nd Edition (2012)

Part II. Indefinite Integrals

Chapter 5. Making a Fast Switch: Variable Substitution

In This Chapter

arrow Understanding how variable substitution works

arrow Recognizing when variable substitution can help you

arrow Knowing a shortcut for using substitution with definite integrals

Unlike differentiation, integration doesn’t have a Chain Rule. This fact makes integrating compositions of functions (functions within functions) a little bit tricky. The most useful trick for integrating certain common compositions of functions uses variable substitution.

With variable substitution, you set a variable (usually u) equal to part of the function that you’re trying to integrate. The result is a simplified function that you can integrate using the anti-differentiation formulas and the three basic integration rules (Sum Rule, Constant Multiple Rule, and Power Rule — all discussed in Chapter 4).

In this chapter, I show you how to use variable substitution. Then I show you how to identify a few common situations where variable substitution is helpful. After you get comfortable with the process, I give you a quick way to integrate by just looking at the problem and writing down the answer. Finally, I show you how to skip a step when using variable substitution to evaluate definite integrals.

Knowing How to Use Variable Substitution

The anti-differentiation formulas plus the Sum Rule, Constant Multiple Rule, and Power Rule (all discussed in Chapter 4) allow you to integrate a variety of common functions. But as functions begin to get a little bit more complex, these methods become insufficient. For example, these methods don’t work on the following:

9781118161708-eq05001.eps

To evaluate this integral, you need some stronger medicine. The sticking point here is the presence of the constant 2 inside the sine function. You have an anti-differentiation rule for integrating the sine of a variable, but how do you integrate the sine of a variable times a constant?

The answer is variable substitution, a five-step process that allows you to integrate where no integral has gone before. Here are the steps:

1. Declare a variable u and set it equal to an algebraic expression that appears in the integral, and then substitute u for this expression in the integral.

2. Differentiate u to find 9781118161708-eq05002.eps, and then isolate all x variables on one side of the equal sign.

3. Make another substitution to change dx and all other occurrences of x in the integral to an expression that includes du.

4. Integrate using u as your new variable of integration.

5. Express this answer in terms of x.

I don’t expect these steps to make much sense until you see how they work in action. In the rest of this section, I show you how to use variable substitution to solve problems that you wouldn’t be able to integrate otherwise.

Finding the integral of nested functions

Suppose that you want to integrate the following:

9781118161708-eq05003.eps

The difficulty here lies in the fact that this function is the composition of two functions: the function 2x nested inside a sine function. If you were differentiating, you could use the Chain Rule. Unfortunately, no Chain Rule exists for integration.

Fortunately, this function is a good candidate for variable substitution. Follow the five steps I give you in the previous section:

1. Declare a new variable u as follows and substitute it into the integral:

Let u = 2x

Now substitute u for 2x as follows:

9781118161708-eq05004.eps

This may look like the answer to all your troubles, but you have one more problem to resolve. As it stands, the symbol dx tells you that the variable of integration is still x.

To integrate properly, you need to find a way to change dx to an expression containing du. That’s what Steps 2 and 3 are about.

2. Differentiate the function u = 2x and isolate the x terms on one side of the equal sign:

9781118161708-eq05005.eps

Now treat the symbol 9781118161708-eq05006.eps as if it’s a fraction, and isolate the x terms on one side of the equal sign. I do this in two steps:

du = 2 dx

9781118161708-eq05007.eps

3. Substitute 9781118161708-eq05008.epsdu for dx into the integral:

9781118161708-eq05009.eps

You can treat the 9781118161708-eq05010.eps just like any coefficient and use the Constant Multiple Rule to bring it outside the integral:

9781118161708-eq05011.eps

4. At this point, you have an expression that you know how to evaluate:

9781118161708-eq05012.eps

5. Now that the integration is done, the last step is to substitute 2x back in for u:

9781118161708-eq05013.eps

You can check this solution by differentiating using the Chain Rule:

9781118161708-eq05014.eps

9781118161708-eq05015.eps

9781118161708-eq05016.eps

= sin 2x

Determining the integral of a product

Imagine that you’re faced with this integral:

9781118161708-eq05017.eps

The problem in this case is that the function that you’re trying to integrate is the product of two functions — sin3 x and cos x. This would be simple to differentiate with the Product Rule, but integration doesn’t have a Product Rule. Again, variable substitution comes to the rescue:

1. Declare a variable as follows and substitute it into the integral:

Let u = sin x

You may ask how I know to declare u equal to sin x (rather than, say, sin3 x or cos x). I answer this question later in the chapter. For now, just follow along and get the mechanics of variable substitution.

You can substitute this variable into the expression that you want to integrate as follows:

9781118161708-eq05018.eps

Notice that the expression cos x dx still remains and needs to be expressed in terms of u.

2. Differentiate the function u = sin x and isolate the x variables on one side of the equal sign:

9781118161708-eq05019.eps

Isolate the x variables on one side of the equal sign:

du = cos x dx

3. Substitute du for cos x dx in the integral:

9781118161708-eq05020.eps

4. Now you have an expression that you can integrate:

9781118161708-eq05021.eps

5. Substitute sin x for u:

9781118161708-eq05022.eps

And again, you can check this answer by differentiating with the Chain Rule:

9781118161708-eq05023.eps

9781118161708-eq05024.eps

9781118161708-eq05025.eps

= sin3 x cos x

This derivative matches the original function, so the integration is correct.

Integrating a function multiplied by a set of nested functions

Suppose that you want to integrate the following:

9781118161708-eq05026.eps

This time, you’re trying to integrate the product of a function (x) and a composition of functions (the function 3x2 + 7 nested inside a square root function). If you were differentiating, you could use a combination of the Product Rule and the Chain Rule, but these options aren’t available for integration. Here’s how you integrate, step by step, using variable substitution:

1. Declare a variable u as follows and substitute it into the integral:

Let u = 3x2 + 7

Here, you may ask how I know what value to assign to u. Here’s the short answer: u is the inner function, as you would identify if you were using the Chain Rule. (See Chapter 2 for a review of the Chain Rule.) I explain this more fully later in “Recognizing When to Use Substitution.”

Now substitute u into the integral:

9781118161708-eq05027.eps

Make one more small rearrangement to place all the remaining x terms together:

9781118161708-eq05028.eps

This rearrangement makes clear that I still have to find a substitution for x dx.

2. Now differentiate the function u = 3x2 + 7:

9781118161708-eq05029.eps

From Step 1, I know that I need to replace x dx in the integral:

du = 6x dx

9781118161708-eq05030.eps

3. Substitute 9781118161708-eq05031.eps for x dx:

9781118161708-eq05032.eps

You can move the fraction 9781118161708-eq05033.eps outside the integral:

9781118161708-eq05034.eps

4. Now you have an integral that you know how to evaluate.

I take an extra step, putting the square root in exponential form, to make sure that you see how to do this:

9781118161708-eq05035.eps

9781118161708-eq05036.eps

9781118161708-eq05037.eps

5. To finish up, substitute 3x2 + 7 for u:

9781118161708-eq05038.eps

As with the first two examples in this chapter, you can always check your integration by differentiating the result:

9781118161708-eq05039.eps

9781118161708-eq05040.eps

9781118161708-eq05041.eps

9781118161708-eq05042.eps

As if by magic, the derivative brings you back to the function you started with.

Recognizing When to Use Substitution

In the previous section, I show you the mechanics of variable substitution — that is, how to perform variable substitution. In this section, I clarify when to use variable substitution.

You may be able to use variable substitution in three common situations. In these situations, the expression you want to evaluate is one of the following:

check A composition of functions — that is, a function nested in a function

check A function multiplied by a function

check A function multiplied by a composition of functions

In the following sections, I first show you how to work through nested functions, and then I show you a shortcut for them. I round out the discussion by showing you how to deal with functions multiplied by functions and functions multiplied by compositions of functions.

Integrating nested functions

Compositions of functions — that is, one function nested inside another — are of the form f(g(x)). You can integrate them by substituting u = g(x) when

check You know how to integrate the outer function f.

check The inner function g(x) differentiates to a constant — that is, it’s of the form ax or ax + b.

Example #1

Here’s an example. Suppose that you want to integrate the function

csc2 (4x + 1) dx

This is a composition of two functions:

check The outer function f is the csc2 function, which you know how to integrate.

check The inner function is g(x) = 4x + 1, which differentiates to the constant 4.

technicalstuff.epsThis time the composition is held together by the equality u = 4x + 1. That is, the two basic functions f(u) = csc2 u and g(x) = 4x + 1 are composed by the equality u = 4x + 1 to produce the function f(g(x)) = csc2(4x + 1).

Both criteria are met, so this integral is a prime candidate for substitution using u = 4x + 1. Here’s how you do it:

1. Declare a variable u and substitute it into the integral:

Let u = 4x + 1

9781118161708-eq05043.eps

2. Differentiate u = 4x + 1 and isolate the x term:

9781118161708-eq05044.eps

9781118161708-eq05045.eps

3. Substitute 9781118161708-eq05046.eps for dx in the integral:

9781118161708-eq05047.eps

9781118161708-eq05048.eps

4. Evaluate the integral:

9781118161708-eq05049.eps

5. Substitute back 4x + 1 for u:

9781118161708-eq05050.eps

Example #2

Here’s one more example. Suppose that you want to evaluate the following integral:

9781118161708-eq05051.eps

This is a composition of two functions:

check The outer function f is a fraction — technically, an exponent of –1 — which you know how to integrate.

check The inner function is g(x) = x – 3, which differentiates to 1.

technicalstuff.epsThe composition is held together by the equality u = x – 3. That is, the two basic functions 9781118161708-eq05052.eps and g(x) = x – 3 are composed by the equality u = x – 3 to produce the function 9781118161708-eq05053.eps.

The criteria are met, so you can integrate by using the equality u = x – 3:

1. Declare a variable u and substitute it into the integral:

Let u = x – 3

9781118161708-eq05054.eps

2. Differentiate u = x – 3 and isolate the x term:

9781118161708-eq05055.eps

du = dx

3. Substitute du for dx in the integral:

9781118161708-eq05056.eps

4. Evaluate the integral:

= ln |u| + C

5. Substitute back x – 3 for u:

= ln |x – 3| + C

Knowing a shortcut for nested functions

After you work through enough examples of variable substitution, you may begin to notice certain patterns emerging. As you get more comfortable with the concept, you can use a shortcut to integrate compositions of functions — that is, nested functions of the form f(g(x)). Technically, you’re using the variable substitution u = g(x), but you can bypass this step and still get the right answer.

This shortcut works for compositions of functions f(g(x)) for which

check You know how to integrate the outer function f.

check The inner function g(x) is of the form ax or ax + b — that is, it differentiates to a constant.

When these two conditions hold, you can integrate f(g(x)) using the following three steps:

1. Write down the reciprocal of the coefficient of x.

2. Multiply by the integral of the outer function, copying the inner function as you would when using the Chain Rule in differentiation.

3. Add C.

Example #1

For example:

9781118161708-eq05057.eps

Notice that this is a function nested within a function, where the following are true:

check The outer function f is the cosine function, which you know how to integrate.

check The inner function is g(x) = 4x, which is of the form ax.

So you can integrate this function quickly as follows:

1. Write down the reciprocal of 4:

9781118161708-eq05058.eps

2. Multiply this reciprocal by the integral of the outer function, copying the inner function:

9781118161708-eq05059.eps

3. Add C:

9781118161708-eq05060.eps

That’s it! You can check this easily by differentiating, using the Chain Rule:

9781118161708-eq05061.eps

9781118161708-eq05062.eps

= cos 4x

Example #2

Check out this example:

9781118161708-eq05063.eps

Remember as you begin that sec2 10x dx is a notational shorthand for [sec (10x)]2. So the outer function f is the sec2 function, and the inner function is g(x) = 10x. (See Chapter 2 for more on the ins and outs of trig notation.) Again, the criteria for variable substitution are met, so make your way through the steps:

1. Write down the reciprocal of 10:

9781118161708-eq05064.eps

2. Multiply this reciprocal by the integral of the outer function, copying the inner function:

9781118161708-eq05065.eps

3. Add C:

9781118161708-eq05066.eps

Here’s the check:

9781118161708-eq05067.eps

9781118161708-eq05068.eps

9781118161708-eq05069.eps

= sec2 10x

Example #3

Take a look at this example:

9781118161708-eq05070.eps

In this case, the outer function is division, which counts as a function (technically speaking f(x) = x–1), as I explain earlier in “Recognizing When to Use Substitution.” The inner function is 7x + 2. Both of these functions meet the criteria, so here’s how to perform this integration:

1. Write down the reciprocal of the coefficient 7:

9781118161708-eq05071.eps

2. Multiply this reciprocal by the integral of the outer function, copying the inner function:

9781118161708-eq05072.eps

3. Add C:

9781118161708-eq05073.eps

You’re done! As always, you can check your result by differentiating, using the Chain Rule:

9781118161708-eq05074.eps

9781118161708-eq05075.eps

9781118161708-eq05076.eps

Example #4

Consider this example:

9781118161708-eq05077.eps

This time, the outer function f is a square root — that is, an exponent of 9781118161708-eq05078.eps — and g(x) = 12x – 5, so you can use a quick substitution:

1. Write down the reciprocal of 12:

9781118161708-eq05079.eps

2. Multiply the integral of the outer function, copying down the inner function:

9781118161708-eq05080.eps

9781118161708-eq05081.eps

3. Add C:

9781118161708-eq05082.eps

Table 5-1 gives you a variety of integrals of the form f(g(x)). As you look over this chart, get a sense of the pattern so that you can spot it when you have an opportunity to integrate quickly.

Substitution when one part of a function differentiates to the other part

When g'(x) = f(x), you can use the substitution u = g(x) to integrate the following:

check Expressions of the form f(x) · g(x)

check Expressions of the form f(x) · h(g(x)), provided that h is a function that you already know how to integrate

Don’t worry if you don’t understand all this math-ese. In the following sections, I show you how to recognize both of these cases and integrate each. As usual, variable substitution helps to fill the gaps left by the absence of a Product Rule and a Chain Rule for integration.

Expressions of the form f(x) · g(x)

Some products of functions yield quite well to variable substitution. Look for expressions of the form f(x) · g(x) where

check You know how to integrate g(x).

check The function f(x) is the derivative of g(x).

For example:

9781118161708-eq05094.eps

The main thing to notice here is that the derivative of tan x is sec2 x. This is a great opportunity to use variable substitution:

1. Declare u and substitute it into the integral:

Let u = tan x

9781118161708-eq05095.eps

2. Differentiate as planned:

9781118161708-eq05096.eps

du = sec2 x dx

3. Perform another substitution:

9781118161708-eq05097.eps

4. This integration couldn’t be much easier:

9781118161708-eq05098.eps

5. Substitute back tan x for u:

9781118161708-eq05099.eps

Expressions of the form f(x) ·h(g(x))

Here’s a hairy-looking integral that actually responds well to substitution:

9781118161708-eq05100.eps

The key insight here is that the numerator of this fraction is the derivative of the inner function in the denominator. Watch how this plays out in this substitution:

1. Declare u equal to the inner function in the denominator and make the substitution:

Let u = x2 + x – 5

Here’s the substitution:

9781118161708-eq05101.eps

2. Differentiate u:

9781118161708-eq05102.eps

du = (2x + 1) dx

3. The second part of the substitution now becomes clear:

9781118161708-eq05103.eps

Notice how this substitution hinges on the fact that the numerator is the derivative of the inner function in the denominator. (You may think that this is quite a coincidence, but coincidences like these happen all the time on exams!)

4. Integration is now quite straightforward:

I take an extra step to remove the fraction before I integrate:

9781118161708-eq05104.eps

9781118161708-eq05105.eps

5. Substitute back x2 + x – 5 for u:

9781118161708-eq05106.eps

Checking the answer by differentiating with the Chain Rule reveals how this problem was set up in the first place:

9781118161708-eq05107.eps

9781118161708-eq05108.eps

9781118161708-eq05109.eps

By now, if you’ve worked through the examples in this chapter, you’re probably seeing opportunities to make variable substitutions. For example:

9781118161708-eq05110.eps

Notice that the derivative of x4 – 1 is x3, off by a constant factor. So here’s the declaration, followed by the differentiation:

Let u = x4 – 1

9781118161708-eq05111.eps

9781118161708-eq05112.eps

Now you can just do both substitutions at once:

9781118161708-eq05113.eps

9781118161708-eq05114.eps

At this point, you can solve the integral simply — I’ll leave this as an exercise for you!

Similarly, here’s another example:

9781118161708-eq05115.eps

At first glance, this integral looks just plain horrible. But on further inspection, notice that the derivative of cot x is –csc2 x, so this looks like another good candidate:

Let u = cot x

9781118161708-eq05116.eps

–du = csc2 x dx

This results in the following substitution:

9781118161708-eq05117.eps

9781118161708-eq05118.eps

Again, this is another integral that you can solve.

Using Substitution to Evaluate Definite Integrals

In the first two sections of this chapter, I cover how and when to evaluate indefinite integrals with variable substitution. All this information also applies to evaluating definite integrals, but I also have a time-saving trick that you should know.

When using variable substitution to evaluate a definite integral, you can save yourself some trouble at the end of the problem. Specifically, you can leave the solution in terms of u by changing the limits of integration.

For example, suppose that you’re evaluating the following definite integral:

9781118161708-eq05119.eps

Notice that I give the limits of integration as x = 0 and x = 1. This is just a notational change to remind you that the limits of integration are values of x. This fact becomes important later in the problem.

You can evaluate this equation simply by using variable substitution.

If you’re not sure why this substitution works, read the section “Recognizing When to Use Substitution” earlier in this chapter. Follow Steps 1 through 3 of variable substitution:

Let u = x2 + 1

9781118161708-eq05120.eps

9781118161708-eq05121.eps

9781118161708-eq05122.eps

If this were an indefinite integral, you’d be ready to integrate. But because this is a definite integral, you still need to express the limits of integration in terms of u rather than x. Do this by substituting values 0 and 1 for x in the substitution equation u = x2 + 1:

u = 12 + 1 = 2

u = 02 + 1 = 1

Now use these values of u as your new limits of integration:

9781118161708-eq05123.eps

At this point, you’re ready to integrate:

9781118161708-eq05124.eps

9781118161708-eq05125.eps

Because you changed the limits of integration, you can now find the answer without switching the variable back to x:

9781118161708-eq05126.eps

9781118161708-eq05127.eps

9781118161708-eq05128.eps