# Section 11: Methods of Integration

## 11.3 Integration by Simple Subsitution

(For another view on this topic see this tutorial by Stefan Waner and Steven R. Costenoble at Hoftra University)

When Dorothy visited Munchkin Land, it's a good thing for her that she arrived when she did. For on the day she arrived, the Inter-Oz Highway Act was still recent history. Had Dorothy arrived only a few months earlier, the Yellow Brick Road would still have been under construction, and Auntie Em would have had to await its completion before her niece could journey to The Emerald City and find her way back to Kansas.

The Emerald City Public Works Commission had contracted the firm of Follup and Gollup Munchkin Construction to lay the section of the Yellow Brick Road that passed through Munchkin Land. The contract was very explicit. Not only did it require all the pavement to be of yellow brick, but the commission had, in its bureaucratic wisdom, also required that each course be precisely 25 bricks laid lengthwise across and that there be exactly 100 bricks per square meter of Yellow Brick Road.

At first it seemed easy for Follup and Gollup to comply. They would just make the road 5 meters wide and use bricks that were 20 centimeters by 5 centimeters. So each meter of road would have 20 courses of 25 bricks each. Every 5 square meters of road had 500 bricks -- it met all the requirements. And without another thought they went and ordered bricks to those specifications.

But then Follup and Gollup read deeper into the contract and found a clause written in at the behest of the Greater Oz Environmental Preservation Committee. It required that no tree of greater than 35 centimeter diameter be cut down to make way for the new road. The problem was that the plan for the road took it right through the old growth forest of Munchkin Land, where quite often there was only 4 or even 3 meters between thick, gnarled trees.

"Well," said Follup, "we'll just have to make the road narrower where we have to squeeze between trees. That means fewer bricks in each course in the bottlenecks."

"No no no!" Gollup complained. "The spec is very clear. It says 25 bricks across. What we'll do instead is cut the bricks shorter so the road can be narrower and still get our 25 bricks across."

"That won't work either," said Follup. "If we do it that way we'll have more than the 100 bricks per square meter that the spec demands."

Alas, they had already spent the money to buy the bricks, and since they could think of no way to meet the specification through the old growth forest, they resigned themselves to losing money on the project. The only productive course of action they both could agree on now was to drown their sorrows. So to the tavern the two of them shuffled.

But who should they see at the bar but Grundleck, the drunken old sorcerer who had once been married to the Wicked Witch of the East till she had thrown him out of her castle a century and a half earlier. Follup and Gollup bought the sodden geezer a pitcher of ale and then proceeded to explain their problem to him.

"We would gladly pay you a handsome sum in gold if you could enchant some of our bricks to make them shorter and fatter," Follup offered.

"Aw poo!" Grundleck grunted. "I'll do it for free. Just give me one pallet of them bricks so I can make a footpath in front of the witch's castle."

"Really," said Gollup. "I thought you hated her."

"You're dern right. I'll put a spell on them suckers so that when the old bag walks on 'em they'll turn into bats and flutter around under her dress. That'll make my day."

Follup and Gollup weren't completely sure it would make their day, especially if the witch ever found out they had anything to do with it. But they didn't see that they had much choice. So they agreed, hoping that old Grundleck would stay too drunk ever to lay a footpath anywhere.

Grundleck still knew enough magic to make the bricks destined for the forest take on the consistency of silly-putty. Follup and Gollup could squeeze them shorter and fatter to narrow the road through the bottlenecks. Yet no matter how much they squeezed a brick, its width times its breadth remained at exactly 100 square centimeters. It worked out perfectly. And to top it all off, the bricks grew hard again once the first rain fell on them.

And the Wicked Witch? Well one fine sunny day Grundleck did finally have his prank on her. Then while the witch was shaking the last of the bats out of her dress, somebody dropped a house on her.

The figure to the right shows an incredible coincidence of laying yellow bricks onto different shaped areas. The two areas shown, though different in shape, are identical in area. In each case the area is exactly 81/16, just or 1/16 more than exactly 5 boxes in the graph. So imagine that each of the yellow bricks occupies 1/16 of the area of one box on the graph. The Munchkins would need 81 such bricks to pave each of the areas shown in the figure.

