# Why am I obtaining an imaginary part for my integration

I try to solve an integration as follows,

$$\int \frac{sy^{-1}}{(1+sy^{-1})} \text{exp}(-\sqrt{y})dy$$

as you can see its pretty complicated, and I get an answer like the following using Wolfram Alpha $$e^{-i \sqrt{s}} s \left(e^{2 i \sqrt{s}} \text{Ei}\left(-i \sqrt{s}-\sqrt{y}\right)+\text{Ei}\left(i \sqrt{s}-\sqrt{y}\right)\right)$$

My question is I dont understand where this imaginary part is coming from? Any thoughts?

• The result is twice the real part of a complex number. Oct 30, 2014 at 15:36
• You can try adding an "Assumptions-> s $\in$ Reals" in the Integrate[] function. Oct 30, 2014 at 15:38
• @user_of_math is this the way it should be written Integrate[(sy^-1)/(1+sy^-1)* exp(-\sqrt(y)),{y}, Assumptions-> s \in Real] Oct 30, 2014 at 15:40
• i think $Ei$ stands for exponential integral Oct 30, 2014 at 15:42
• yup thats true but I don't understand where the imaginary is coming from Oct 30, 2014 at 15:43

The complex form comes from the fact that, after subbing $y=u^2$, you get an integral of the form
$$\int du \frac{2 s u}{s+u^2} e^{-u}$$
$$\frac{2 s u}{s+u^2} = s \left (\frac1{u-i \sqrt{s}} - \frac1{u+i \sqrt{s}} \right )$$