Integration by parts of $\sin(x)e^x$ I'm studying analysis and I have a problem with the integral calculation of this function:

$$\int \sin(x)e^x\mathrm dx$$

I start by using integration by parts and I obtained this:

$$\int \sin(x)e^x\mathrm dx = \sin(x)e^x-\int \cos(x)e^x\mathrm dx$$

But now I don't know how to continue, will I enter in a infinite loop if I repeat integration by parts?

I do it one more time like the comment above said and I have:

$$\int \sin(x)e^x\mathrm dx = \sin(x)e^x-\cos(x)e^x-\int -\sin(x)e^x\mathrm dx$$

And if I move to the left I obtain:

$$\int \sin(x)e^x\mathrm dx+\int -\sin(x)e^x\mathrm dx = \sin(x)e^x-\cos(x)e^x$$

Right?
Another way could be to consider $$I=\int \sin(x)\,e^x\,dx$$ $$J=\int \cos(x)\,e^x\,dx$$ Then $$J+i I=\int e^{ix}\,e^x\,dx=\int e^{(1+i)x}\,dx=\frac { e^{(1+i)x}} {1+i}=\left(\frac{1}{2}-\frac{i}{2}\right) e^{(1+i) x}$$ Expand the last term to get $$J+i I=\frac{1}{2} e^x \sin (x)+\frac{1}{2} e^x \cos (x)+i \left(\frac{1}{2} e^x \sin
   (x)-\frac{1}{2} e^x \cos (x)\right)$$

Doing the same for $$K=\int \sin(ax)\,e^{bx}\,dx$$ $$L=\int \cos(ax)\,e^{bx}\,dx$$ $$L+iK=\int e^{iax}e^{bx}\,dx=\int e^{(b+ia)x}dx=\frac {e^{(b+ia)x}}{b+ia}=\frac {b-ia}{a^2+b^2}{e^{(b+ia)x}}$$ and expanding again $$L+iK=\frac{a e^{b x} \sin (a x)}{a^2+b^2}+\frac{b e^{b x} \cos (a x)}{a^2+b^2}+i
   \left(\frac{b e^{b x} \sin (a x)}{a^2+b^2}-\frac{a e^{b x} \cos (a
   x)}{a^2+b^2}\right)$$
Let $\int\sin xe^x = I$.  

$I = \sin xe^x - \cos xe^x -I$

$2I = \sin xe^x - \sin xe^x$

$I = (\sin xe^x - \cos xe^x)/2.$