I am stuck on 2 integral by parts problems.

1)$\displaystyle \int e^{ax}\sin (bx)dx$. I've been trying with both $\displaystyle u'(x)=e^{ax}$, etc. and $\displaystyle u'(x)=\sin (bx)$, etc. but didn't get far.

2)$\displaystyle \int \tan^2 (x)dx$. I obviously took $\displaystyle u'(x)=\tan (x)$ and $\displaystyle v(x)=\tan (x)$ and I've been up to $\displaystyle \int \tan ^2 (x)dx= \tan (x) \cdot ln( \cos (x))-\int ln ( \cos (x)) \cdot cosec^2(x)dx$. And stuck there.