Primitive of Reciprocal of p plus q by Hyperbolic Cosine of a x

Theorem
For $p \ne q$:


 * $\ds \int \frac {\d x} {p + q \cosh a x} = \begin {cases}

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

Proof
Let:

Hence:

The discriminant of $q u^2 + 2 p u + q$ is given by:

Hence the result depends on the sign of $p^2 - q^2$.

Let $p^2 < q^2$.

Then:

Let $p^2 > q^2$.

Then:

Also see

 * Primitive of $\dfrac 1 {\cosh a x + 1}$ for the case where $p = q$


 * Primitive of $\dfrac 1 {p + q \sinh a x}$


 * Primitive of $\dfrac 1 {p + q \tanh a x}$


 * Primitive of $\dfrac 1 {p + q \coth a x}$


 * Primitive of $\dfrac 1 {q + p \sech a x}$


 * Primitive of $\dfrac 1 {q + p \csch a x}$