Improper integral with a parameter $\int_{0}^{\infty} e^{-cx^{2}}\sin(tx)dx$

I need to evaluate the following integral. $$\int_{0}^{\infty} e^{-cx^{2}}\sin(tx) ~dx$$

Here's what I've done so far.

$$I(t) = \int_{0}^{\infty} e^{-cx^{2}}\sin(tx)~dx$$ Then differentiating under the integral sign I get:

$$I'(t) = \int_{0}^{\infty} xe^{-cx^{2}}\cos(tx)~dx$$

This is pretty straightforward and integrating by parts I get this:

$$I '(t) =\frac{1}{2c}+\frac{t}{2c}\int_{0}^{\infty} e^{-cx^{2}}\sin(tx)~dx$$ which can be written as

$$I'(t) = \frac{1}{2c}+\frac{t}{2c}I(t)$$

Rearranging I end up with the following differential equation:

$$I'(t)+\frac{t}{2c}I(t)=\frac{1}{2c}$$

When I try to solve this I end up with a different result than what an online calculator got:

$$-\dfrac{\sqrt{{\pi}}\mathrm{i}\mathrm{e}^{-\frac{t^2}{4c}}\operatorname{erf}\left(\frac{\mathrm{i}t}{2\sqrt{c}}\right)}{2\sqrt{c}}$$

Any tips?

• You must've also ended with same answer. This is a linear first oder differential equation you ended up with. Now multiplying both sides by $e^{\frac {t^2}{4c}}$,LHS can be solved much easily but on the right side since you need an indefinite integral of type $e^{-x^2}$ you must obviously end with something containing the error function within. – Rohan Shinde Dec 1 '18 at 12:27
• The online calculator answer is correct! It may also be found in published tables of integrals. (You do not reveal to us your answer, so we cannot tell whether it is also correct.) – GEdgar Dec 1 '18 at 14:02
• Your error lies in differential equation that you've formed. It should be $I'(t) - \frac{t}{2c}I(t) = \frac{1}{2c}$ – user150203 Dec 5 '18 at 11:54