# Math Help - Primitive of 1 / (p + q cos a x)

1. ## Primitive of 1 / (p + q cos a x)

No. 390.

This is what the book says:

$\displaystyle \int \frac {\mathrm d x} {p + q \cos a x} = \begin{cases} \displaystyle \frac 2 {a \sqrt {p^2 - q^2} } \arctan \left({\sqrt {\frac {p - q} {p + q} } \tan \dfrac {a x} 2}\right) + C & : p^2 > q^2 \\ \displaystyle \frac 1 {a \sqrt {q^2 - p^2} } \ln \left\vert{\frac {\tan \dfrac {a x} 2 + \sqrt {\dfrac {q + p} {q - p} } } {\tan \dfrac {a x} 2 - \sqrt {\dfrac {q + p} {q - p} } } }\right\vert + C & : p^2 < q^2 \\\end{cases}$

... but I'm not getting the same when I work through it, as follows:

Weierstrass substitution:

$u = \tan \dfrac {a x} 2$

delivers:

$\int \frac {\mathrm d x} {p + q \cos a x} = \frac 2 {a \left({p + q}\right)} \int \frac {\mathrm d u} {u^2 + \dfrac {p - q} {p + q} }$

Let $p^2 > q^2$.

Then:

$\dfrac {p - q} {p + q} > 0$

Thus, let $\dfrac {p - q} {p + q} = d^2$.

Then:

$\int \frac {\mathrm d x} {p + q \sin a x}r = \frac 2 {a \left({p + q}\right)} \int \frac {\mathrm d u} {u^2 + d^2}$

$= \frac 2 {a \left({p + q}\right)} \frac 1 d \arctan \frac u d + C$ (by standard integrals)

$= \frac 2 {a \left({p + q}\right)} \frac 1 {\sqrt {\dfrac {p - q} {p + q} } } \arctan \left({\frac {\tan \dfrac {a x} 2} {\sqrt {\dfrac {p - q} {p + q} } } }\right) + C$ (substituting for $u$ and $d$)

$= \frac 2 {a \sqrt {p^2 - q^2} } \arctan \left({\sqrt {\frac {p + q} {p - q} } \tan \dfrac {a x} 2}\right) + C$
$\blacksquare$

I can't reconcile the $\sqrt {\dfrac {p + q} {p - q} }$ given here with the $\sqrt {\dfrac {p - q} {p + q} }$ as given above.

Now let $p^2 < q^2$.

Then: $\dfrac {p - q} {p + q} < 0$

Thus, let:

$-\dfrac {p - q} {p + q} = d^2$

or:

$\dfrac {q - p} {q + p} = d^2$

This forces us to write the integrand in the form:

$\int \frac {\mathrm d x} {p + q \sin a x} = \frac 2 {a \left({p + q}\right)} \int \frac {\mathrm d u} {u^2 - d^2}$

$= \frac 2 {a \left({p + q}\right)} \frac 1 {2 d} \ln \left\vert{\frac {u - d} {u + d} }\right\vert + C$ (standard integral)

Substituting for $u$ and $d$:

$= \frac 2 {a \left({p + q}\right)} \frac 1 {2 \sqrt {\dfrac {q - p} {q + p} } } \ln \left\vert{\frac {\tan \dfrac {a x} 2 - \sqrt {\dfrac {q - p} {q + p} } } {\tan \dfrac {a x} 2 + \sqrt {\dfrac {q - p} {q + p} } } }\right\vert + C$

$= \frac 1 {a \sqrt {q^2 - p^2} } \ln \left\vert{\frac {\tan \dfrac {a x} 2 - \sqrt {\dfrac {q - p} {q + p} } } {\tan \dfrac {a x} 2 + \sqrt {\dfrac {q - p} {q + p} } } }\right\vert + C$ after simplifying
$\blacksquare$

Again, this is different from how it appears in the source work.

The question is: who's got it wrong -- me or Murray R. Spiegel in his Mathematical Handbook of Formulas and Tables? He has been known to be wrong before.

2. ## Re: Primitive of 1 / (p + q cos a x)

The book says

$\int \frac{1}{5-4 \cos x} \, dx =\frac{2}{3} \arctan (3 \tan (x/2))$

The book also says

$\int \frac{1}{-5+4 \cos x} \, dx =\frac{2}{3} \arctan (3 \tan (x/2))$

This can't be right

3. ## Re: Primitive of 1 / (p + q cos a x)

Originally Posted by Idea
The book says

$\int \frac{1}{5-4 \cos x} \, dx =\frac{2}{3} \arctan (3 \tan (x/2))$

The book also says

$\int \frac{1}{-5+4 \cos x} \, dx =\frac{2}{3} \arctan (3 \tan (x/2))$

This can't be right
Same applies with the version I worked out:

$\int \frac{1}{5-4 \cos x} \, dx = \frac{2}{3}\arctan \left({\sqrt {\frac{5 + (-4)}{5 - (-4)}} \tan (x/2)}\right) = \frac{2}{3}\arctan \left({\sqrt {\frac{1}{9}} \tan (x/2)}\right) = \frac{2}{3}\arctan \left({\frac{1}{3} \tan (x/2)}\right)$

$\int \frac{1}{-5 + 4 \cos x} \, dx = \frac{2}{3}\arctan \left({\sqrt {\frac{-5 + 4}{-5 - 4}} \tan (x/2)}\right) = \frac{2}{3}\arctan \left({ \sqrt {\frac{-1}{-9}} \tan (x/2)}\right) = \frac{2}{3}\arctan \left({\frac{1}{3} \tan (x/2)}\right)$

So whatever the resolution of the fact that $\int (-f) \, dx = \int f \, dx$, it's unrelated to the wrongness / rightness of the integral.