## Integration by parts practice problems

In a previous lesson, I explained the integration by parts formula and how to use it. Sometimes though, finding an integral using integration by parts isn’t as simple as the problem I did in that lesson. So I’d like to show some other more complex cases and how to work through them.

$$\mathbf{1. \ \int 4x^2 \ sin(5x) \ dx}$$ – Solution

$$\mathbf{2. \ \int xe^{-2x} \ dx}$$ – Solution

$$\mathbf{3. \ \int x^{\frac{3}{2}}ln(x) \ dx}$$ – Solution

## Example 1

Evaluate the integral $$\int 4x^2 \ sin(5x) \ dx.$$

I will proceed through this problem following the same steps that I used in the integration by parts lesson.

### 1. Picking u and dv

Remember, we want to pick the piece of our function that we’d rather differentiate to be u, and the piece we’d rather integrate to be dv. The integral we need to evaluate can clearly be thought of as the product of $$4x^2$$ and $$sin(5x)$$. Therefore, we need to take the derivative of one of these and the anti-derivative of the other.

First consider the $$4x^2$$ piece. If we take the derivative of this function we’ll end up with an x term, but if we take the anti-derivative we’ll end up with an $$x^3$$ term. This is due to the power rule. Generally it’s best to choose whichever will result in the simplest option. When it comes to polynomials, the simpler one is whichever has the lower power. Therefore, it is preferred to take the derivative of the $$4x^2$$ piece because the x term resulting from the derivative is simpler than the $$\mathbf{x^3}$$ term resulting from taking the anti-derivative.

But before we say that we definitely want to assign the $$4x^2$$ to be u so that we can take its derivative, we want to think about what this will mean for the sin(5x) piece.

What we need to consider is the difference between taking the derivative and the anti-derivative of sin(5x). In either case, we will end up with some constant multiplied by cos(5x) (we can find this using the chain rule for the derivative or u-substitution for the anti-derivative). But you can see that the derivative and the anti-derivative of this piece are equally complex, so it doesn’t make much of a difference whether we say the sin(5x) piece is assigned to u or dv.

Since the derivative of $$4x^2$$ is much simpler than its anti-derivative, we would rather call it u than dv. And it doesn’t make a difference if sin(5x) is considered to be u or dv. So we will say $$u=4x^2$$ $$dv=sin(5x) \ dx.$$

### 2. Finding v and du

Now to find v we simply need to take the anti-derivative of the dv piece from the previous section. And to find du we need to take the derivative of u.

You can find the anti-derivative of sin(5x) by using u-substitution. I’m not going to show all the steps for this, but we will need to use the fact that the anti-derivative of sin(x) is -cos(x). Knowing this, we can find that the anti-derivative of sin(5x) would give us $$v=- \ \frac{1}{5} cos(5x).$$

Now that we have found v, let’s move onto finding du. This can simply be done by finding the derivative of u from part 1. Finding the derivative of $$4x^2$$ can simply be found using the power rule. Doing this gives us $$du=8x \ dx.$$

### 3. Plugging it all into the formula

Now that we have found all 4 of the pieces we need, we just have to plug them into the integration by parts formula. To summarize, the 4 pieces we have up to this point are $$u=4x^2$$ $$dv=sin(5x) \ dx$$ $$v=- \ \frac{1}{5} cos(5x)$$ $$du=8x \ dx.$$

So we just need to use the integration by parts formula with these. $$\int u \ dv = uv – \int v \ du$$ $$\int 4x^2 \ sin(5x) \ dx = \Big(4x^2\Big) \bigg(- \ \frac{1}{5} cos(5x) \bigg) – \int – \ \frac{1}{5} cos(5x) \ 8x \ dx$$

Now we can simplify and evaluate the integral on the right side of our equation. $$(1): \ \int 4x^2 \ sin(5x) \ dx = \ – \ \frac{4}{5} x^2 \ cos(5x) \ + \ \frac{8}{5}\int x \ cos(5x) \ dx$$

But notice, the integral on the right side of our equation is still fairly complex. We still have an integral which is the product of two simpler functions, x and cos(5x). In order to evaluate this integral we’ll actually need to use integration by parts again. So now we need to use integration by parts to evaluate $$\int x \ cos(5x) \ dx.$$ We’ll go ahead and follow the same steps as we did before, but now we have a new integral and will need to reassign our u and dv.

### 4. Picking u and dv

Now that we are going through this process a second time, we don’t really have much of a choice when we pick which piece will be u and dv. The reason for this is that we will need to make this determination based on what we did the first time through. Consider where each of our pieces came from. One of our pieces is x, which came from the $$4x^2$$ in our original integral. And the other piece is cos(5x) which came from the sin(5x) in the original integral.

Since the x piece in our current integral came from the $$4x^2$$ piece in the original integral, and we decided that the $$4x^2$$ piece would be u earlier, we need to follow up by doing the same here. Therefore, we will say $$u=x$$ this time around.

By the same reasoning, we will need to say that $$dv = cos(5x) \ dx$$ this time around since we said assigned the sin(5x) to dv the first time through.

### 5. Finding v and du

