Review 4: Integration by Parts
The product rule says that
ddx(F(x)G(x))=F′(x)G(x)+F(x)G′(x),
so by integrating both sides and applying the fundamental theorem of calculus we have
F(x)G(x)+C=∫F′(x)G(x)dx+∫F(x)G′(x)dx.
Rearranging this equation, we get
∫F(x)G′(x)dx=F(x)G(x)−∫F′(x)G(x)dx.
You might be wondering where the +C went. Since indefinite integrals are not just a function but a family of functions corresponding to different values of C and we have an indefinite integral on both sides of the equation, we can absorb the
+C into
∫F(x)G′(x)dx.
Let's rewrite the above equation with notation you may be more familiar with. Let F(x)=u,G(x)=v, so that
dudx=F′(x) and
dvdx=G′(x).Then if we agree that
dudxdx=du and
dvdxdx=dv we get the more familiar
∫udv=uv−∫vdu.
Because integration by parts has an integral on each side of the equation, one uses integration by parts to trade a more complicated integral for a less complicated integral.
A Few Examples
1. Compute ∫xexdx.
This is a typical example of an indefinite integral where integration by parts is clearly able to help. Let u=x and
dv=exdx. Then
du=dx and
v=ex, implying
∫xexdx=xex−∫exdx=xex−ex+C.
Notice that through integration by parts we traded the more complicated integral ∫xexdx for the simpler
∫exdx.
2. Compute ∫arcsin(x)dx.
At first this does not look like a problem that can be solved by integration by parts; after all there is only one function in the integrand, not two as in the above formula. Keep in mind however, that we can always choose one of the two functions to be 1. Since we know that ddxarcsin(x)=1√1−x2let's pick
u=arcsin(x)⟹du=1√1−x2dx, leaving
dv=dx⟹v=x. Thus applying integration by parts,
∫arcsin(x)dx=xarcsin(x)−∫x√1−x2dx.
Again we traded an unknown integral for one that is hopefully a little more familiar. Using the substitution w=1−x2⟹dw=−2xdx we can transform the above into
∫arcsin(x)dx=xarcsin(x)−∫−12w−1/2dw=xarcsin(x)+w1/2+C=xarcsin(x)+√1−x2+C.
3. Compute ∫sin3(x/4)cos(x/4)(ln(sin(x/4))2dx.
First let's make our lives a little easier. Notice that because of the presence of cos(x/4) we can make a substitution
z=sin(x/4)⟹dz=1/4cos(x/4)dx so that
∫sin3(x/4)cos(x/4)(ln(sin(x/4)))2dx=∫4z3(ln(z))2dz.
Then we will integrate by parts with u=(ln(z))2,dv=4z3dz⟹du=2lnzzdz,v=z4. Then applying the formula we get
∫4z3(ln(z))2dz=z4(ln(z))2−∫z42lnzzdz=z4(ln(z))2−∫2z3lnzdz.
We still cannot integrate the last integral directly, but it is simpler than before. Let's try applying integration by parts a second time, with u=lnz,dv=2z3⟹du=1z,v=z42, so that
∫2z3lnzdz=z42lnz−∫z421zz=12z4lnz−12∫z3dz=12z4lnz−z48+C.
Plugging this back into our original problem, we get
∫sin3(x4)cos(x4)(ln(sin(x4)))2dx=∫4z3(ln(z))2dz=z4(ln(z))2−(12z4lnz−z48)+C=sin4(x4)((ln(sin(x4)))2−12ln(sin(x4))+18)+C.
Remark: Sometimes it can be hard to determine whether integration by parts applies, and if so, which choices of u and v will lead somewhere. Practice and trial and error will help the most with improving your skill. Generally speaking you want to pick your function u to be something that gets simpler when differentiated, and
dv to be a function which you know how to integrate.
4. Compute ∫exsin(x)dx.
This integral is clearly suited to integration by parts, the integrand being a product. We will see the situation is a little more complicated, however.
Approach a) Let u=sin(x) and
dv=ex. Then
∫exsin(x)dx=exsin(x)−∫excos(x)dx.
The resulting integral is not much simpler than before. Let's try integration by parts again with u=cos(x) and
dv=ex. Then
∫excos(x)dx=excos(x)+∫exsin(x)dx.
Notice that the resulting integral from this second integration by parts is the initial integral, which allows us to use a technique sometimes called doubling back. Putting both steps together, we see
∫exsin(x)dx=exsin(x)−excos(x)−∫exsin(x)dx.
Since the same integral appears on both sides of this equation, we can algebraically move it to one side and solve for it.
∫exsin(x)dx=exsin(x)−excos(x)−∫exsin(x)dx2∫exsin(x)dx=exsin(x)−excos(x)+C∫exsin(x)dx=12(exsin(x)−excos(x))+C.
You may be wondering where the C came from. Since antiderivatives are families of functions, not functions themselves, there is a variable
C on either side of the equation that has been subsumed into the two integrals on each side. When we remove one of those integrals, we still require a
C on each side to stay balance.
Unlike previous examples, for this problem it does not matter which functions we choose to be u and
dv as long as we're consistent in our choice.
Indeed, let's try this problem again, picking u=ex,dv=sin(x). Then
∫exsin(x)dx=−excos(x)+∫excos(x)dx,u=ex, dv=cos(x)dx=−excos(x)+exsin(x)−∫exsin(x)dx2∫exsin(x)dx=exsin(x)−excos(x)+C∫exsin(x)dx=12(exsin(x)−excos(x))+C.
This is the same answer as before.
Now let's see what happens if we are not consistent in our choices of u and
dv. Notice we picked first
u=sin(x),dv=ex then
u=cos(x),dv=ex. If we had instead picked
u=ex,dv=cos(x) for the second step of integration by parts, we would get
∫exsin(x)dx=exsin(x)−∫excos(x)dx=exsin(x)−exsin(x)+∫exsin(x)dx∫exsin(x)dx=∫exsin(x)dx.
as you can see, this choice of integration by parts undoes our previous work, getting us back where we started.