For $x >0$ and $a > 0$, consider the following: $$ f(x,a) = \frac{a}{2i} \bigg( e^{i a}\ \mathrm{Ei}(-i a - x) - e^{-i a} \ \mathrm{Ei}(i a - x) \bigg) $$
Where $\mathrm{Ei}(x) = \int_{x}^{\infty} \frac{e^{-u}}{u} du$ is the exponential integral function.
Is this function real-valued? It seems to me that it is.
Furthermore, is there a name for this function? Or a way to write in terms of other special functions?
$\textit{proof}$
Rewrite $$f(z) = \mathrm{Re}f(z)+ i \mathrm{Im}f(z)$$
Then
\begin{align}f(z) - \overline{f(z)} &= \mathrm{Re}f(z)+ i \mathrm{Im}f(z)-\overline{\mathrm{Re}f(z)+ i \mathrm{Im}f(z)}\\ &=\mathrm{Re}f(z)+ i \mathrm{Im}f(z) - \mathrm{Re}f(z)+ i \mathrm{Im}f(z)\\ &=2i \,\mathrm{Im}f(z) \end{align}
Similarly
\begin{align}f(z) + \overline{f(z)} &= \mathrm{Re}f(z)+ i \mathrm{Im}f(z)+\overline{\mathrm{Re}f(z)+ i \mathrm{Im}f(z)}\\ &=\mathrm{Re}f(z)+ i \mathrm{Im}f(z) + \mathrm{Re}f(z)- i \mathrm{Im}f(z)\\ &=2\,\mathrm{Re}f(z) \end{align}
Let $z = x+iy$
\begin{align}e^{iy}\mathrm{Ei}(z) - \overline{e^{iy}\mathrm{Ei}(z)} &= e^{iy}\mathrm{Ei}(z) - \overline{e^{iy}}\overline{\mathrm{Ei}(z)} \\ &=e^{iy}\mathrm{Ei}(z) - e^{-iy}\overline{\mathrm{Ei}(z)} \\ &= 2i \, \mathrm{Im} \{ e^{iy}\mathrm{Ei}(z)\} \end{align}
Hence what is remaining is to prove that
$$\overline{\mathrm{Ei}(z)} = \mathrm{Ei}(\bar{z})$$
$\textit{proof}$
\begin{align}\overline{\mathrm{Ei}(z)} &= \overline{\int^\infty_1\frac{e^{-zx}}{x}\,dx} \\ &= \int^\infty_1\overline{\frac{e^{-zx}}{x}}\,dx\\ &= \int^\infty_1\frac{e^{-\bar{z}x}}{x}\,dx\\ &= \mathrm{Ei}(\bar{z}) \end{align}