Young woman in a thoughtful pose standing in front of a blackboard that is covered in equations

Integration techniques: Integration by Parts, Example 1

For this example, we will integrate

∫3x2sin(x) dx

using the formula for integration by parts:

u dv = uv – ∫v du

(If you need an overview of the steps, please visit my page that explains how to do integration by parts.)

Step 1: Choose u and dv


Looking at our equation, 3x2 looks like a good option for u because algebraic is higher on our list than trigonometric functions.

dv is then whatever is left that is not u; in this case, it is sin(x) dx.

3x2sin(x) dx

Step 2: Calculate du and v

If u = 3x2, then taking the derivative of both sides of the equal sign gives us
du = 6x dx

dv is sin(x) dx
so
v = ∫sin(x) dx = −cos(x) + C

(Remember to add the constant!)

To recap:

Choose: Choose:
u = 3x2 dv = sin(x) dx
Calculate du by taking the derivative of u: Calculate v by integrating dv:
du = 6x dx  v = −cos(x) + C

Tip: Use a table like this to keep track of your work when solving problems like this.

Step 3: Apply the Integration by Parts Formula

You now have the four pieces you needed to find in order to use the Integration by Parts formula. Plug u, du, v, and dv into the formula, and what you get should (hopefully!) be much easier to solve than the original integral. (If it isn’t easier, check to see if a different technique like Integration by Substitution might be more appropriate.)

Now we can plug into our formula for Integration by Parts:

u dv = uv − ∫v du

(1)  ∫3x2sin(x) dx = 3x2(−cos(x)) − ∫(−cos(x)) (6x dx) + C

We’re getting closer to a solution, but we aren’t there yet. Now we need to solve the new integral.

Step 4a: Solve the New Integral

We now have a new integral on the right side of the equationthat we need to solve. Sadly, there is still a product of functions in the new integral, so we need to run through all of the previous steps for this new one. (Always allow plenty of time to work these sorts of problems!)

Let’s use the table to run through solving this new integral:

−cos(x) 6x dx

Choose: Choose:
u = 6x dv = −cos(x) dx
Calculate du by taking the derivative of u: Calculate v by integrating dv:
du = 6 dx  v = −sin(x) + C

Now apply the Integration by parts formula to this part:

u dv = uv − ∫v du

(2)  ∫6xcos(x)dx = 6x(−sin(x)) − ∫(−sin(x)) (6 dx) + C

Step 4b: Solve Yet Another New Integral

We now have one last integral to solve. Fortunately, this one is straightforward and much easier.

(3)  ∫−sin(x)6 dx = −6∫sin(x)dx = −6cos(x)+ C

Step 5: Put the pieces together

Remember: After writing down your final answer, always tack on a ” + C ” for the unknown constant to the end of your answer.

Here’s a summary of our partial results from the steps above:

(1)  ∫3x2sin(x) dx = 3x2(−cos(x)) − (−cos(x)) (6x dx) + C

(2)  ∫−6xcos(x)dx = 6x(−sin(x)) − ∫(−sin(x)) (6 dx) + C

(3)  ∫−sin(x)6 dx = −6cos(x) + C

Substituting (3) into (2) gives us:

(2)  ∫−6xcos(x)dx = 6x(−sin(x)) − (−6cos(x)) + C = −6x sin(x)) + 6cos(x) + C

Substituting our new equation (2) into (1) will finally give us our correct final answer!

(1)  ∫3x2sin(x) dx = 3x2(−cos(x)) −(−6x sin(x)) + 6cos(x)) + C

Rewriting this, we have our final answer:

∫3x2sin(x) dx = 3x2cos(x) + 6x sin(x) − 6cos(x) + C

As you can see, these problems involve many steps. This can make them a little overwhelming until you get used to them. Plus, they can take quite a bit of time, so it’s not something you want to leave until the last minute.

I will be adding another example or two of Integration by Parts next, followed by a series on Integration by Substitution. If you have questions about this or think of anything you would like to see covered, please leave a comment below! 🙂