Integral of $1 / \sqrt {(a x + b) (p x + q)}$ I am working on this:
$\displaystyle \int \dfrac 1 {\sqrt {(a x + b) (p x + q)} } \ \mathrm d x$
valid where $(a x + b)(p x + q) > 0$.
I am specifically interested in the case where $\dfrac {b p - a q} p < 0$.
I do this:
Let $u = \sqrt {a x + b}$
$\leadsto x = \dfrac {u^2 - b} a$
$\leadsto \sqrt {p x + q} = \sqrt {p \left({\dfrac {u^2 - b} a}\right) + q}$
$= \sqrt {\dfrac {p \left({u^2 - b}\right) + a q} a}$
$= \sqrt {\dfrac {p u^2 - b p + a q} a}$
$= \sqrt {\dfrac p a} \sqrt {u^2 - \left({\dfrac {b p - a q} p}\right) }$
Then by a standard result:
$\displaystyle \int \frac {\mathrm d x} {\sqrt {(a x + b) (p x + q) } } = \int \frac {2 u \mathrm d u} {a \sqrt {\frac p a} \sqrt {u^2 - \left({\frac {b p - a q} p}\right) } u}$
$= \dfrac 2 {\sqrt {a p} } \int \dfrac {\mathrm d u} {\sqrt {u^2 - \left({\dfrac {b p - a q} p}\right) } }$
Now let $\dfrac {b p - a q} p < 0$.
Let $c^2 = -\dfrac {b p - a q} p$.
This gives us:
$\displaystyle \int \dfrac 1 {\sqrt {(a x + b) (p x + q)} } \ \mathrm d x = \frac 2 {\sqrt {a p} } \int \frac {\mathrm d u} {\sqrt {u^2 + c^2} }$
$= \dfrac 2 {\sqrt {a p} } \sinh^{-1} {\dfrac u c} + C$ (standard result)
$= \dfrac 2 {\sqrt {a p} } \sinh^{-1} \dfrac {\sqrt {a x + b} } {\sqrt {\dfrac {a q - b p} p} } + C$
(because $\dfrac {b p - a q} p = -\dfrac {a q - b p} p$)
$= \dfrac 2 {\sqrt {a p} } \sinh^{-1} \sqrt {\dfrac {p (a x + b) } {a q - b p} } + C$
But when I look in the book (in this case Murray Spiegel's "Mathematical Handbook of Formulas and Tables" (Schaum, 1968), I see this as result $14.120$:
$\displaystyle \int \dfrac 1 {\sqrt {(a x + b) (p x + q)} } \ \mathrm d x = \dfrac 2 {\sqrt {-a p} } \arctan \sqrt {\dfrac {-p (a x + b) } {b p - a q} } + C$
Can't see where I'm doing it wrong.

Amplified comment: "Convert an $\arcsin$ to an $\arctan$."
I learned this long ago because certain computer languages had only $\arctan$ as built-in function, and you had to use formulas if you wanted $\arcsin, \arccos$, etc.   (BASIC had ATN arctangent, but none of the other "arc" trig functions)
So here it is:
$$
\arcsin t = 2 \arctan\left(\frac{t}{1+\sqrt{1-t^2}}\right)
$$
Here are the graphs.
 
Identical
