# Some Exponent-Trigonometric Integral: $\int e^{-\sqrt{t}}\sin{t}\,dt$ for $t>0$

How do you evaluate $\int e^{-\sqrt{t}}\sin{t}\,dt$ for positive value of $t$?

I've tried substituting $x=\sqrt{t}$ which got me to $\int e^{-x} 2x \sin {x^2} dx$, and then I got stuck there. I mean this substitution works with integrating $e^{-\sqrt{t}}$ but not so much here.

• I've tried substituting $x=\sqrt{t}$ which got me to $\int e^{-x} 2x \sin {x^2} dx$, and then I got stuck there. I mean this substitution works with integrating $e^{-\sqrt{r}}$ but not so much here. – user366358 Sep 5 '16 at 11:01
• $\sin x^2$ alone requires the special function "Fresnel sine". Your integrand is even less tracable. – Yves Daoust Sep 5 '16 at 11:55
• @YvesDaoust but there's $2x$ though. We can find the integral of $2x \sin {x^2}$ directly. That should mean something, right? – user366358 Sep 5 '16 at 13:31
• Yes, but then by parts you get the Fresnel cosine with the exponential. – Yves Daoust Sep 5 '16 at 15:02

The problem is not that easy. I'll give my solution, then que sera sera.

Since $t > 0$ we could use a Taylor expansion for the exponential part, getting

$$\int\sum_{k = 0}^{+\infty}\frac{(-\sqrt{t})^k}{k!}\ \sin t\ \text{d}t = \sum_{k = 0}^{+\infty}\frac{(-1)^k}{k!}\int t^{k/2}\sin t\ \text{d}t$$

Now we can use the exponential representation for the sine function:

$$\sin t = \frac{e^{it} - e^{-it}}{2i}$$

Obtaining two integrals:

$$\sum_{k = 0}^{+\infty}\frac{(-1)^k}{2ik!}\left(\int t^{k/2}e^{it} \text{d}t - \int t^{k/2} e^{-it} \text{d}t\right)$$

If you're familiar with special functions like the Gamma function or the Error Function, then you will notice that those integrals are given by:

$$\int t^{k/2}e^{it} \text{d}t = -i(-it)^{k/2}t^{k/2}\Gamma\left[1 + \frac{k}{2}, -it\right]$$

$$\int t^{k/2} e^{-it} \text{d}t = i(it)^{k/2}t^{k/2}\Gamma\left[1 + \frac{k}{2}, it\right]$$

Putting all together you obtain a solution in terms of a series:

$$\sum_{k = 0}^{+\infty}\frac{(-1)^k}{2ik!}\left(-i(-it)^{k/2}t^{k/2}\Gamma\left[1 + \frac{k}{2}, -it\right] - i(it)^{k/2}t^{k/2}\Gamma\left[1 + \frac{k}{2}, it\right]\right)$$

Or arranging things a bit:

$$\sum_{k = 0}^{+\infty}\frac{(-1)^{k+1}(i)^{k/2}t^k}{2k!}\left((-1)^{k/2}\Gamma\left[1 + \frac{k}{2}, -it\right] + \Gamma\left[1 + \frac{k}{2}, it\right]\right)$$

However

Mathematica has a direct output for the integral you wrote here, so I wonder if my series does converge to that result. Probably yes.

Mathematica Output

$$\int\ e^{-\sqrt{t}}\sin t\ \text{d}t = \frac{1}{4} \left(\sqrt[4]{-1} e^{-\frac{i}{4}} \sqrt{\pi } \text{erfi}\left(\frac{1}{2} (-1)^{3/4} \left(2 \sqrt{t}-i\right)\right)+(-1)^{3/4} e^{i/4} \sqrt{\pi } \text{erfi}\left(\frac{1}{2} \sqrt[4]{-1} \left(2 \sqrt{t}+i\right)\right)-2 e^{-\sqrt{t}-i t} \left(1+e^{2 i t}\right)\right)$$

More on Special Functions

Gamma function

https://en.wikipedia.org/wiki/Gamma_function

Error Function

https://en.wikipedia.org/wiki/Error_function

First, we use the exponential form of the sine function, then let $x=z^{2}$ $$\int \mathrm{e}^{-\sqrt{x}}\sin(x) \mathrm{d}x = i \int \left(z\,\mathrm{exp}(-iz^{2}-z) - z\,\mathrm{exp}(iz^{2}-z)\right) \mathrm{d}z \label{eq:160905-1} \tag{1}$$

