# Tricky integral with exponentials

So, I was trying to integrate $$\mathcal{I}:=\int_{0}^{\gamma}du\frac{u}{z-e^u}\frac{1}{\sqrt{e^{2\gamma}-e^{2u}}},$$ with $$z,\gamma\in\mathbb{R}$$, $$z>e^{\gamma}$$, and $$\gamma>0$$. A very similar integral (without a factor of $$u$$ in the integrand) can be solved as $$\int_{0}^{\gamma}du\frac{1}{z-e^u}\frac{1}{\sqrt{e^{2\gamma}-e^{2u}}}=\frac{\pi }{2 z \sqrt{z^2-e^{2 \gamma }}}-\frac{\tanh ^{-1}\left(\frac{e^{2 \gamma }-z}{\sqrt{e^{2 \gamma }-1} \sqrt{e^{2 \gamma }-z^2}}\right)}{z \sqrt{e^{2 \gamma }-z^2}}+\frac{e^{-\gamma } \tanh ^{-1}\left(e^{-\gamma } \sqrt{e^{2 \gamma }-1}\right)}{z}.$$ However, I can't seem to figure out how to solve the integral $$\mathcal{I}$$. The above integral suggests that I should maybe try integration by parts, but then I just get a different integral that I don't know how to solve.

How would one go about solving this integral $$\mathcal{I}$$? (Or, at least, how would one get the antiderivative?)

• Why do you think it can be done in elementary functions? With integrals, that's possible only in exceptional cases.
– user436658
Dec 18, 2020 at 16:39
• I don't necessarily know that it can (although it would be nice if it could). I'm also willing to settle for non-elementary functions like elliptic integrals, the error function, logarithmic integrals, exponential integrals, and other special functions. Dec 18, 2020 at 16:46