Now we just need to take the u and dv from the previous step and use them to find v and du.

To find v we just need to find the anti-derivative of dv. We previously decided that $$dv = cos(5x) \ dx$$. Just like before, we can find this anti-derivative using u-substitution. Doing this tells us that $$v = \frac{1}{5} sin(5x).$$

And now we just need to find du by taking the derivative of u. Since we know $$u = x$$, we know that $$du=dx.$$

### 6. Plugging it all into the formula

And finally we just need to plug the 4 pieces we have found into the integration by parts formula. So far we have found $$u=x$$ $$dv = cos(5x) \ dx$$ $$v = \frac{1}{5} sin(5x)$$ $$du=dx.$$

Now putting these into the integration by parts formula we find $$\int u \ dv = uv – \int v \ du$$ $$\int x \ cos(5x) \ dx \ = \ x \bigg( \frac{1}{5} sin(5x) \bigg) \ – \int \frac{1}{5} sin(5x) \ dx$$ $$\int x \ cos(5x) \ dx \ = \ \frac{1}{5} x \ sin(5x) \ – \ \frac{1}{5} \int sin(5x) \ dx$$

And now the integral we need to evaluate is much simpler than what we started with. $$\int x \ cos(5x) \ dx \ = \ \frac{1}{5} x \ sin(5x) \ – \ \frac{1}{5} \bigg( – \frac{1}{5} cos(5x) \bigg)$$ $$\int x \ cos(5x) \ dx \ = \ \frac{1}{5} x \ sin(5x) \ + \ \frac{1}{25} cos(5x)$$

### Wrapping it all together

Now that we have found $$\int x \ cos(5x) \ dx \ = \ \frac{1}{5} x \ sin(5x) \ + \ \frac{1}{25} cos(5x)$$ we can bring this back to our equation (1) back in step 3. And all we need to do is replace the $$\int x \ cos(5x) \ dx$$ with $$\frac{1}{5} x \ sin(5x) \ + \ \frac{1}{25} cos(5x)$$. Doing this tells us that $$\int 4x^2 \ sin(5x) \ dx = \ – \ \frac{4}{5} x^2 \ cos(5x) \ + \ \frac{8}{5}\int x \ cos(5x) \ dx$$ $$= \ – \ \frac{4}{5} x^2 \ cos(5x) \ + \ \frac{8}{5} \bigg( \frac{1}{5} x \ sin(5x) \ + \ \frac{1}{25} cos(5x) \bigg)$$ $$= \ – \ \frac{4}{5} x^2 \ cos(5x) \ + \ \frac{8}{25} x \ sin(5x) \ + \ \frac{8}{125} cos(5x)$$

And that’s our answer! Clearly a bit more complicated than the first integration by parts example I did, but it isn’t too bad. You essentially just need to apply the same process two time in a row. As long as you stay consistent in your designations of u and dv each time, it should all work out in the end.

## Example 2

$$\int xe^{-2x} \ dx$$

We’ll start this by deciding which piece we’ll call u and which piece is dv.

$$u=x$$ $$dv=e^{-2x} \ dx$$

Then we need to use these to figure out du and v.

$$du=1 \cdot dx=dx$$ $$v=-\frac{1}{2}e^{-2x}$$

Now we can plug all 4 of these pieces into the integration by parts formula.

$$\int xe^{-2x} \ dx \ = \ x \bigg( -\frac{1}{2}e^{-2x} \bigg) – \int -\frac{1}{2}e^{-2x} \ dx$$

At this point we are left with a simpler integral to evaluate.

$$= -\frac{1}{2}xe^{-2x} + \frac{1}{2} \int e^{-2x} \ dx$$ $$= -\frac{1}{2}xe^{-2x} + \frac{1}{2} \bigg( -\frac{1}{2} e^{-2x} \bigg)$$ $$= -\frac{1}{2}xe^{-2x} – \frac{1}{4} e^{-2x}$$ $$= -\frac{1}{2}e^{-2x} \bigg( x + \frac{1}{2} \bigg)$$

## Example 3

$$\int x^{\frac{3}{2}}ln(x) \ dx$$

We’ll start this by deciding which piece we’ll call u and which piece is dv.

$$u=ln(x)$$ $$dv=x^{\frac{3}{2}} \ dx$$

Then we need to use these to figure out du and v.

$$du=\frac{1}{x} \ dx$$ $$v=\frac{2}{5}x^{\frac{5}{2}}$$

Now we can plug all 4 of these pieces into the integration by parts formula.

$$\int x^{\frac{3}{2}}ln(x) \ dx \ = \ \frac{2}{5}x^{\frac{5}{2}} ln(x) \ – \int \frac{1}{x} \cdot \frac{2}{5}x^{\frac{5}{2}} \ dx$$

At this point we are left with a simpler integral to evaluate.

$$= \ \frac{2}{5}x^{\frac{5}{2}} ln(x) \ – \ \frac{2}{5} \int x^{\frac{3}{2}} \ dx$$ $$= \ \frac{2}{5}x^{\frac{5}{2}} ln(x) \ – \ \frac{2}{5} \cdot \frac{2}{5} x^{\frac{5}{2}}$$ $$= \ \frac{2}{5}x^{\frac{5}{2}} \bigg( ln(x) \ – \ \frac{2}{5} \bigg)$$