We begin with \begin{align} \tag{a} \int \mathrm{exp}(ax^{2}-bx) \mathrm{d}x &= \mathrm{exp}(-b^{2}/4a) \int \mathrm{exp}(a(x-b/2a)^{2}) \mathrm{d}x \\ &= \frac{1}{\sqrt{a}} \mathrm{exp}(-b^{2}/4a) \int \mathrm{exp}(z^{2}) \mathrm{d}z \\ &= \frac{1}{2} \sqrt{\frac{\pi}{a}} \,\mathrm{exp}(-b^{2}/4a) \,\mathrm{erfi}(z) \\ &= \frac{1}{2} \sqrt{\frac{\pi}{a}} \,\mathrm{exp}(-b^{2}/4a) \,\mathrm{erfi}\left(x\sqrt{a}-\frac{b}{2\sqrt{a}}\right) \end{align} a. Complete the square. Note that $\mathrm{erfi}(z)$ is the imaginary error function.

Differentiating both sides of the above equation with respect to $b$, we have $$\int x\,\mathrm{exp}(ax^{2}-bx) \mathrm{d}x = \frac{\sqrt{\pi}}{2a} \,\mathrm{exp}(-b^{2}/4a) \,\left[ \frac{b}{\sqrt{a}}\mathrm{erfi}\left(x\sqrt{a}-\frac{b}{2\sqrt{a}}\right) + \frac{1}{\sqrt{\pi}} \mathrm{e}^{a(x-b/2a)^{2}} \right]$$ with $a=i$ and $b=1$ $$\int x\,\mathrm{exp}(ix^{2}-x) \mathrm{d}x = \frac{\sqrt{\pi}}{i2} \,\mathrm{exp}(-1/i4) \,\left[ \frac{1}{\sqrt{i}}\mathrm{erfi}\left(x\sqrt{i}-\frac{1}{2\sqrt{i}}\right) + \frac{1}{\sqrt{\pi}} \mathrm{e}^{i(x-1/i2)^{2}} \right] \label{eq:160905-2} \tag{2}$$ which is the second part of the integral on the right hand side of equation \eqref{eq:160905-1}.

With \begin{align} \tag{a} \int \mathrm{exp}(-ax^{2}-bx) \mathrm{d}x &= \mathrm{exp}(b^{2}/4a) \int \mathrm{exp}(-a(x+b/2a)^{2}) \mathrm{d}x \\ &= \frac{1}{\sqrt{a}} \mathrm{exp}(b^{2}/4a) \int \mathrm{exp}(-z^{2}) \mathrm{d}z \\ &= \frac{1}{2} \sqrt{\frac{\pi}{a}} \,\mathrm{exp}(b^{2}/4a) \,\mathrm{erf}(z) \\ &= \frac{1}{2} \sqrt{\frac{\pi}{a}} \,\mathrm{exp}(b^{2}/4a) \,\mathrm{erf}\left(x\sqrt{a}+\frac{b}{2\sqrt{a}}\right) \end{align} a. Complete the square. Note that $\mathrm{erf}(z)$ is the error function.

Differentiating both sides of the above equation with respect to $b$, we have \begin{align} \int x\,\mathrm{exp}(-ax^{2}-bx) \mathrm{d}x&=-\frac{\sqrt{\pi}}{2a} \,\mathrm{exp}(b^{2}/4a)\left[ \frac{b}{\sqrt{a}}\mathrm{erf}\left(x\sqrt{a}+\frac{b}{2\sqrt{a}}\right) + \frac{1}{\sqrt{\pi}} \mathrm{e}^{-a(x+b/2a)^{2}} \right] \end{align} with $a=i$ and $b=1$ $$\int x\,\mathrm{exp}(-ix^{2}-x) \mathrm{d}x = -\frac{\sqrt{\pi}}{i2} \,\mathrm{exp}(1/i4) \,\left[ \frac{1}{\sqrt{i}}\mathrm{erf}\left(x\sqrt{i}+\frac{1}{2\sqrt{i}}\right) + \frac{1}{\sqrt{\pi}} \mathrm{e}^{-i(x+1/i2)^{2}} \right] \label{eq:160905-3} \tag{3}$$ which is the first part of the integral on the right hand side of equation \eqref{eq:160905-1}.

Substituting equations \eqref{eq:160905-2} \eqref{eq:160905-3} into \eqref{eq:160905-1} and changing back to the original variables yields our result.