How to calculate the integral $I\left(a,b,c\right)=\int_{a}^{b}exp\left(u^{2}\right)\times\mbox{erfi}\left(\sqrt{\frac{u}{c}}\right)du$? I want to compute the following integral depending on a,b and c all strictly positive real numbers:
$$I\left(a,b,c\right)=\int_{a}^{b}exp\left(u^{2}\right)\times\mbox{erfi}\left(\sqrt{\frac{u}{c}}\right)du$$
I tend to use the 'Brute force' solution that is to rely on the integral series of $exp(x)$ and $erfi(x)$. This gives this development:
$$I\left(a,b,c\right)=\int_{a}^{b}\sum_{k=0}^{+\infty}\frac{\left(u^{2k}\right)}{k!}\times\mbox{erfi}\left(\sqrt{\frac{u}{c}}\right)du$$
$$\Leftrightarrow I\left(a,b,c\right)=\sum_{k=0}^{+\infty}\frac{1}{k!}\int_{a}^{b}u^{2k}\times\mbox{erfi}\left(\sqrt{\frac{u}{c}}\right)du$$
As:$$\mbox{erfi}\left(x\right)=\frac{2}{\sqrt{\pi}}\sum_{j=0}^{+\infty}\frac{x^{2j+1}}{\left(2j+1\right)j!}$$
this gives:
$$I\left(a,b,c\right)=\sum_{k=0}^{+\infty}\frac{1}{k!}\int_{a}^{b}u^{2k}\times\frac{2}{\sqrt{\pi}}\sum_{j=0}^{+\infty}\frac{\frac{u}{c}^{\frac{2j+1}{2}}}{\left(2j+1\right)j!}du$$
$$\Leftrightarrow I\left(a,b,c\right)=\frac{2}{\sqrt{\pi}}\sum_{k=0}^{+\infty}\frac{1}{k!}\sum_{j=0}^{+\infty}c^{-\frac{2j+1}{2}}\int_{a}^{b}\frac{u^{\frac{4k+2j+1}{2}}}{\left(2j+1\right)j!}du$$
The inner integral evaluates like:
$$\int_{a}^{b}u^{\frac{4k+2j+1}{2}}du=\left[\frac{u^{\frac{4k+2j+3}{2}}}{\frac{4k+2j+3}{2}}\right]_{a}^{b}$$
$$\Leftrightarrow\int_{a}^{b}u^{\frac{4k+2j+1}{2}}du=\frac{2}{4k+2j+3}\left[b^{\frac{4k+2j+3}{2}}-a^{\frac{4k+2j+3}{2}}\right]$$
This leads to:
$$I\left(a,b,c\right)=\frac{2}{\sqrt{\pi}}\sum_{k=0}^{+\infty}\frac{1}{k!}\sum_{j=0}^{+\infty}\frac{2c^{-\frac{2j+1}{2}}}{(4k+2j+3)\left(2j+1\right)j!}\left[b^{\frac{4k+2j+3}{2}}-a^{\frac{4k+2j+3}{2}}\right]$$
I assume this to be right but is there a more elegant solution than this double sum to the infinite ?
EDIT: i correct the question to state that a and b are strictly positive real numbers, and also the missing term in the final result.
 A: Let's begin by an expansion of the $\mbox{erfi}(x)$
function:
$$I\left(a,b,c\right)=\int_{a}^{b}exp\left(u^{2}\right)\times\mbox{erfi}\left(\sqrt{\frac{u}{c}}\right)du$$
$$\Leftrightarrow I\left(a,b,c\right)=\int_{a}^{b}exp\left(u^{2}\right)\times\frac{2}{\sqrt{\pi}}\sum_{j=0}^{+\infty}\frac{\sqrt{\frac{u}{c}}^{2j+1}}{\left(2j+1\right)j!}du$$
$$\Leftrightarrow I\left(a,b,c\right)=\frac{2}{\sqrt{\pi}}\sum_{j=0}^{+\infty}\frac{1}{\left(2j+1\right)j!}\int_{a}^{b}e^{u^{2}}\sqrt{\frac{u}{c}}^{2j+1}du$$
$$\Leftrightarrow I\left(a,b,c\right)=\frac{2}{\sqrt{\pi}}\sum_{j=0}^{+\infty}\frac{c^{-\frac{\left(2j+1\right)}{2}}}{\left(2j+1\right)j!}\int_{a}^{b}e^{u^{2}}u^{\frac{2j+1}{2}}du$$
$$\Leftrightarrow I\left(a,b,c\right)=\frac{2}{\sqrt{\pi}}\sum_{j=0}^{+\infty}\frac{c^{-\frac{\left(2j+1\right)}{2}}}{\left(2j+1\right)j!}\int_{a}^{b}e^{u^{2}}u^{\frac{2j+1}{2}}du$$
Then we need to compute the value of the integral $\int_{a}^{b}e^{u^{2}}u^{\frac{2j+1}{2}}du$ .
First let's split the integral in two new ones:
$$\int_{a}^{b}e^{u^{2}}u^{\frac{2j+1}{2}}du=\int_{a}^{+\infty}e^{u^{2}}u^{\frac{2j+1}{2}}du-\int_{b}^{+\infty}e^{u^{2}}u^{\frac{2j+1}{2}}du$$
Let $x=\frac{u^{2}}{a^{2}}$
, then: $u=a\sqrt{x}$ $\Rightarrow dx=\frac{2u}{a^{2}}du=\frac{2\sqrt{x}}{a}du$
so that: $$\int_{a}^{+\infty}e^{u^{2}}u^{\frac{2j+1}{2}}du=\int_{1}^{+\infty}e^{a^{2}x}\left(a\sqrt{x}\right)^{\frac{2j+1}{2}}\frac{a}{2\sqrt{x}}dx$$
$$=\frac{a^{\frac{2j+3}{2}}}{2}\int_{1}^{+\infty}e^{a^{2}x}x^{\frac{2j-1}{4}}dx$$
This last integral is nothing less than the expression of the Generalized Exponential Integral function $E_{n}\left(y\right)$ such that:
$$E_{n}\left(y\right)=\int_{1}^{+\infty}\frac{e^{-yt}}{t^{n}}dt=\int_{1}^{+\infty}\frac{e^{-yt}}{t^{n}}dt$$
with $n=\frac{1-2j}{4}$  and $y=-a^{2}$.
Then, we have:
$$\int_{a}^{b}e^{u^{2}}u^{\frac{2j+1}{2}}du=\frac{a^{\frac{2j+3}{2}}}{2}E_{\frac{1-2j}{4}}\left(-a^{2}\right)-\frac{b^{\frac{2j+3}{2}}}{2}E_{\frac{1-2j}{4}}\left(-b^{2}\right)$$
so that in the end, we have:
$$I\left(a,b,c\right)=\frac{2}{\sqrt{\pi}}\sum_{j=0}^{+\infty}\frac{c^{-\frac{\left(2j+1\right)}{2}}}{\left(2j+1\right)j!}\left(\frac{a^{\frac{2j+3}{2}}}{2}E_{\frac{1-2j}{4}}\left(-a^{2}\right)-\frac{b^{\frac{2j+3}{2}}}{2}E_{\frac{1-2j}{4}}\left(-b^{2}\right)\right)$$
Note that this last result may also be expressed in terms of incomplete Gamma function as $$E_{n}\left(y\right)=y^{n-1}\Gamma\left(1-n,y\right)$$.
