Does $\int _0^{\pi }e^x\sin ^n x\:\mathrm{d}x$ have a closed form?

Let $I_n = \int _0^{\pi }e^x\sin ^n x dx$ and integrate by parts twice to get the recursive equation below

$$I_n = \frac{n(n-1)}{n^2+1}I_{n-2}$$

with $I_0= e^\pi-1$ and $I_1=\frac12(1+e^\pi)$.


$$ \int_0^\pi e^x \left( \frac{e^{ix} - e^{-ix}}{2i} \right)^n \, dx $$ Expand the $n$th power via the binomial theorem and apply the distributive law, then integrate term by term.

As a function of $n$ I wouldn't call that a closed form, but as a function of $x$ it is a closed form.


I fed Quanto's recurrence to Maple. It says the solution is: $$ I_n = {\frac {\pi\,{{\rm e}^{\pi/2}}n! }{{2}^{n} \Gamma \left( n/2+1+i/2 \right) \Gamma \left( n/2+1-i/2 \right) }}. $$