Primitive of Reciprocal of p by Exponential of a x plus q by Exponential of -a x

Theorem

 * $\displaystyle \int \frac {\d x} {p e^{a x} + q e^{-a x} } = \begin{cases}

\displaystyle \frac 1 {a \sqrt {p q} } \map \arctan {\sqrt {\frac p q} e^{a x} } & : \sqrt {p q} > 0 \\ \displaystyle \frac 1 {2 a \sqrt {-p q} } \ln \size {\frac {e^{a x} - \sqrt {-\frac q p} } {e^{a x} + \sqrt {-\frac q p} } } & : \sqrt {p q} < 0 \\ \end{cases}$

Proof
Let $\dfrac q p > 0$.

Then:

Let $\dfrac q p < 0$.

Then let $d^2 = -\dfrac q p$ and so: