<s>[INST] Find the reduction formula for the integral $I_n = \int e^{ax}\sin^nxdx$ My attempt:
Let $$u=\sin^nx \rightarrow \text{d}u=n\sin^{n-1}x\cos x\text{d}x $$ and
$$ v = \int{e^{ax}}\text{d}x=\frac{e^{ax}}{a}.$$
Now we have $u\cdot v- \int{v\cdot \text{d}u} $, so
$$I_n = \frac{e^{ax}}{a}\sin^nx-\frac{n}{a}\int{e^{ax}\sin^{n-1}x\cos x\text{d}x}$$
Now solving: $\int{e^{ax}\sin^{n-1}x\cos x\text{d}x}$,
Let 
$$ u = e^{ax} \rightarrow \text{d}u=ae^{ax}$$
and
$$ v = \int{\sin^{n-1}x \cos x \text{d}x} = \frac{\sin^nx}{n}. $$
So,
$$\int{e^{ax}\sin^{n-1}x\cos x\text{d}x} = \frac{\sin^nx}{n}e^{ax}-\frac{a}{n}I_n.$$
We win
$$I_n = \frac{e^{ax}}{a}\sin^nx-\frac{n}{a}\left(\frac{\sin^nx}{n}e^{ax}-\frac{a}{n}I_n\right)$$
$$ 0 = 0$$
 [/INST] Hint. We assume $a \neq0, \pm i$. From the identity you have already obtained by parts, 
$$
I_n = \frac{e^{ax}}{a}\sin^nx-\frac{n}{a}\int{e^{ax}\sin^{n-1}x\cos x\text{d}x} \tag1
$$ you may rather perform another integration by parts as follows
$$
\begin{align}
&\int{e^{ax}\sin^{n-1}x\cos x\text{d}x} 
\\&= \frac{e^{ax}}{a}\sin^{n-1}x\cos x-\frac{1}{a}\int{e^{ax}\left[(n-1)\sin^{n-2}x\cos^2 x-\sin^{n}x\right]\text{d}x} \tag2
\end{align}
$$ replacing $\cos^2 x$ with $1-\sin^2 x$ then inserting $(2)$ in $(1)$, one gets
$$
I_n=\frac{e^{ax}}{a}\sin^{n}x-\frac{ne^{ax}}{a^2}\sin^{n-1}x\cos x+\frac{n(n-1)}{a^2}I_{n-2}-\frac{n^2}{a^2}I_{n}
$$ or

$$
(n^2+a^2)I_n=ae^{ax}\sin^{n}x-ne^{ax}\sin^{n-1}x\cos x+n(n-1)I_{n-2} \tag3
$$ 

with $I_0=\dfrac{e^{ax}}a$ and $I_1=\dfrac{-\cos x+a \sin x}{1+a^2}e^{a x}$.
</s>