I have seen the following integral on the internet: 
How is this derived?
I have done searching on Google for days and got no satisfying answer.
In particular, I would like to ask how are integrals related to hypergeometric functions?
And why, when $a=b$, the hypergeometric function reduces to an elementary function?
Also, does the above integral result hold true when $a, b$ are complex numbers?
Thanks in advance.
The result follows from $$\begin{split}\mathrm{e}^{ax}\tanh bx &=\mathrm{e}^{ax}\left(\frac{\mathrm{e}^{bx}-\mathrm{e}^{-bx}}{\mathrm{e}^{bx}+\mathrm{e}^{-bx}} \right)\\ &=\mathrm{e}^{ax}\left(\frac{\mathrm{e}^{2bx}-1}{\mathrm{e}^{2bx}+1}\right)\\ &=\frac{\mathrm{e}^{(a+2b)x}}{1+\mathrm{e}^{2bx}}-\frac{\mathrm{e}^{ax}}{1+\mathrm{e}^{2bx}}\\ &=\mathrm{e}^{(a+2b)x}\,_1F_0(1;;-\mathrm{e}^{2bx})-\mathrm{e}^{ax}\,_1F_0(1;;-\mathrm{e}^{2bx})\\ \end{split}$$ and $$\int \mathrm{e}^{ux}\,_1F_0(1;;-\mathrm{e}^{vx})=\frac{\mathrm{e}^{ux}}{u}\,_2F_1(1,\tfrac{u}{v};1+\tfrac{u}{v};-\mathrm{e}^{vx})+C\text{.}$$
In turn, these equalities follow directly from the definition of the hypergeometric series. I expect the original identity to hold for complex $a$ and $b$ such that $2b$ is not a negative multiple of $a$, because for those values denominators in the hypergeometric series become ill-defined. Finally, when $a=b$, the substitution $z=\mathrm{e}^{ax}$ lets one express the integral via elementary methods.