But how are the bricks dimensioned? You have plenty of choices. You could have each brick be 1/4 by 1/4. Or you could have each one be 1/2 by 1/8. And you can certainly see there are an infinitude of other combinations of width and breadth of a brick whose area will multiply out to be exactly 1/16 of a box in area.

Suppose that to pave the area under the blue function (that is  f(x) = (1/4)x3),  we use exclusively bricks that are 1/4 vertically by 1/4 horizontally. Figure 11.3-2 shows what that looks like.

Now I want to pave the area under the green function (that is  g(u) = (1/8)u),  using the same number and arrangement of bricks. The area under the blue function has 10 columns of bricks, so I want the area under the green function to have 10 columns of bricks. And I want each column of bricks under the green function to have exactly as many bricks in it as its corresponding column under the blue function. Not only that, but all the bricks have to each cover the exact same amount of area as the square ones do under the blue function.

Just like the Munchkins, it looks like I'm going to have to squeeze some bricks. Figure 11.3-3 shows the arrangement of squeezed bricks, except that I had to expand your view of it vertically by a factor of 4 because the bricks on the right are squeezed too thin to show using the original scaling.

 How we pave the f(x) = (1/4)x3 area How we pave the g(u) = (1/8)u area

Now suppose you didn't know how to find the indefinite integral of  f(x) = (1/4)x3,  but you did know how to integrate  g(u) = (1/8)u.  If you could somehow convert the problem of integrating f(x) from x=0 to x=3 into the easier problem of integrating g(u) from u=0 to u=9, you'd be all set. After all, the areas are the same (which you should be able to verify for yourself). All you have to do to make this transformation is squeeze the bricks.

The trick, though, is to know exactly by how much you have to squeeze the bricks in each column.

Since we do know how to find antiderivatives for both f(x) and g(u), lets do so. From the last section you can use equations 11.2-4f and 11.2-3 to work these antiderivatives. Work both of them out for yourself, then scroll down a bit to see if you got the correct results.

You ought to have gotten

 ``` F(x) = ``` ``` ``` ``` 1 1 x3 dx = x4 + C eq. 11.3-1a 4 16 ```
and

 ``` G(u) = ``` ``` ``` ``` 1 1 u dx = u2 + C eq. 11.3-1b 8 16 ```
respectively. Curiouser and curiouser -- did you notice that  G(x2) = F(x)?  (put x2 in place of u into the expression for G(u) to verify this)

Here is figure 11.3-1 again. Look at how the x axis that the blue function is plotted on is related to the u axis that the green function is plotted on. The relationship is precisely  u = x2

We know that g(u) must be the derivative of G(u) with respect to u (why?). But what happens if you assume that u is a function of x (i.e., that we have u(x)) and you want to know the derivative of G(u(x)) with respect to x? You use chain rule, right? It says that this derivative should be  g(u(x))u'(x).  Work this derivative through for yourself, then scroll down a bit and continue reading.

 ``` dG(u(x)) dG du 1 = =   dx du dx 8 ``` ``` x2 (2x) eq. 11.3-2 ```
Notice that the  du/dx = 2x  part of the derivative is exactly the factor I need to multiply the derivative of G by to get the derivative of F. How could I have known ahead of time how to make this work out so nicely? I did it by seeing f(x) as a chain-rule product to begin with. Here's how. Remember that  f(x) = 1/4 x3.  But I went into this problem looking for a u(x) that would make the chain-rule product work. That is, I was looking for u(x) such that

```   f(x)  =  g(u(x)) u'(x)                                       eq. 11.3-3
```
And I found it by observing that  f(x) = 1/4 x3 = (1/8)x2(2x).  So if  u(x) = x2,  then
```   du
=  2x                                                    eq. 11.3-4a
dx
```
That is one factor of f(x) (the 2x part) is the derivative of a part of the other factor (the x2 part). Now multiply both sides by dx and you have
```   du  =  2x dx                                                 eq. 11.3-4b
```
Now let's look again at the problem of taking the indefinite integral.

 ``` ``` ``` 1 x3 dx = 4 ``` ``` ``` ``` 1 (x2) (2x dx) = 8 ``` ``` ``` ``` 1 u du eq. 11.3-5a 8 ```
