# GL(s,R)

## September 24, 2010

### Integration by Parts 2

Filed under: Tricks of the Trade — Adam Glesser @ 8:28 am
Tags: , ,

Last time on

(with Professor Glesser)

we introduced integration by parts as an analogue to the product rule. We start this post with an example to show why the method can become tedious.

Consider

$\int x^4\sin(x)\ dx$

As there is a product of functions, this seems ideal for integration by parts. A question we will take up in our next post is which term we should look to differentiate (i.e., be our $u$) and which we should antidifferentiate (i.e., be our $dv$). For now, I will give you that a sound choice is

$u = x^4 \qquad dv = \sin(x)\ dx$

With this, we get

$du = 4x^3\ dx \qquad v = -\cos(x)$.

Using the integration by parts fomula:

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

we get

$\int x^4\sin(x)\ dx =-x^4\cos(x)-\int 4x^3(-\cos(x))\ dx$

Using linearity, we reduce the question to solving $\int x^3\cos(x)\ dx$.

Hold on, now. Is that really an improvement?

Yes, because the power of $x$ is smaller. But, I’ll grant you that life doesn’t seem much better. Essentially, we need to do integration by parts again. So, we rename things:

$u = x^3 \qquad dv = \cos(x)\ dx$
$du = 3x^2\ dx \qquad v = \sin(x)$

and we get

$\int x^3\cos(x)\ dx = x^3\sin(x) - \int 3x^2\sin(x)\ dx$

and after using linearity, we only need to compute $\int x^2\sin(x)$.

Before you get up and leave, notice that the power of $x$ is one less again.

Whoo-hoo. Yay, capitalism!

Seriously, each time we do this process, the exponent will decrease by one (since we are differentiating). So we “only” need to do it two more times.

You suck, Professor Glesser

Agreed. This is why it is nice to automate the process. I first learned this by watching Stand and Deliver over and over while in high school. I am not much of a fan of Battlestar Galactica (nerd cred…plummeting) and the few times I watched, I thought Edward James Olmos’ portrayal of William Adama was really flat; I thought Olmos was mailing in the performance. The most likely reason for my feelings? If you’ve never seen it, watch Stand and Deliver and Olmos’ portrayal of math teacher Jaime Escalante. Now that was a performance. Anyhow, here is the clip I watched incessantly.

I decided on a different notational scheme, but the method is the same. We make the following observation: when doing integration by parts repeatedly, the term that we differentiate will usually be differentiated again. That is, (abusing notation) the $du$ becomes our new $u$. If you like, the formula for integration by parts has us multiply diagonally left to right ($uv$) and then subtract the integral of the product left to right along the bottom ($-\int v\ du$):

The next iteration of integration by parts gives:

Essentially, this creates an alternating sum. In practice, it means we can set up the following chart where, going down, we differentiate on the left until we get $0$ and antidifferentiate on the right as many times as we differentiated.

Notice here that we are condensing quite a bit of notation with this method since we are no longer using the u, v, du, and dv notation. But, we are getting out precisely the same information. We draw diagonal left-to-right arrows to indicate which terms multiply and we superscript the arrows with alternating pluses and minuses to give the appropriate sign.

We don’t need to draw a horizontal arrow on the bottom since that would simply give us the antiderivative of $0 \cdot (-\cos(x)) = 0$. Following the arrows and taking account of signs, our antiderivative is

$-x^4\cos(x) + 4x^3\sin(x)+ 12x^2\cos(x)- 24x\sin(x)- 24\cos(x)+C$

Could you do that again?

Let’s try a different example, a little more complicated. Say we want to compute $\int (2x^2- 3x + 4)\cos(3x)\ dx$. We simply set up the chart where, going down, we differentiate on the left and antidifferentiate on the right:

and follows the arrows to get

$\frac{1}{3}(2x^2 - 3x+4)\sin(3x)+ \frac{1}{9}(4x-3)\cos(3x)- \frac{4}{27}\sin(3x)+C$
as the antiderivative for $\int (2x^2- 3x + 4)\cos(3x)\ dx$.

I think I need a break

Indeed. Next time we’ll take this a step further and show how to handle some situations where neither function is a polynomial. This will also bring up the question, again, about how to choose which function to differentiate and which to integrate.

1. As we’re working through this sort of example, but before I show them this method, I usually make a show of how sometimes the order does matter (and you may bring this up in part 3). That is, I’ll let u = x^4 and dv = sin(x) dx the first time and then go through it and say something like, “Well, that didn’t get us much of anywhere. What if we switch up our u and dv this time? Let’s let u = cos(x) and dv = x^3.” Then when you work it through, everything cancels out and we’re back to the original problem.

I use that to show them that it usually makes sense to keep your sequence of choices for u consistent rather than bouncing back and forth. I guess it makes more sense with the non-polynomial functions you’ll show in the next part you’re writing about, but I usually do this before the method here to describe why we keep the same u in a single column.

Comment by CalcDave — September 27, 2010 @ 8:40 am

2. […] Integration by Parts 1 Integration by Parts 2 […]

Pingback by Integration by Parts 3 « GL(s,R) — October 1, 2010 @ 8:43 am

3. Did you ever continue after your break? If so, where can I find the material? Thank you!

Comment by Evelyn Saravia — June 28, 2011 @ 6:29 pm

Blog at WordPress.com.