As always, let me know if you have any questions. If anything was confusing here leave a comment or send me an email at jakesmathlessons@gmail.com and I’ll get back to you with an answer. You can also use the contact form below to reach out and I’ll send you my FREE calculus 1 study guide as a bonus! Also check out my other lessons about integrals!

## Integration by parts

Integration by parts is another common technique used to find complex antiderivatives. This method tends to be a little more straight forward in its application than u-substitution. The main reason for this is that it requires the use of a formula, and if you can follow the formula you should be able to work through the rest.

First let’s introduce the formula, then I’ll explain how to use it. If you already know how to do these and you’re looking for extra practice problems, click here.

$$\int u \ dv = uv- \int v \ du$$

All this formula is really saying is that if we need to integrate some function which can be thought of as the product of two pieces, u and dv, then we can rewrite our integral in this other form. Notice we still would have an integral to solve after using this formula. But the hope is that $$\int v \ du$$ is easier to find than $$\int u \ dv$$.

## But how do you use the formula?

Using the integration by parts formula can be broken down into 3 simple steps and is going to start out somewhat similarly to integrating with u-substitution.

### 1. Picking u and dv

The first thing we need to do to use this formula is decide which piece of our function will be called u and which piece will be called dv. As we work through this problem, we will eventually need to work with the derivative of u and the antiderivative of dv. Therefore, to decide which piece we want to be u and dv, we should also consider the derivative and antiderivative of the pieces.

Let’s consider the following integral which we will find using integration by parts.

$$\int xsin(10x) \ dx$$

Clearly we can see that we are being asked to integrate some function which is the product of two smaller functions. It is the product of x and sin(10x). Therefore, between x and sin(10x), we will need to call one of these u and the other will be dv.

#### Does it matter which is which?

Yes, it does matter. You will need to take the derivative of u and the antiderivative of dv. So you want to pick one to be u and the other to be dv so that the derivative of u and the antiderivative of dv are easiest to work with.

Consider this: the sin(10x) term can be either u or dv. The reason for this is that whether you take the derivative or the antiderivative of sin(10x), the result will be some constant multiplied by cos(10x). As a result, it doesn’t make much of a difference whether we call sin(10x) the u or the dv.

Let’s think about the x term. If we call it u and have to work with its derivative, we’ll make things pretty easy on ourselves. I say this because the derivative of x is just 1. Alternatively, if we make x be dv and take it’s antiderivative, we will need to work with an $$\mathbf{x^2}$$ term (due to the power rule). Therefore, it will be a lot easier to work with the derivative of x than it will be to work with it’s antiderivative. This tells us that it’ll be easiest to call x the u piece.

Since it doesn’t matter what we call the sin(10x) term, but it’ll be a lot easier to make x be the u piece, we will say

$$u=x$$

$$dv=sin(10x) \ dx.$$

### 2. Finding v and du

Now that we have determined our u and dv, we need to use these to calculate v and du. To find du we just need to take the derivative of u.

$$\frac{du}{dx} = \frac{d}{dx} \big[ x \big]$$

$$\frac{du}{dx} = 1$$

Now we can just imagine multiplying both sides by dx to find

$$du=dx.$$

And to find v we just need to take the antiderivative, or the integral, of dvYou can do this using u-substitution with $$u = 10x$$, but I will use WolframAlpha.

$$v = \int sin(10x) \ dx$$

$$v = – \frac{1}{10} cos(10x)$$

### 3. Plugging it all into the formula

Once you have laid out all four of the pieces we need, we can plug them all into the integration by parts formula. Just so we have everything in one place, let’s list out everything we have up to this point.

$$u=x$$

$$du=dx$$

$$v= – \frac{1}{10} cos(10x)$$

$$dv= sin(10x) \ dx$$

Now going back to the integration by parts formula I mentioned earlier, we can plug all of these in to the formula.

$$\int u \ dv = uv- \int v \ du$$

$$\int xsin(10x) \ dx = (x)\bigg( – \frac{1}{10} cos(10x) \bigg) – \int \bigg(- \frac{1}{10} cos(10x) \bigg) \ dx$$

Before integrating, let’s simplify this as much as we can by pulling the constant out of the integral.

$$\int xsin(10x) \ dx = \ – \frac{1}{10} xcos(10x) + \frac{1}{10} \int cos(10x) \ dx$$

Notice, the integral we need to compute now is much simpler than the integral we started with. This will be similar to the integral we computed to find v earlier. We can use u-substitution to find this by using $$u=10x$$. I’m not going to show these steps, but I encourage you to work this out on your own!

$$\int xsin(10x) \ dx = \ – \frac{1}{10} xcos(10x) + \frac{1}{10} \bigg( \frac{1}{10} sin(10x) \bigg) + c$$

$$\int xsin(10x) \ dx = \ – \frac{1}{10} xcos(10x) + \frac{1}{100} sin(10x) + c$$