So how did we get that last transition from the x variable to the u variable? Well we already agreed that  u(x) = x2.  And when we took the derivative of that and multiplied both sides by dx, we found that  du = 2x dxAll we did was substitute the x2 with u and the 2x dx with du. That's the change of variables that squeezes all the bricks just the right amount to turn a more complex integral to an simpler one. Indeed if the bricks were each dx wide in the original integral, they are each  du = 2x dx  wide in the substituted integral. That is, no matter where a brick is on the x axis, we've stretched its width by a factor of 2x and squeezed its height by the same factor. We find that

 ``` ``` ``` 1 1 1 u du = u2 + C = x4 + C eq. 11.3-5b 8 16 16 ```
Here we get from the u variable back to the x variable using the same substitution  (u = x2)  in reverse.

Of course we already knew how to integrate  f(x) = (1/4) x3  before we ever substituted variables. But this was just an example to show you how and why it works. It's not hard to come up with something that you wouldn't have already known how to integrate. For example, let's try

 ``` ``` ``` _______ x √ x2 + 1 dx eq. 11.3-6a ```
Now we keep our eyes open for one part of the integrand that is the derivative of another part. The problem is that the x that leads off the integrand, which is close not only to being the derivative of x2 but also to being the derivative of  x2 + 1,  is not quite what we want it to be. There's that factor of 2 you'd need to make it work out right. But suppose you multiply the integrand by 2/2. That doesn't change anything, right?

 ``` ``` ``` 2 _______ x √ x2 + 1 dx eq. 11.3-6b 2 ```
Now apply equation 11.2-3 to keep the 2 in the numerator with the integrand and move the 2 in the denominator outside of the integral

 ``` 1   2 ``` ``` ``` ``` _______ 2x √ x2 + 1 dx eq. 11.3-6c ```
Now the 2x is exactly the derivative of the  x2 + 1  that's under the radical. So let's make

```   u(x)  =  x2 + 1                                                eq. 11.3-7a
```
which makes
```  du
=  2x                                                       eq. 11.3-7b
dx
```
and then multiplying both sides by dx we get
```   du  =  2x dx                                                   eq. 11.3-7c
```
These substitutions tell us just how we need to squeeze our bricks to make the integral in equation
11.3-6c a whole lot simpler. We substitute u for  x2 + 1  and du for  2x dx  (notice that because multiplication is commutative, we can move the 2x so that it immediately precedes the dx, which is what makes this latter substitution possible). What we get is

 ``` 1   2 ``` ``` ``` ``` _ √u du eq. 11.3-8a ```
This we already know how to integrate. You can find its antiderivative in the table back in section 10.2, or you can apply equation 11.2-4f.

 ``` 1   2 ``` ``` ``` ``` _ √u du = ``` ``` 1   3 ``` ``` u3/2 + C eq. 11.3-8b ```
Now substitute back  x2 + 1  for u, and you have

 ``` 1   2 ``` ``` ``` ``` _ √u du = ``` ``` 1   3 ``` ``` u3/2 + C = ``` ``` 1   3 ``` ``` (x2 + 1)3/2 + C eq. 11.3-8c ```
Now use the chain rule to take the derivative of  (1/3)(x2 + 1)3/2  and see for yourself that you get back the original integrand we started with, which was

```      ______
x √x2 + 1
```

Let's try one that's a little trickier this time.

 ``` ``` ``` cot(θ) dθ eq. 11.3-9a ```
Perhaps you are asking yourself, "How does this have anything to do with finding one part of the integrand that is the derivative of another?" Or perhaps you already remembered (or looked up) how we define  cot(θ).  Recall that

```              cos(θ)
cot(θ)  =                                                      eq. 11.3-9b
sin(θ)
```
So we rewrite the original integral as

 ``` ``` ``` cos(θ) dθ eq. 11.3-9c sin(θ) ```
Now can you see one part of the integrand that is the derivative of another part? Clearly  cos(θ)  is the derivative of  sin(θ).  So if you let  u = sin(θ),  then

