So, I have the following indefinite integral:
$$\int sin(u)e^u \ du$$
I tried solving it using integration by parts, but it just kept repeating itself. What should I do?
So, I have the following indefinite integral:
$$\int sin(u)e^u \ du$$
I tried solving it using integration by parts, but it just kept repeating itself. What should I do?
Let $I = \int \sin(u) e^u\, du$. By integration by parts,
$$I = \sin(u) e^u - \int \cos(u) e^u\, du = \sin(u)e^u - \cos(u)e^u + \int (-\sin u)e^u\, du$$ $$ =\sin(u)e^u - \cos(u)e^u - I. $$
Thus $$I = \frac{\sin(u)e^u - \cos(u)e^u}{2} + C.$$
You can use integration by parts or use the identity
$$ \sin(u) = \frac{e^{iu}-e^{-iu}}{2i}. $$
Here is a nice way to do it: by parts, $$\int e^u\sin u\,du=e^u\sin u-\int e^u\cos u\,du\ .$$ Consider also $$\int e^u\cos u\,du=e^u\cos u+\int e^u\sin u\,du\ .$$ Eliminating the cos integral, $$\int e^u\sin u\,du=e^u\sin u-e^u\cos u-\int e^u\sin u\,du$$ so $$2\int e^u\sin u\,du=e^u\sin u-e^u\cos u$$ and hence $$\int e^u\sin u\,du=\frac12(e^u\sin u-e^u\cos u)\ \ldots$$ . . . not forgetting plus $C$ of course ;-)
You have the answer without knowing it, I think! You noted that it repeats itself (which it does). Let's see what happens. Let's let $x = \sin u$ and $dv = e^u\,du$, then $dx = \cos u \,du$ and $v = e^u$. Integration by parts gives us
$$\int\sin u e^u\,du = \sin u e^u - \int \cos u e^u\,du$$
Well we traded one integral for another. Let's try doing integration by parts again. We don't want to let $x = e^u$ (and subsequently $dv = \cos u\,du$) since this undoes our previous integration by parts. That leaves us with the case that $x = \cos u$ and $dv = e^u \,du$ to give that $dx = -\sin u\,du$ and $v = e^u$. Hence
$$\int\sin u e^u \,du = \sin u e^u - \left(\cos u e^u - \int (-\sin u) e^u \,du\right)$$
Simplifying, the right hand side becomes
$$\sin u e^u - \cos u e^u - \int \sin u e^u \,du.$$
Note that $\int \sin u e^u \,du$ appears on both sides of the equation.. Can you take it from here?