11.4 Integration by Parts
I could go and tell you another Oz story about how Follup and Gollup got
into a horrendous argument over whether they should begin laying yellow
bricks at one end of the road and work toward the other, or whether they
should start at the left edge of the road, and column by column over the
entire length of the road, proceed toward the right edge. But instead, this
time I'm going to dive right in with an example of integration by parts,
and later on you will see how the Munchkins' dispute relates to it.
To begin, review with me how you would go about finding the derivative of
f(x) = x ex eq. 11.4-1
This function is the product,
u(x)v(x), of the two functions,
u(x) = x and
v(x) = ex.
So your training in taking derivatives should immediately lead you to
the conclusion that you will need to use the
product rule. Applying
the product rule you have
d(x ex)
=
dx
|
d(u(x)v(x))
=
dx
|
dv
u(x) +
dx
|
du
v(x) =
dx
|
d(ex)
x + ex
dx
|
dx
dx
|
|
eq. 11.4-2a
|
We know that the derivative of
ex is
ex, and
we also know that
dx/dx = 1. So we can rewrite
the equation above as
d(x ex) d(uv) dv du
= = u + v = x ex + ex = (x + 1) ex
dx dx dx dx
eq. 11.4-2b
You will notice that I replaced
u(x) and
v(x) with
u and
v respectively. Don't worry, it means the same thing --
u and
v are both functions of
x
(if it helps your understanding, just visualize a "
(x)" following
every
u and
v for the remainder of this discussion). I also
stuck the
(x + 1) ex form at the end
for those of you who like to factor your answers. But the form of the derivative
I am really interested in here is the one before that, the
x ex + ex. So that
is the one I will keep in the next step of this illustration, where I will
take the indefinite integral of each expression:
|
|
d(x ex)
dx =
dx
|
|
d(uv)
dx =
dx
|
|
|
dv du
u + v
dx dx
|
|
dx =
|
|
(x ex + ex) dx
|
eq. 11.4-3a
|
Now look at the last two integrals in the line above. They are both integrals
of sums. Recall from equation
11.2-13b that
the integral of a sum is the sum of the integrals. So we can rewrite this as
|
|
d(x ex)
dx =
dx
|
|
d(uv)
dx =
dx
|
|
dv
u dx +
dx
|
|
du
v dx =
dx
|
|
x ex dx +
|
|
ex dx eq. 11.4-3b
|
Now look carefully at the first two expressions. What are they saying?
The first one is saying, "
the indefinite integral of the derivative of
x ex with respect to x."
The second one is saying, "
the indefinite integral of the derivative of
uv with respect
to
x." Back in section 10 you learned about
The Fundamental Theorem of Calculus.
What does it tell you about these two integrals?
Recall that the Fundamental Theorem of Calculus tells you that taking
a derivative and taking an indefinite integral are inverse operations
of each other. So by taking the indefinite integral of the derivative
of something, you end up getting back that same something (plus an undetermined
constant). Taking that into account, what do we have from equation 11.4-3b?
|
dv
u dx +
dx
|
|
du
v dx =
dx
|
|
x ex dx +
|
|
ex dx eq. 11.4-3c
|
If you look at the last term of the last expression, you will certainly say
to yourself, "Hey, I know how to integrate that." (and even if you don't,
it appears on the
table) So let's do it:
|
dv
u dx +
dx
|
|
du
v dx =
dx
|
|
x ex dx +
|
ex + C' eq. 11.4-3d
|
(where
C' is another undetermined constant).
Now equate just the first
and last expressions of this equation and subtract
ex + C' from both sides:
x ex - ex + C" =
|
|
x ex dx eq. 11.4-4
|
where
C" is the difference of the two constants (note that
we could just as well have put
C there, because, as we have
already discussed, one undetermined constant is as good as another).
Look carefully at what we've accomplished here. We have actually
found the indefinite integral of
x ex dx,
even though, up until now, we had no method with which to do so
(go ahead and take the derivative of
x ex - ex + C
to confirm that I speak the truth).
Outline of the Method
In order to see how to generalize what we've just done, look again
at equation 11.4-3d. You recall that
u = x, and
v = ex. But, looking
at the middle two expressions of equation 11.4-3d, these would be
equal to each other no matter what functions you chose for u
and v. So we extract those two expressions only:
uv + C =
|
|
dv
u dx +
dx
|
|
du
v dx eq. 11.4-5
dx
|
No matter what functions you choose for
u and
v
(provided both their derivatives exist), the product rule together with
the Fundamental Theorem of Calculus requires that equation 11.4-5 must
hold. Now subtract the last term from both sides:
uv + C -
|
|
du
v dx =
dx
|
|
dv
u dx eq. 11.4-6a
dx
|
|
This equation is at the heart of
integration by parts. If you know
u and
v and you can figure out how to do the first
integral in equation 11.4-6a, then this equation gives you a way
of finding the second integral in equation 11.4-6a.
In most texts you will find equation 11.4-6a in a slightly different form.
For one thing, when you do the first integral in it, you will get an
undetermined constant, which when subtracted from C is still an undetermined
constant. So usually they will leave out the C. Also, if you think of
dv/dx and du/dx as if they were fractions, then the dx's
appear to cancel. So most texts give you the equation in the following form:
uv -
|
|
v du =
|
|
u dv eq. 11.4-6b
|
This form might well be confusing to you at first, so whenever you see
it, simply reconstruct equation 11.4-6a form of it in your mind.
Let's apply equation 11.4-6a to a real integration problem to see
how the procedure works. We will integrate
|
x sin(x) dx eq. 11.4-7
|
Step 1: Choosing the parts.
In order to apply the method of
integration by parts, you must
first choose your parts. This means choosing
u and
v.
There are always at least two ways to choose them, but
usually only one of those ways leads to useful results. Often
you will have to rely on trial and error to determine which of
the ways to choose is the right one.
Choosing the parts means assigning the parts of your integrand to the
parts of the right-hand side of equation 11.4-6a.
The integrand is x sin(x).
The right-hand side of equation 11.4-6a has as its integrand:
dv
u
dx
So the two ways we can assign the parts to our integrand are either
u = x
|
and
|
dv
= sin(x)
dx
|
|
or
|
u = sin(x)
|
and
|
dv
= x
dx
|
For the purpose of this example, I will tell you that the first way,
in this case, is the path to useful results. Eventually you will have
to make this decision for yourself.
Step 2: What is v?
So if dv/dx = sin(x), then
how do you find v? The Fundamental Theorem of Calculus
says you need to integrate
v =
|
|
sin(x) dx = -cos(x) + C
|
(You can find this integral by looking it up on the
table)
It turns out that you can drop the undetermined constant, C, in this step.
Why? Because any function, v, that satisfies dv/dx = sin(x)
will do, and the one you get when you let C = 0 fills
the bill nicely. So why complicate your life? Hence we will just let
v = -cos(x). Putting the
parts we have
so far into equation 11.4-6a, we get
-x cos(x) + C -
|
|
du
-cos(x) dx =
dx
|
|
x sin(x) dx eq. 11.4-8a
|
Step 3: What is du/dx? Well you know that
u = x.
Just take the derivative. You find that
du/dx = 1.
Put that into equation 11.4-8a and simplify the signs a bit and you have
-x cos(x) + C +
|
|
cos(x) dx =
|
|
x sin(x) dx eq. 11.4-8b
|
Step 4: Do the remaining integral.
That integral on the left-hand side of the equal is one that you already
know from the
table. So look it up,
plug in what you find, and you get
-x cos(x) + sin(x) + C =
|
|
x sin(x) dx eq. 11.4-8c
|
(Observe that combining one undetermined constant with another
just gives you
C)
Once again I urge you to take the derivative of this result to
confirm that it is the right answer.
In the section on simple substitution, I advised you that sometimes
once is not enough. This is also true with integration by parts. For
example, let's use the new method to find the integral:
|
x2 e-x dx eq. 11.4-9
|
Step 1: Choosing the parts. There are a bunch of ways to assign the parts this time; here are
four:
|
a)
|
u = x2
|
and
|
dv
=
dx
|
e-x
|
|
b)
|
u = x
|
and
|
dv
=
dx
|
x e-x
|
|
c)
|
u = e-x
|
and
|
dv
=
dx
|
x2
|
|
d)
|
u = x e-x
|
and
|
dv
=
dx
|
x
|
If you pursue choice
c) or choice
d), you will quickly
find that they lead to integrals of
xn e-x
where
n > 2. In other words,
either of those two choices leads to integrals that are harder rather
than easier than the original. So we can eliminate them. Choosing either
choice
a) or choice
b) will lead to a solution, and because
a) is the more traditional route, let's start with it.
Step 2: What is v?
In this step we integrate dv/dx to find v. Using what you
have learned in previous sections, we find
v =
|
|
e-x dx = -e-x + C
|
and once again you drop the
C in this step in order to keep it simple.
So putting our selections for
u,
dv/dx, and the implied
v
into equation
11.4-6a, we get:
-x2 e-x + C -
|
|
du
-e-x dx =
dx
|
|
x2 e-x dx eq. 11.4-10a
|
Step 3: What is du/dx?
To find du/dx
we simply take the derivative of u = x2:
du
= 2x
dx
and with putting that in and doing a little housekeeping (canceling
the minus signs, moving the
2 outside the integral sign, and reordering
factors) we get:
-x2 e-x + C + 2
|
|
x e-x dx =
|
|
x2 e-x dx eq. 11.4-10b
|
which is fine, except that in order to do the integral to the left
of the equal, you have to apply
integration by parts again
(please note, however, that the exponent of the
x in that
integral has
decreased by one from the
x in the original integral
on the right, indicating that indeed the work we've done so far has moved this
thing in a favorable direction). So ...
Step 4: Doing the remaining integral involves going through
steps 1 through 3 again and then doing yet another step 4 at the end.
To avoid confusion, I'll call them steps 1a through 4a.
Step 1a: Choosing the parts, but this time the integrand
is x e-x. This is very
similar to the first example we did, so I'll show only the choice
of parts that we will actually use.
s = x
|
and
|
dt
= e-x
dx
|
|
|
Notice that I used different variable names here. Some teachers are
sticklers about that sort of thing and would want you to do it this
way, but this is only a matter of form. We could just as
easily have reused
u and v and still arrive at the same correct answer in the
end.
|
|
Step 2a: What is t?
This is the same as finding v in step 2. You have
dt/dx = e-x, and
so you get t = -e-x
(remembering to drop the undetermined constant). So putting in
what we have so far the left-hand integral of equation 11.4-10b
and applying equation 11.4-6a (except using s and
t instead of u and v) to that integral we have:
-x2 e-x - 2x e-x + C - 2
|
|
-e-x
|
ds
dx =
dx
|
|
x2 e-x dx eq. 11.4-10c
|
Step 3a: What is ds/dx?
Just take the derivative of s = x,
and you find that s = 1. Applying
that and cleaning up the signs, you get:
-x2 e-x - 2x e-x + C + 2
|
|
e-x dx =
|
|
x2 e-x dx eq. 11.4-10d
|
Step 4a: Doing the remaining integral is a piece of cake
(especially if you sneak a peek at the table). So the final
answer is
-x2 e-x - 2x e-x - 2 e-x + C =
|
|
x2 e-x dx eq. 11.4-11
|
But don't take my word for it. Take its derivative and check it yourself.
Using Integration by Parts to Integrate Inverse Functions
If you had followed along with this tutorial's entire development of integrals,
then you already did an example of integration by parts
back in section 10 without even knowing it. Click
here to review the trick I showed you back then for finding the
area under f(x) = x1/2.
This is an inverse of the x2 function.
Now let's see how we would attack it using integration by parts.
|
_
√x dx = ?
|
Step 1 is supposed to be choosing your parts, but how can you divide
this thing up into the product of a
u function and a
dv/dx
function? There's only one factor in the integrand. But is there? Isn't the
number,
1, a factor of anything? Suppose I choose the parts according
to
Step 2: What is v?
You find that by integrating 1 dx.
And what you get is v = x + C, from
which you drop the C. So shovel all this into equation
11.4-6a, and you have
_
√x x + C -
|
|
du
x dx =
dx
|
|
_
√x dx eq. 11.4-12a
|
Step 3: What is du/dx?
You just take the derivative of u:
_
du d(√x) 1
= = _
dx dx 2√x
Putting that in you have
_
√x x + C -
|
|
1
x _ dx =
2√x
|
|
_
√x dx eq. 11.4-12b
|
or, if you do a little algebra and then move the
1/2 outside the integral:
_
√x x + C -
|
1
2
|
|
_
√x dx =
|
|
_
√x dx eq. 11.4-12c
|
Step 4: Do the remaining integral -- Gotcha! The remaining integral
is no easier than the original. In fact it's the same as the original. So what
to do? What happens if you add that remaining integral (multiplied
by 1/2) to both sides?
_
√x x + C =
|
3
2
|
|
_
√x dx eq. 11.4-12d
|
Now just divide out the
3/2 and you're done.
2
3
|
x3/2 + C =
|
|
_
√x dx eq. 11.4-12e
|
Here again is the diagram from that trick we did back in section 10 to find
the area under the square root. Notice that the area of the rectangle is
_
√x x = x3/2
The trick was to subract the gray area (which is evaluated using an
integral) from the rectangle's area. That is, in essence, what we do
when we use integration by parts to find the integral of an inverse
function. Or to put it into the Munchkins' perspective, if we can't pave
the Yellow Brick Road from end to end, then we do it from one side to
the other.
But you already knew what the integral of the square root was.
Let's try this technique on something that you don't know the answer
to ahead of time. How about the integral of the inverse of the ex
function:
|
ln(x) dx
|
Step 1: Choose your parts.
We choose them the same way as in the previous example:
Step 2: What is v?
It's the same as in the last example: v = x.
So substitute what we have into equation 11.4-6a to get
ln(x) x + C -
|
|
du
x dx =
dx
|
|
ln(x) dx eq. 11.4-13a
|
Step 3: What is du/dx?
Of course you remember the derivative of the natural log.
du d(ln(x)) 1
= =
dx dx x
Putting that in and, canceling the
x's in the numerator
and denominator, we get
ln(x) x + C -
|
|
dx =
|
|
ln(x) dx eq. 11.4-13b
|
Step 4: Do the remaining integral.
This is the easiest of all integrals. So in the end you get
x ln(x) - x + C =
|
|
ln(x) dx eq. 11.4-13c
|
Exercises
1)
Find the indefinite integral:
|
e-ξωx cos(ωx) dx
|
You will have to apply two of the tricks you saw me use in the worked
examples above. One is applying the method more than once. The other
is the way you get around the
gotcha.
See if you can work this one through all the way, and then
click here to check your work.
Note the use of the symbols, ξ
and ω, as constant coefficients in this
integrand. These are chosen because engineers and physicists are fond of using
these same symbols (Greek letters xi and omega respectively)
in the context of damped sinusoids such as this. In this
context, ξ is called the
damping factor and ω is called
the radian frequency.
Important advisory:
If you work carefully on this problem, it will take you anywhere from 20 minutes
to over an hour to complete. There is a lot of fiddly work to do here -- keeping
careful account of all the signs and each of the xi's and omega's. It will behoove you
to keep your paper neat and skip several lines between each line of calculation.
Don't try to crowd anything in at the right-hand edge of your paper. If an
equation won't fit on one line, use two.
And don't rush it. Check each step once or twice before moving on to
the next step. If you find a mistake in one step, take a fresh sheet of paper and
do that step over on the new sheet, continuing from there exclusively on the new sheet.
And don't forget to take the derivative of your answer at the end as a final
check of its correctness.
2)
Find the indefinite integral:
|
arctan(x) dx
|
Note that
arctan(x) is an inverse function. Recall how it was
that we attacked inverse functions in the text above. To complete this
problem you will have to combine integration by parts with what you
learned in the last section about
simple substitution.
When you've worked it through,
click here
to see the solution.
3)
Find the indefinite integral:
|
x ln(x) dx
|
Depending upon how you attack this one, you might find that you
have to integrate
ln(x), which we already did in the
text above. If that
turns out to be the case, don't bother integrating by parts
a second time since the text already solves that part of
the problem for you; just substitute the solution in the
text for the integral of
ln(x). So have
at this one and then
click here
to see if your solution matches mine.
4)
Back in the third worked example, you
will recall that we had four ways to choose the parts. We eliminated c)
and d) because they both led to more complicated integrals. And then
in the text we solved it using approach a). Try doing it again here
using approach b). So integrate
|
x2 e-x dx
|
using the parts:
|
b)
|
u = x
|
and
|
dv
= x e-x
dx
|
And I'll give you a shortcut so you won't have to go a second round. The
gimme is that
|
x e-x dx =
|
-x e-x - e-x + C
|
When you're done,
click here to see my solution.
5)
You have already seen how integrating x ex
takes one round of integration by parts, and how integrating
x2 e-x takes two
rounds. It would be reasonable to expect that for any positive integer,
n, integrating
|
xn eax dx
|
is going to take
n rounds (notice that I slipped the
coefficient,
a, into the exponential. It will give your
solution more generality, and with that generality you will be able
to see some interesting consequences of this integral). You already
know that when
n = 0 (that is when
there is no
x term multiplying the exponential), that you don't
have to apply
integration by parts at all. For that case the
integral is
1
eax + C
a
What I'd like you to do is take the general case of integrating
xn eax through
just one round of
integration by parts. Then look carefully at the
result and see if you can use
induction to infer what you would
get after
n rounds of
integration by parts. Think about
what new terms will be generated on each round and what their coefficients
will be. On the last round you can infer that
n will be zero, and
you can use what we have above as the first rung of the induction ladder.
Most of what you've been doing in this section is turning the
integration-by-parts crank. By contrast the inference you have to make here
will require some deeper thinking. If you don't make any progress on it
at first, come back to it later when you've had some time to let the
problem percolate through your mind for a while.
When you have an answer, click here.
Return to Table of Contents
Move on to Trigonometric Substitution
You can email me by clicking this button: