I am trying to evaluate the following integral $$\int_{-a}^{a} \frac{e^{(t+a)}E_1(t+a)\sqrt{a^2-t^2 }}{t-z} dt$$ where $E_1(z)$ is the exponential integral $$E_1(z)=\int_z^\infty\frac{e^{-t}}{t}dt$$ $z$ is complex and $|\text{arg} z|<\pi$. I thought I could use the Cauchy integral formula by converting to a contour in the complex plane that encircled $-a \le t \le +a$. But because $E_1(z)$ is only defined for $|\text{arg} z|<\pi$ I could not devise a contour that did not cross the real axis for $\text{Re} (z) \le -a$. Does anyone have suggestions?
I think I have managed to solve this integral by using the contour sketched below. If anyone has the stamina to check the solution I would appreciate it. Also any suggestions about how to do the remaining integral.\begin{equation} \oint_C \frac{f(t)}{t-z} dt = \int_{AB} +\int_{BC} + \int_{CD} + \int_{DE} +\int_{EA} \end{equation} By the residue theorem \begin{eqnarray} \oint_C \frac{f(t)}{t-z} dt &=& 2\pi i\; \text{residue at }t=z \\ &=& 2\pi i e^{(z+a)}E_1(z+a) \sqrt{a^2-z^2} \\ &=& -2\pi e^{(z+a)}E_1(z+a) \sqrt{z^2-a^2} \end{eqnarray}On $AB$ and $BC$ \begin{equation} \int_{AB} +\int_{BC}=\int_{-a}^{+a} \frac{e^{(t+a)}E_1(t+a) \sqrt{a-t}\sqrt{a+t}}{t-z} dt + \int_{+a}^{-a} \frac{e^{(t+a)}E_1(t+a) \sqrt{a-t}\sqrt{a+t}}{t-z} dt \end{equation} Let $a-t=-R_1 \exp(i\theta_1)$ and $a+t=R_2 \exp(i\theta_2)$. On $AB$, $\theta_1=\pi$ and $\theta_2=0$. On $C_{BC}$, $\theta_1=-\pi$ and $\theta_2=0$. Therefore, \begin{equation} \int_{AB} +\int_{BC} =\int_{-a}^{+a} e^{(t+a)}E_1(t+a) \left[ \sqrt{-R_1} e^{i\pi/2}\sqrt{R_2} e^0 -\sqrt{-R_1} e^{-\pi/2}\sqrt{R_2}e^{0} \right ] \frac{dt}{t-z} \end{equation} Using $\sqrt{-R_1} =i \sqrt{a-t}$ gives \begin{equation} \int_{AB} +\int_{BC} =-2I \end{equation} Work on the integral DE. Let $t=Re^{i\theta}$, $dt=Rie^{i\theta}$, $\theta_+=\pi - \epsilon$, $\theta_- = -\pi + \epsilon$ and use the asymptotic result \begin{equation} e^z E_1(z) \rightarrow \frac{1}{z} \text{as} \;\lvert z \rvert \rightarrow \infty,\; \lvert \arg(z) \rvert<3\pi/2 \end{equation} \begin{equation} \lim_{R \rightarrow \infty} \int_{-\pi + \epsilon}^{\pi - \epsilon} \frac{1}{Re^{i\theta}+a} \frac{\sqrt{a^2-R^2 e^{2i\theta}}}{Re^{i\theta}-z}iRe^{i \theta}d\theta =-2\pi\; \text{as} \; \epsilon \rightarrow 0 \end{equation}ow work on EA. Letting $t=-a+se^{i\theta_+}$ gives \begin{equation} \int_{EA}=-\int_0^{\infty} \left \{ e^{s e^{i \theta_+}} E_1(se^{i \theta_+}) \sqrt{a^2-(-a+s e({i \theta_+))^2}} \right \} \frac{e^{i \theta_+} ds}{-a + s e^{(i \theta_+)}-z} \end{equation} The integral CD is the same except for the minus sign in front and replacing $\theta_+$ by $\theta_-$. Combining and evaluating as $\lim_{\epsilon \rightarrow 0}$ gives \begin{equation} \int_0^\infty \frac{e^{-s} \sqrt{a^2-(-a-s)^2}}{-a-s-z} \left \{E_1 (-s+i 0) - E_1(-s - i0)\right \}ds \end{equation}According to Abramowitz and Stegun 5.17 (Handbook of Mathematical Functions) \begin{equation} E_1 (-s+i 0) - E_1(-s - i0)=-2i\pi \end{equation} Putting all together and cancelling the 2 gives \begin{equation} -\pi e^{(t+a)}E_1(t+a) \sqrt{z^2-a^2}=-I-\pi -\pi\int_0^\infty \frac{e^{-s} \sqrt{s^2+2as}}{a+s+z} ds \end{equation} or \begin{equation} (1/\pi)I=e^{(t+a)}E_1(t+a) \sqrt{z^2-a^2}-1 -\int_0^\infty \frac{e^{-s} \sqrt{s^2+2as}}{a+s+z} ds \end{equation} https://i.imgur.com/IMG-1950.jpg "contour"