```   du
=  cos(θ)                                                  eq. 11.3-10a
dθ
```
and when you multiply both sides by dθ, you find
```   du  =  cos(θ) dθ                                               eq. 11.3-10b
```
So now substitute  sin(θ)  with u and substitute  cos(θ) dθ  with du:

 ``` ``` ``` cos(θ) dθ = sin(θ) ``` ``` ``` ``` du eq. 11.3-11a u ```
This now is an integral you've seen before. Look at equation 11.2.6c if you don't remember what it is. From that you get

 ``` ``` ``` cos(θ) dθ = sin(θ) ``` ``` ``` ``` du = ln|u| + C eq. 11.3-11b u ```
And for the last step, you substitute back using  u = sin(θ),  and you find

 ``` ``` ``` cot(θ) dθ = ln|sin(θ)| + C eq. 11.3-11c ```
Again I urge you to use the chain rule to find the derivative of  ln|sin(θ)|  and demonstrate to yourself that it gets you back to the original integrand.

### Review of the Simple Subsitution Method

Here are the steps you go through find the indefinite integral of a function using simple substitution of variables.

Step 1) Look for one part of the integrand that is the derivative of another. This is the only difficult part of this procedure. Sometimes you will have to algebraically munge the integrand to see it. For example, the integral we worked earlier might have been presented as

 ``` ``` ``` _______ √x4 + x2 dx ```
At first this does not look amenable to substitution. There is no clear piece that is the derivative of another piece. But when you see that you can factor an x2 out of  x4 + x2  and then bring that factor outside of the radical (it turns from being an x2 to being an x when you do that), then the attack strategy becomes clear (that is, we have munged it into the same integral we had in equation 11.3-6a). But recall that we still had to multiply this one by 2/2 and pull the denominator outside the integral before it worked out perfectly. So don't be afraid to bring some algebra manipulations to bear on an integral problem. You might have to experiment a bit before you see how to make it work.

Remember that when you do simple substitution, you are doing the chain rule in reverse. So the piece of the function that you find that is the derivative of another piece -- it must be a factor of the integrand. That is, you are trying to see how you can turn  f(x) dx  into  g(h(x)) h'(x) dx  by identifying a g and an h function that gives you this form and makes it equal to f(x). Hence the h'(x) piece must be multiplied by the rest of the expression. Here is an example where simple substitution wouldn't work because it fails that test:

 ``` ``` ``` dx ______ 2x √x2 + 1 ```
Certainly you can identify the 2x as being the derivative of  x2 + 1.  The problem is that the rest of the integrand is not multiplied by the 2x. On the other hand, the method works just fine on

 ``` ``` ``` 2x dx ______ √x2 + 1 ```
Why does this one admit the method of simple substitution? Because here the 2x does multiply the rest of the integrand. So we can say, let  u = x2 + 1,  and ...

Step 2) This is where you prepare your substitution variable. Mostly you take your substitution equation and find its derivative.

```   du
=  2x
dx
```
and then multiply through by dx to get  du = 2x dx.  When we substitute, the integral becomes

 ``` ``` ``` du _ √u ```
which is the same as

 ``` ``` ``` u-1/2 du ```
You can apply equation 11.2-4f to this one.

Step 3) This is where you make the substitution. You found one piece of the integrand that is the derivative of another piece. So you let u be equal to that other piece. When you find the derivative of u with respect to x and you multiply through by dx, you will see what expression you have to substitute with du. And whatever expression of x your u is, you substitute that expression with u throughout the rest of the integrand. It must substitute smoothly all the way through. That is, when you are done substituting both the u and the du, you must not have any x's left in the integrand. Here is an example of one that doesn't work because you can't substitute all the way through:

 ``` ``` ``` ______ 3x2 √x3 + x dx ```
When you see this one, you are drawn to the fact that 3x2 is the derivative of x3. So you let  u = x3  and  du = 3x2 dx.  But when you try to substitute, you are left with that x under the radical that has no exponent, and there's no way to substitute it. If instead you had

 ``` ``` ``` ______ 3x2 √x3 + 9 dx ```
