# What is the integral of $e^x \tan(x)$?

What is the integral of $e^x \tan(x)$? Using basic theorems it is difficult to get I think.

• Nothing elementary, I'm afraid. You'll need the Gaussian hypergeometric function for this... – J. M. isn't a mathematician Feb 9 '12 at 17:09
• Please explain meaning of 'Nothing elementary'? Please provide me details regarding elementary and non elementary. – Inquisitive Feb 9 '12 at 17:15
• You are aware of the concept of an "elementary function", no? The integral you have cannot be expressed in terms of those. – J. M. isn't a mathematician Feb 9 '12 at 17:17
• Elementary Functions are the basic functions that we all know and all of the functions that we can make out of them, for example: $x$,$\sin x$, $e^x$, $\arctan (\ln x)$ and so.. J.M meant that the answer for this integral will not be any combination of these functions. – Jozef Feb 9 '12 at 17:40
• @sree: Concerning the concept of "elementary function" see this Wikipedia's entry. – Américo Tavares Feb 9 '12 at 17:44

## 3 Answers

$$\tan(x) = -i \frac{1-e^{-2ix}}{1+e^{-2ix}} = -i - 2 i \sum_{k=1}^\infty (-1)^k e^{-2ikx}$$ (converging for $\text{Im}(x) < 0$)

\begin{align} \int e^x \tan(x)\ dx &= -i e^x - 2 i \sum_{k=1}^\infty (-1)^k \int e^{(1-2ik)x}\ dx \\ &= -i e^x -2i \sum_{k=1}^\infty \frac{(-1)^k}{1-2ik} e^{(1-2ik)x} + C \\ &= -i{{ e}^{x}}-{\rm LerchPhi} \left( -{{ e}^{-2ix}},1,1+i/2 \right) {{ e}^{(1-2i)x}} + C \end{align}

This Lerch Phi function can also be expressed in terms of a hypergeometric function:

$${\rm LerchPhi} \left( z,1,1+\frac{i}{2} \right) = \frac{ 4-2i }{5} \ {\mbox{_2F_1}\left(1,1+\frac{i}{2};2+\frac{i}{2};z\right)}$$

• I took the liberty of reformatting your maths, as it was line breaking in an odd place in my browser. I hope that's OK. – user856 Feb 9 '12 at 19:55

I'm not sure sree was asking for an elementary answer, though it is possible. I can't comment yet, so I'm putting this in an answer area, though it doesn't answer; my apologies.

Comment: Are there good (and accessible) references for sree for how to utilize hypergeometric functions for doing indefinite integrals? For instance, would writing $e^x \tan(x)$ as a power series (or just the $\tan(x)$ part) and using some kind of uniform convergence and definitions of HG functions help?

• Well, one possible route is to expand the integrand as a series, integrate termwise, and then apply any number of methods for recognizing hypergeometric series, like the ones embodied in the work of Gosper, Zeilberger, Koutschan, etc. – J. M. isn't a mathematician Feb 9 '12 at 17:46
• Fair enough, though I think that "any number of methods" probably requires some elaboration. @Robert's answer is great - is there a specific book which would introduce to these sorts of things by hand (as opposed to using an algorithm)? (Even if one has to pore through a massive table of such series...) – kcrisman Feb 10 '12 at 4:11

It is not expressible as an elementary function. integrals.com expresses it using hypergeometric functions:

$$-i \left( -{{\rm e}^{x}} {\mbox{_2F_1}(1,-i/2;1-i/2;\,-{{\rm e}^{2ix}})}+ \left( 1/5-2i/5 \right) {{\rm e}^{ \left( 1+2i \right) x}} {\mbox{_2F_1}(1,1-i/2;2-i/2;\,-{{\rm e}^{2ix}})} \right)$$

• I couldn't find any method to solve this. :( – Inquisitive Feb 9 '12 at 17:12