As mentioned in the introduction to u-substitution, the remaining methods of integration of mostly just variations on substitution, and this next method, called integration by parts, is no exception.
Take the following example: ∫xsinxdx
We'd get frustrated trying to use u-substitution on this one, but we can take a hint from the structure: it's the product of two functions. Go back to what you know about derivatives: in that case we'd use the Product Rule. There's no Product Rule for integration, but it turns out that's still a helpful place to start.
Since dxd[u(x)⋅v(x)]=uv′+u′v,∫uv′+u′vdx∫uv′dx+∫u′vdx∫udxdvdx+∫vdxdudx∫udv+∫vdu=uv=uv=uv=uv
This all just looks like playing with symbols, but it leads to the formula that we'll use every time we use integration by parts:
∫udv=uv−∫vdu
The process has some similarities with u-substitution. Basically, we'll write the integral we're given to start with as the left hand side; to do that, we'll define half of it as u and the other half as dv. Then we'll need to find v and du, and use this formula to rewrite the given integral. After we do, we'll still have the integral ∫vdu to do, but if the process works, it'll be a doable integral.
First IBP
Evaluate ∫xsinxdx.
Solution
Our goal is to match ∫xsinxdx to ∫udv. The differential dx will always be part of dv, but the question is, should u be x and dv be sinxdx, or should they be swapped?
We'll find a shortcut to answer that question in a moment, but for now, we could just try both options and see which one works.
Try this: let u=x and let dv=sinxdx. Then, we need to find du and v. We already know how to find du - we'll do it the same way we did it during u-substitution. To find v from dv, we'll reverse the process - integrate dv.
u=x↓du=dxv=−cosx↑dv=sinxdx
Now just plug everything into the IBP (integration by parts) formula:
∫udv∫xsinxdx=uv−∫vdu=(x)(−cosx)−∫−cosxdx=−xcosx+sinx+C
Check
Differentiate the answer:
dxd[−xcosx+sinx+C]=−cosx+xsinx+cosx=xsinx
We happened to pick u and dv in such a way that it worked out, but what if we'd picked them the other way? Let's try that:
u=sinxdu=cosxdxv=21x2dv=xdx
Plugging these into the formula gives
∫udv=uv−∫vdu=21x2sinx−∫21x2cosxdx
This results in a more difficult integral instead of a simpler one, so we're headed in the wrong direction; that's what happens when we pick u and dv backwards.
We could always try the problem both ways and see which one works, but there's a quicker way.
How to pick u and dv: LIPTE
There's a shortcut to pick u and dv right the first time; there's no magic to it, but there's simply a pattern to what works, and it depends on the types of functions are in the problem.
Like in the example above, there will be two functions, typically multiplied together, and all we have to do is look at what kind of functions these are.
We'll use the acronym LIPTE for Logarithmic functions, Inverse trig functions, Power functions and polynomials, Trigonometric functions, and Exponential functions. The function that comes earlier in the list will be u and the other will be dv:
u↑↓dvLogarithmic functionsInverse trig functionsPower functionsTrig functionsExponential functions
For instance, in the example above, x is a power function and sinx is a trig function, so since x comes earlier in the list, we picked that as u.
With that, let's do some more examples.
Examples
Evaluate ∫5xexdx.
Solution
Here again, we have two functions: one (5x) is a power function and the other (ex) is an exponential function. Since P comes before E in LIPTE, let u=5x and dv=ex.
Then
u=5xdu=5dxv=exdv=exdx
and plugging these into the formula gives
∫udv∫5xexdx=uv−∫vdu=5xex−∫5exdx=5xex−5ex+C
∫xcosxdx
xsinx+cosx+C
∫tsin(2t)dt
−21tcos(2t)+41sin(2t)+C
∫x2sin(πx)dx
−π1x2cos(πx)+π22xsin(πx)+π32cos(πx)+C
Using IBP Twice
Evaluate ∫x2exdx.
Solution
This example looks very similar to the last one, and it starts the same way:
u=x2du=2xdxv=exdv=exdx
It's only when we plug all this into the formula that we notice the difference:
∫udv∫x2exdx=uv−∫vdu=x2ex−∫2xexdx
That integral on the right-hand side isn't one that we can do directly. However, it looks almost identical to the example we just finished doing, so it shouldn't come as a great surprise that we're going to use IBP again to finish solving this one.
It's important not to get sloppy in writing all of this down, because that can lead to simple mistakes.
Now if u=2x and dv=exdx (still using LIPTE), we can use the IBP formula to rewrite ∫2xexdx:
∫x2exdx=x2ex−∫2xexdx=x2ex−∫udv=x2ex−(uv−∫vdu)=x2ex−(2xex−∫2exdx)=x2ex−2xex+2ex+C
Notice the parentheses there; it's easy to forget those and have a sign error in your answer.
There are times when, after applying the IBP formula, the integral on the right-hand side needs more work. This may involve using integration by parts again, or it may involve u-substitution or some other method.
Evaluate ∫ylnydy.
Solution
We've got a log function and a power function, so LIPTE says we should let u=lny. Now be careful on this next step: you may be tempted to let dv=ydy, but if you did, the integral above wouldn't be exactly ∫udv. In other words, we have to pick u and dv so that the original problem is the product of the two. Thus, we should let dv=y1dy. To integrate that, rewrite it as y−1/2 and apply the Power Rule:
u=lnydu=y1dyv=2y1/2dv=y−1/2dy
Once we plug all this into the formula, we can finish integrating:
∫udv∫ylnydy=uv−∫vdu=2y1/2lny−∫2y1/2⋅y1dy=2y1/2lny−∫2y−1/2dy=2y1/2lny−4y1/2+C=2ylny−4y+C
∫p5lnpdp
61p6lnp−361p6+C
The Natural Log Function
Evaluate ∫lnxdx.
Solution
You may be tempted, when you see this, to automatically jump to the answer of x1, but that's only if you get the derivative and integral mixed up (which is a common enough mistake). We haven't encountered the integral of the natural log function yet, only its derivative.
As you may imagine based on where we see this problem, we're going to use integration by parts to solve it, but the difference from all the other problems is that there only appears to be one function.
Since the function we have occurs at the very top of the LIPTE scale, let's make that u and make dv simply equal dx.
Then following the process...
u=lnxdu=x1dxv=xdv=dx
At this point, you can memorize the integral of the natural log function if you like, or you can remember that we used integration by parts to find it, and you can re-derive it if needed.
I'll do one final (tricky) example, then leave you with several more to try on your own.
A Tricky One
Evaluate ∫exsinxdx.
Solution
Using LIPTE again, we can pick the following:
u=sinxdu=cosxdxv=exdv=exdx
Let's try the IBP formula:
∫udv∫exsinxdx=uv−∫vdu=exsinx−∫excosxdx
That integral on the right-hand side isn't one we can do directly, but we can use IBP again on it, like we've done before.
For this one,
u=cosxdu=−sinxdxv=exdv=exdx
This gets long, but the double IBP looks like this:
∫exsinxdx=exsinx−∫excosxdx=exsinx−(excosx+∫exsinxdx)=exsinx−excosx−∫exsinxdx
Well, this is awkward. This new integral also needs IBP; in fact, it's the exact integral we started with, so we're stuck in an infinite loop.
Here's the trick: we can solve for this integral like it is any variable. Add it to both sides, then divide by 2.
∫exsinxdx2∫exsinxdx∫exsinxdx=exsinx−excosx−∫exsinxdx=exsinx−excosx=21exsinx−21excosx