Professor Dave again, let’s learn to integrate by parts.
As we attempt to evaluate more complex integrals, we need to learn a few tricks. Most of these
are rules of integration that correspond to particular rules of differentiation. The substitution
rule, which we just learned, works kind of like the chain rule for differentiation. The
product rule for differentiation also has a corresponding technique for integration,
and it is called integration by parts, so let’s learn this technique now.
Let’s quickly recall the product rule. It says that the derivative of a product of two
functions is equal to the first times the derivative of the second, plus the derivative
of the first times the second. Well we know that we can always go backwards by integrating,
so the integral of this derivative must be the product of the two functions that we started
with. Now let’s work with this expression a little bit to get something more useful.
We know that the integral of a sum is equal to the sum of integrals, so let’s split
this integral up into two separate ones. And then, let’s bring the second integral over
to the other side of the equation by subtraction. And there we have the formula for integration
by parts. It may look like we haven’t done much, but this is actually quite powerful,
because up until now we haven’t had any way to integrate a product of two functions,
other than the substitution rule if we were lucky enough that one part was the derivative
of the other. But here, we can see that if we have the product of two functions, to integrate,
we simply list the first function times the antiderivative of the second function, since
the antiderivative of g prime is simply g, and subtract from that the integral of the
antiderivative of the second function times the derivative of the first function. An easier
way to remember all this is to represent f of x as u, and g of x as v. Then the first
integral becomes u dv, and then we have uv, minus the integral of v du. The thing to keep
in mind here is that while we can apply the technique to any integrand that is a product
of functions, sometimes this will make things simpler, and sometimes it won’t. You’ll
notice that the technique leaves us with a different integral to evaluate, and if this
one is no simpler than what we started with, then this technique is not very useful. But
let’s look at some examples where this approach works like a charm, and you’ll get a better
sense of exactly when to use it. Let’s try to integrate x sine x dx. Before
we start getting used to u’s and v’s, let’s just use the first formula, with f
and g. Here’s a hint. We know that between these two functions, x, and sine x, one of
them will be f and the other will be g prime. The trick is that we want the function that
becomes much simpler when differentiated to be f, because f prime will remain in the integral
over here, and we will want to be able to evaluate this integral easily. So let’s
use x as f of x, because its derivative is one, which is as simple as it gets. So in
the first integral, x will be f of x, and sine x will be g prime of x. Then to see what
this integral is equal to, the first term will be f of x times g of x, so it’s x times
the antiderivative of sine x, which we know is negative cosine x. So that’s negative
x cosine x. Now to evaluate the other integral. We know that g of x is negative cosine x,
as we just said, but here’s the best part. F prime of x is one. So this second integral
is simply negative cosine x. We can take out the negative sign to cancel out the first
one. Cosine x is trivial to integrate, it’s sine x. So we are left with negative x cosine
x plus sine x, plus C. So bear in mind that the reason this worked is because we chose
the function for f of x that would yield an f prime function that would make this second
integral much easier to evaluate than the first. In this case that was x, because its
derivative is one. Choosing sine x would have been a bad idea, because its derivative is
just another trig function, cosine, and the other integral wouldn’t have been any easier
to evaluate, so this method wouldn’t work. Let’s now just explain the other notation
we will have to learn, using the same example. We could also have written this with a u in
the first integral instead of x, and then dv instead of sine x dx. That’s because
dv is the derivative of v, which is the g of x that was found by taking the antiderivative.
So always make sure the dx is part of the dv. Then this ended up equaling uv, minus
the integral of v du. The reason this is useful is because if we set up these relationships
for which function represents what, then we can just write out the answer this simpler
way, and plug everything back in according to our assignments to evaluate. Let’s try
another and you’ll see what I mean. Say we want to integrate the natural log of
x dx. This is not a common integral, and it also doesn’t appear to be a product. But
let’s see how we actually can integrate by parts. We have to assign u and dv first,
and here there is only one option, as there is only one function. Natural log of x will
become u, and dx will become dv. When we write out the answer we will also need du, which
is the derivative of u, and that’s one over x dx. And we need v, which is the antiderivative
of dv, so from dx we get x. Now we just use the formula. The product uv will be the natural
log of x times x, or x LN x. Then we subtract from that the integral of v du. V is x and
du is one over x dx, so the x’s cancel, leaving us with simply dx. Integrating dx
gives us x, and our final answer is x LN x minus x plus C. So once again, we took an
integral that we couldn’t evaluate, and turned it into a different expression with
a different integral in it, that happened to be much easier to evaluate. This won’t
always work, but when it does, it certainly is useful.
Let’s do a few examples that are slightly more difficult, just to make sure we understand.
First, let’s integrate the natural log of x over x squared, dx. Here we have to choose
which is u and which is dv. Let’s try natural log of x for u. So u equals natural log of
x, and dv is the rest, or dx over x squared. That means du is one over x dx, or dx over
x, which does look simpler, like we intended, and for v, we realize that integrating x to
the negative two gives us x to the negative one over negative one, which is negative one
over x. So to evaluate this, we write uv, which here will be LN x times negative one
over x, or negative LN x over x. Then we subtract the integral of v du, which will be negative
one over x times one over x dx. We can take the negative out to cancel out the first,
making this a plus sign, and inside the integral we have one over x squared, dx, or x to the
negative two dx. We can integrate this to get negative one over x once more, so we end
up with negative LN x over x, minus one over x. We can combine those fractions, and that’s
the answer, remembering to add plus C, as we always do when dealing with indefinite
integrals. It may not look great, but if that’s what we get, then that’s what it is, no
matter how pretty or ugly. How about one more for good measure. Let’s
evaluate the integral of the natural log of x, quantity squared, dx. Here we have only
one choice, u will be this term, and dv will simply be dx. So getting du will require the
chain rule, and we get two times LN x, times the derivative of LN x, which is one over
x, so that gives us two LN x over x, dx. Getting v is no problem, from dx we just get x. So
plugging things in, uv will be x times LN x quantity squared, then we subtract from
that the integral of x times two LN x over x. The x’s cancel, leaving us with two LN
x. Let’s take out the two to get simply LN x. Well we can’t integrate this normally,
but as we saw in an earlier example, we can integrate this by parts, so we just repeat
this process. It may seem unfair to have to do this twice, but in performing this technique
we produce a new integral, and if that second integral must be integrated by parts, then
that’s just what we have to do. Let’s put some brackets around this integral so
that we don’t make any careless arithmetic errors. Just as before, u will be LN x, dv
will be dx, and that makes du equal to dx over x, and v equal to x. So all still within
these brackets, we can rewrite this integral as x LN x minus the integral of dx. That integral
becomes x, so it’s x LN x minus x, and then we can distribute this two from before across
this term, which will all together give us x LN x quantity squared minus two x LN x,
plus two x, plus C. So integration by parts is just another technique
in our bag of tricks that we can use to evaluate integrals. The substitution rule works well
when the integrand is the product of a function and its derivative, or close to it. Integration
by parts works when the two functions are not related at all, but one of them becomes
much simpler when differentiated, which makes the new integral easier to solve than the
original one. We have one more trick to learn regarding integration, but before we move
on to that, let’s check comprehension.