Solve $\int\ e^x \sin(9x)\,dx$ using integration by parts I have this Integration by Parts question that I can't seem to find an answer to.
The question is:
$$\int\ e^x 
\sin(9x)\,dx$$
I used u-substitution:
$$u=e^x,du=e^x\,dx$$
$$dv=\sin(9x)\,dx, v=-\frac{1}{9}\cos(9x)$$
Then I got:
$$-\frac{1}{9}e^x\cos(9x)+\frac{1}{9}\int\ e^x\cos(9x)\,dx$$
After a second integration I used:
$$u=e^x, du=e^x\,dx$$
$$dv=\cos(9x)\,dx, v=\frac{1}{9}\sin(9x)$$
Furthermore,
$$\int\ e^x\sin(9x)dx=-\frac{1}{9}\ e^x\cos(9x)+\frac{1}{9}\left(\frac{1}{9}\ e^x\sin(9x)-\frac{1}{9}\int\ e^x\sin(9x)\,dx\right)$$
$$\int\ e^x\sin(9x)dx=-\frac{1}{9}\ e^x\cos(9x)+\frac{1}{81}\ e^x\sin(9x)-\frac{1}{81}\int\ e^x\sin(9x)\,dx$$
I'm stuck and I'm not sure exactly what to do after this.
Any help would be very grateful..thanks!
 A: More simply and without integration by parts we have
$$\int e^x\sin(9x)dx=\operatorname{Im}\int e^{(1+9i)x}dx=\operatorname{Im}\left(\frac1{1+9i}e^{(1+9i)x}\right)=\operatorname{Im}\left(\frac1{82}(1-9i)e^{(1+9i)x}\right)$$
Now develop and take the imaginary part.
A: From where you left off, let
$$s = \int e^x\sin(9x)\,dx$$
Then, we have
$$s = -\dfrac{1}{9}e^x\cos(9x) + \dfrac{1}{81}e^x\sin(9x) - \dfrac{1}{81}s$$
Solving for $s$ gives
$$\begin{aligned}
\dfrac{82}{81}s &= -\dfrac{1}{9}e^x\cos(9x) + \dfrac{1}{81}e^x\sin(9x)\\
s &= \dfrac{81}{82}\left(-\dfrac{1}{9}e^x\cos(9x) + \dfrac{1}{81}e^x\sin(9x) \right)\\
\int e^x\sin(9x)\,dx &= \dfrac{81}{82}\left(-\dfrac{1}{9}e^x\cos(9x) + \dfrac{1}{81}e^x\sin(9x) \right)
\end{aligned}$$
A: You have
$$\int e^x\sin(9x)dx=−\frac{1}{9}e^x\cos(9x)+\frac{1}{81} e^x\sin(9x)−\frac{1}{81}\int e^x\sin(9x)dx$$ Then bring $−\frac{1}{81}\int e^x\sin(9x)dx$ to the other side and you get 
$$\frac{82}{81}\int e^x\sin(9x)dx=−\frac{1}{9} e^x\cos(9x)+\frac{1}{81} e^x\sin(9x)$$
A: We can take a more general approach, and find 
$$I=\int e^{ax}\sin bx\ \mathrm{d}x$$
Integration by parts:
$$\mathrm{d}v=\sin bx\ \mathrm{d}x\Rightarrow v=-\frac1b\cos bx\\u=e^{ax}\Rightarrow \mathrm{d}u=ae^{ax}\mathrm{d}x$$
Plug it in:
$$I=-\frac{e^{ax}}b\cos bx+\frac ab\int e^{ax}\cos bx\ \mathrm{d}x$$
Integration by parts round $2$:
$$\mathrm{d}v=\cos bx\ \mathrm{d}x\Rightarrow v=\frac1b\sin bx\\u=e^{ax}\Rightarrow \mathrm{d}u=ae^{ax}\mathrm{d}x$$
Plug in:
$$I=-\frac{e^{ax}}b\cos bx+\frac ab\bigg(\frac{e^{ax}}{b}\sin bx-\frac ab\int e^{ax}\sin bx\ \mathrm{d}x\bigg)$$
Take note of the $\int e^{ax}\sin bx\ \mathrm{d}x$ term:
$$I=-\frac{e^{ax}}b\cos bx+\frac{ae^{ax}}{b^2}\sin bx-\frac{a^2}{b^2}I$$
$$\bigg(1+\frac{a^2}{b^2}\bigg)I=\frac{e^{ax}}b\bigg(\frac ab\sin bx-\cos bx\bigg)$$
$$I=\frac{b^2}{a^2+b^2}\frac{e^{ax}}b\bigg(\frac ab\sin bx-\cos bx\bigg)$$
$$I=\frac{e^{ax}}{a^2+b^2}\big(a\sin bx-b\cos bx\big)+C$$
Isn't that cool? This is called a reduction formula, and there are many more of them.
