Understanding Integration by Parts

Main Question or Discussion Point

Hello.

I'm just trying to understanding something here. I was taught integration by parts by my professor in what looks to be like an untraditional way.

From my understanding, the theorem states:

∫udv = uv - ∫vdu

We were given an example in class of:

∫exsin(x)dx
=∫ex∫sin(x)dx - ∫[(ex)'∫sin(x)dx]dx
=-excos(x) + ∫excos(x)dx

I don't understand how this is the same thing as if I were to use, ex as u and sin(x) as v, since the outcome would then be:

∫exsin(x)dx
=exsin(x)dx - ∫exsin(x)dx

Any help understanding this professors method would be great, thanks!

You can't use sin(x) as v, you can only use it as dv. A simple derivation can be given by the product rule:
$$d(uv)=u\,dv+v\,du$$
and so, integrating both sides yields
$$\int d(uv)=\int u\,dv + \int v\,du$$
Here, the LHS is seen to be equal to uv, and hence this takes the form
$$uv=\int u\,dv + \int v\,du$$
in which one can subtract $\displaystyle \int v\,du$ from both sides to obtain
$$uv-\int v\,du=\int u\,dv$$
which is the well-known integration by parts.

In your example, one needs to integrate by parts twice to obtain an equation satisfied by the integral which thence can be solved for the integral itself, whereas a simpler method might lie in Euler's formula.

Okay, I understand that.

But also, based on that understanding, how is the method provided by the professor equivalent and yielding the proper answer?

=∫e^x∫sin(x)dx - ∫[(e^x)'∫sin(x)dx]dx

This looks to me like ∫udv - ∫dudv.

haruspex