Hi again everyone! Here is the next integration technique for you to add to your toolbox.

Lesson 4: Integration by Parts

#### Learning goals:

- Recognize when to use integration by parts.
- Use integration by parts to evaluate definite and indefinite integrals.

**Topic**:

- Volume 2, Section 3.1
*Integration by Parts*(link to textbook section)

**WeBWorK**:

- Integration – Integration by Parts

**Motivating question**

How can we integrate a function that is a product?

Differentiate the function:

\[f(x)= x^2 \sin(x)\]

We see that the function $f(x)$ is a product, so we’ll differentiate it using the product rule: $f'(x) = \frac{d}{dx}(x^2)\cdot\sin(x) + x^2\cdot \frac{d}{dx}(\sin(x)) = 2x\sin(x) +x^2\cos(x)$.

Again, we can rewrite this relationship for derivatives in the warmup exercise in terms of integrals:

\[x^2 \sin(x) = \int 2x \sin(x)dx + \int x^2\cos(x)dx\]

While it might not be obvious yet why we would want to do this, we can also rearrange this equation to see another relationship:

\[\int x^2\cos(x)dx = x^2\sin(x) – \int 2x\sin(x)dx.\]

What this means is that if you know how to integrate $2x\sin(x)$, then you can use that to evaluate the integral of $x^2 \cos(x)$. It might not be clear at this point, but integrating $2x \sin(x)$ is actually easier! We’ll come back to this example later in the lesson.

## Integration by parts

We saw in Lesson 3 (link here) that integration by substitution was the partner of the chain rule for derivatives. By the warmup exercise above, you may have guessed that today’s topic is the partner of the product rule for derivatives. This technique is called *integration by parts*.

To understand the formula, we’ll once again start with the differentiation rule, which we’ll write in a convenient way:

\[(f(x)g(x))’ = f'(x)g(x) + f(x)g'(x).\]

Integrating both sides with respect to $x$ gives us:

\[f(x)g(x) = \int f'(x)g(x)dx + \int f(x)g'(x)dx.\]

Notice that in this equation, two integrals appear together on the right hand side. Typically, we’ll want to use a rearranged version of this equation so that we can use it to evaluate one integral in terms of another:

\[ \int f(x)g'(x)dx = f(x)g(x) – \int f'(x)g(x)dx.\]

This formula is often written as in the following theorem:

**Integration by parts: **Let $u=f(x)$ and $v=g(x)$ be two continuous functions with continuous derivatives. Then $du = f'(x)dx$, $dv = g'(x)dx$ and

\[\int udv = uv – \int vdu.\]

Using the integration by parts formula takes some getting used to. When we’re given an integral to evaluate, we need to determine which factor should be $u$ and which factor should be $dv$. The goal is to choose a $u$ and a $dv$ so that you can find $du$ and $v$ and so that you can evaluate the integral $\int vdu$.

#### Examples: evaluating indefinite integrals using integration by parts

**Video 1 **below gives some more tips and walks you through a handful of examples.

Videos 2 to 5 walk you through more examples illustrating integration by parts.

**Video **6 below shows how to use the integration by parts formula to evaluate $\int 2x \sin(x)dx$.

Use integration by parts to evaluate $\int x^2\cos(x)dx$.

This integral should look familiar from the warmup exercise, so we already have an idea of what the answer will look like, but we’ll pretend we don’t and see what integration by parts gives us.

The integrand has two factors, along with the $dx$ factor. We need to determine what $u$ is and what $dv$ is. We’ll know that we made a good choice if we can find $v$, $du$, and if we can integrate $\int v du$. Let’s try setting $u = x^2$ and $dv = \cos(x)dx$. With this choice, we differentiate $u$ to get $du = 2xdx$ and integrate $dv$ to get $v = \sin(x)$.

Plugging $u$, $dv$, $v$, and $du$ into the integration by parts formula gives us

\[\int x^2 \cos(x)dx = x^2 \sin(x) – \int 2x \sin(x) dx.\]

So this choice of $u$ and $dv$ is a good one only if we’re able to evaluate $\int 2x \sin(x) dx$…but this is exactly the example shown in **Video **6 above…using integration by parts! In the video, we saw that $\int 2x\sin(x)dx = 2(\sin(x) – x\cos(x)) + C$.

Putting this together, we see that integrating by parts twice gives us:

\[\int x^2 \cos(x)dx = x^2 \sin(x) – \int 2x \sin(x) dx\] \[\quad \quad= x^2\sin(x) – 2(\sin(x) – x\cos(x)) + C.\]

There are some examples where it looks like applying integration by parts twice will help you evaluate the integral, as it did in Exercise 2 above, only to find yourself going in circles and still having to evaluate the integral you started with. This is no problem, though, because if the integral appears on both sides of the equation (as long as it’s not with the same coefficient on both sides) you can solve for it. **Video 7** below shows an example like this.

#### Examples: evaluating definite integrals using integration by parts

As usual, if you know how to evaluate an indefinite integral, that means you can evaluate a corresponding definite integral using the Fundamental Theorem of Calculus part 2 (FTC 2). **Video 8** below shows how you must handle the upper and lower limits of integration.

## Summary and tips

You’re starting to fill up your integration technique toolbox. In Lesson 1 (link here), you learned about integrating directly. Direct integration isn’t always possible, so in these cases you’ll need to look in your toolbox for an appropriate technique for the problem. Often, more than one integration technique will work (though one technique might be easier than another). We started with one of the simplest techniques—integration by substitution—in Lesson 3 (link here). If direct integration or integration by substitution don’t work, then you can try integration by parts as you saw today. We’ll be adding more techniques to your toolbox in the upcoming lessons.

Learning to use the individual integration techniques in your toolbox takes practice. Choosing which technique is appropriate for a given question *also* takes practice. As you go through these lessons, check the Final Exam Review Sheet (link here) to see which integrals you’re able to evaluate using the techniques you’ve learned so far.

### Additional Video Resources

Evaluate: \[\int x \cos(3x) dx.\]