Now you can say that 3x2 is the derivative of  x3 + 9.  Then  u = x3 + 9,  and  du = 3x2 dx.  When you substitute you get

 ``` ``` ``` _ √u du ```
which you already know how to integrate.

Step 4) Now that you've made the substitution to the new variable (we've been using u for that), you should have a new integrand that is easier to integrate than the original. So go ahead and integrate it in the new variable. But remember that this is not your final answer. To get your final answer, you must ...

Step 5) Substitute back to the original variable. We've been using x for that. In step 2 you came up with u (your new variable) as a function of x. So in the expression you got by integrating, substitute every occurrence of u with the expression in x that you used to make the original substitution. That will give you your final answer.

### Bending the Method

Suppose you needed to integrate

 ``` ``` ``` ______ (px + q)√rx + s dx eq. 11.3-12a ```
where p, q, r, and s are all constants. If you let  u = rx + s,  you'll find that  du = r dx.  If you use the trick of multiplying through by  r/r, you can rewrite this integral as

 ``` 1   r ``` ``` ``` ``` ______ (px + q)√rx + s r dx eq. 11.3-12b ```
which gives you the opportunity to substitute the  r dx  with du. The stuff under the radical can be substituted with u. But what do you do with that stuff to the left of the radical? When your substitution is linear, as it is here, you can do the following:

```   u  =  rx + s                                                 eq. 11.3-12c
```
Now solve for x:
```         u - s
x  =                                                         eq. 11.3-12d
r
```
So you can substitute the x to the left of the radical with this expression. When you do that along with all the other substitutions, you'll get

 ``` 1   r ``` ``` ``` ``` u - s p + q r ``` ``` ``` ``` _ √u du eq. 11.3-12e ```
Does this still look hard? Observe that taking the square root of something is the same as raising that something to the 1/2 power. When you express it that way, you can multiply the  u1/2  through all the other stuff to get

 ``` 1   r ``` ``` ``` ``` u3/2 su1/2 p - p + r r ``` ``` qu1/2 ``` ``` ``` ``` du eq. 11.3-12f ```

You've got some terms with a common factor of  u1/2  that you can gather. After that break it into a sum of two integrals:

 ``` p   r2 ``` ``` ``` ``` u3/2 du + ``` ``` ``` ```q - r ``` ``` ps   r2 ``` ``` ``` ``` u1/2 du eq. 11.3-12g ```
Make sure you understand how you would employ equations
11.2-3 and 11.2-13 to get this from the previous equation. You can now use 11.2-4f to integrate each of these summands:

 ``` p   r2 ``` ``` ``` ``` u3/2 du + ``` ``` ``` ```q - r ``` ``` ps   r2 ``` ``` ``` ``` u1/2 du = ``` ``` 2   5 ``` ``` p   r2 ``` ``` u5/2 + ``` ``` 2   3 ``` ``` ``` ```q - r ``` ``` ps   r2 ``` ``` ``` ``` u3/2 + C ``` ```       ``` ``` eq. 11.3-12h ```
Notice again that we didn't need to add the C of both of the results, because the sum of two undetermined constants is still an undetermined constant. So just one C was enough.

Again the final step is to substitute back using the original substitution,  u = rx + s.  That gives an answer of

 ``` 2   5 ``` ``` p   r2 ``` ``` (rx + s)5/2 + ``` ``` 2   3 ``` ``` ``` ```q - r ``` ``` ps   r2 ``` ``` ``` ``` (rx + s)3/2 + C eq. 11.3-12i ```
For this one, I will run through the mechanics of verifying this answer by taking the derivative. The reason is to demonstrate that sometimes when you take the derivative of your answer, you have to do some algebraic munging to get it back into the form of your original integrand. So immediately upon applying the chain rule to equation 11.3-12i, you get

 ``` p   r ``` ``` (rx + s)3/2 + ``` ``` ``` ``` ps q −   r ``` ``` ``` ``` (rx + s)1/2 eq. 11.3-12j ```
