How to evaluate this gaussian integral

Is there a way to solve this integral? $$\int_{-\infty}^{\infty} e^{-(s^2+2\sqrt{t}s)}\sin(y+2\sqrt{t}s)\,ds$$ I usually apply this formula for integrals of this kind $$\int_{-\infty}^{\infty} e^{-(as^2+bs+c)}\,ds=\sqrt{\frac{\pi}{a}}e^{\frac{b^2}{4a}-c}$$ Thank you in advance

• Use $\sin(y+2\sqrt{t}s)=\frac{e^{i(y+2\sqrt{t}s)}-e^{-i(y+2\sqrt{t}s)}}{2i}$ and then use your formula. – aleden Oct 27 '18 at 17:42
• With complex integration, this is easy (your last formula is valid for any complex $b$ - as both sides represent entire functions of $b$ - and that's enough to get the answer right away). – metamorphy Oct 27 '18 at 17:42

If you're OK with working with functions of a complex variable, the formula you gave still applies if $$a,b,c\in\mathbb C$$ provided that $$\mathrm{Re}[a] > 0$$. It gives $$\begin{multline} \int_{-\infty}^{\infty} e^{-(s^2+2\sqrt{t}s)}\sin(y+2\sqrt{t}s)\,ds = \mathrm{Im}\left[\int_{-\infty}^{\infty} e^{-(s^2+2\sqrt{t}s)}e^{i\left(y+2\sqrt{t}s\right)}ds\right] \\= \mathrm{Im}\left[\int_{-\infty}^{\infty} e^{-[s^2+2(1-i)\sqrt{t}s-iy]}ds\right] = \mathrm{Im}\left[\sqrt{\pi}\exp\left(-2it +i y\right)\right] = \sqrt{\pi}\sin(y-2t). \end{multline}$$ If you're not OK with working with complex numbers, there actually are formulas for these: $$\begin{eqnarray} \int_{-\infty}^\infty e^{-(as^2 + bs + c)}\sin(ks + m)ds &=& \sqrt{\frac{\pi}{a}}e^{\frac{b^2-k^2}{4a} - c}\sin\left(m-\frac{b k}{2a}\right)\\ \int_{-\infty}^\infty e^{-(as^2 + bs + c)}\cos(ks + m)ds &=& \sqrt{\frac{\pi}{a}}e^{\frac{b^2-k^2}{4a} - c}\cos\left(m-\frac{b k}{2a}\right) \end{eqnarray}$$ These formulas follow directly from the complex form of the integral I used before, and if you plug in the values, you'll get $$\sqrt{\pi}\sin(y-2t)$$ again.