So how to munge this to the original integrand? First factor out a  (rx + s)1/2  from each of the two terms:

 ``` ``` ```p (rx + s) + r ``` ``` ``` ``` ps q −   r ``` ``` ``` ``` (rx + s)1/2 eq. 11.3-12k ```
When you multiply the  p/r  through the first term, you get

 ``` ``` ``` ps px + + r ``` ``` ``` ``` ps q −   r ``` ``` ``` ``` (rx + s)1/2 eq. 11.3-12l ```
The  ps/r  terms cancel each other, and now (once you observe that the 1/2 power is the same as the square root) you are left with the original integrand

### A Shortcut to doing Definite Integrals by Substitution

Suppose you were asked to do the following definite integral:

 ``` π/4 θ=0 ``` ``` sin(θ)cos(θ) dθ eq. 11.3-13a ```
The integrand is a clear candidate for simple substitution. Why? Because  cos(θ)  multiplies the rest of the integrand and is the derivative of  sin(θ).  So we let  u = sin(θ).  That makes  du = cos(θ) dθ.  But this is a definite integral. What do we do with the limits when we substitute our variables? The answer is that we substitute them as well. The limits in the original integral are in terms of θ. According to the substitution,  u = sin(θ),  when  θ = 0,  then  u = sin(0) = 0.  And when  θ = π/4,  then  u = sin(π/4) = √2/2.  So when you substitute everything, including the limits of integration, you get

 ``` π/4 θ=0 ``` ``` sin(θ)cos(θ) dθ = ``` ``` _ √2/2 u=0 ``` ``` u du eq. 11.3-13b ```
When you take the integral you get

 ``` π/4 θ=0 ``` ``` sin(θ)cos(θ) dθ = ``` ``` _ √2/2 u=0 ``` ``` u du = ``` ``` ``` ``` u2   2 ``` ``` _ √2/2 u=0 ``` ``` eq. 11.3-13c ```
Is there any need to substitute back in now? Remember that when you take a definite integral, you are after a number, not a function. And the expression on the right is indeed that number. When you evaluate that expression according to those limits you get

 ``` π/4 θ=0 ``` ``` sin(θ)cos(θ) dθ = ``` ``` _ √2/2 u=0 ``` ``` u du = ``` ``` ``` ``` u2   2 ``` ``` _ √2/2 u=0 ``` ``` 1 = eq. 11.3-13d 4 ```
which is the answer. If you did substitute back in the right-hand expression (including substituting back the limits) according to  u = sin(θ),  you would have gotten the exact same number (try it). See if you can see why.

The point is that when you do a definite integral using simple substitution, you can skip the step of substituting back at the end, but only provided that you remembered to substitute the limits of integration according to the same substitution equation you used on the rest of it. This is a useful shortcut, especially in a whole raft of basic physics problems.

### Exercises

1) Use simple substitution of variables to find the indefinite integral of

2) Use simple substitution of variables to find the indefinite integral of

3) Use simple substitution of variables to find the indefinite integral of

 ``` ``` ``` cos3(θ) dθ ```
Hint: Observe that  cos2(θ) = 1 - sin2(θ).  Once you use this identity, you will have to break the resulting integral into the difference of two integrals and integrate them separately. Apply simple substitution to just one of them (the other summand will be easy to integrate).

4) Use simple substitution of variables to find the indefinite integral of

 ``` ``` ``` 2θ cos(θ2) sin(θ2) dθ ```
Hint: Sometimes once is not enough.

5) Use simple substitution of variables to find the indefinite integral of

 ``` ``` ``` (3x2 - 6x + 2) dx   x3 - 3x2 + 2x - 9 ```

6) Use simple substitution of variables to find the indefinite integral of

 ``` ``` ``` ______ x √3x - 7 dx ```
Hint: Look at the paragraph titled
"Bending the Method". This exercise is in the same form as the problem detailed there except that one of the constants shown there is zero here. Apply the same method.

7) Use simple substitution of variables to find the indefinite integral of

 ``` ``` ``` dx   2(√x + 1 + 7) √x + 1 ```
Hint: Remember what happens when you take the derivative of a square root. You get one half of the reciprocal of the square root. Does that clue you in on what might be a good substitution to make here?