Apparently inoffensive indefinite integral. (grad student here) I've been dealing with these for a while, and tried different things with no success as of yet:
$$
\int \frac {dx}{(x²+c²)\sqrt{(x-a)(x-b)}}
$$
$a$, $b$ and $c$ are real positive numbers.
Trying solving it in Mathematica, if $c=0$, the answer is pretty reasonable, but if $c\neq0$, everything goes bananas, giving imaginary numbers.
Any help, will be appreciated.
 A: Using Maple I am obtaining the solution in terms of elementary functions

A: Take $a > b > 0.$ Let $$\gamma = \left( \frac{a+b}{2} \right)$$
 $$\delta = \left( \frac{a-b}{2} \right)$$
Let
$$  x = u + \gamma, $$ so the square root part is
$$ \sqrt{u^2 - \delta^2}.  $$
Next, take
$$  u = \delta \cosh t $$
EDIT: The analog of the Weierstrass substitution, when using hyperbolic trig functions, is to take a rational function of $\cosh t$ and $\sinh t$ and turn that into a rational function of another variable. After that one may hope to make progress with partial fractions.  
$$   t = \log \left( \frac{1 + w}{1 - w} \right), $$
$$ \cosh t =  \frac{1 + w^2}{1 - w^2},   $$
$$ \sinh t =  \frac{2w}{1 - w^2},   $$
$$ \tanh t =  \frac{2w}{1 + w^2}.   $$
$$ d t =  \frac{2dw}{1 - w^2},   $$
The original is for ordinary trig functions, http://en.wikipedia.org/wiki/Tangent_half-angle_substitution
Second to the right, and straight on till morning.
That, Peter had told Wendy, was the way to the Neverland; but even birds, carrying maps and consulting them at windy corners, could not have sighted it with these instructions. Peter, you see, just said anything that came into his head. 
Typed everything needed to use hyperbolic trig functions in integrals in my permanent Latex file; variable names not consistent with the paragraphs above.
$$   x = \log \left( \frac{1 + w}{1 - w} \right) = 2 \; \mbox{arctanh} \; w, $$
$$ \cosh x =  \frac{1 + w^2}{1 - w^2},   $$
$$ \sinh x =  \frac{2w}{1 - w^2},   $$
$$ \tanh x =  \frac{2w}{1 + w^2}.   $$
$$ d x =  \frac{2dw}{1 - w^2}.   $$
$$ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= $$
$$  \cosh^2 x - \sinh^2 x = 1 $$
$$ 1 - \tanh^2 x = \mbox{sech}^2 \; x    $$
$$ \cosh x + \sinh x = e^x  $$
$$ \cosh x - \sinh x = e^{-x}  $$
$$ \sinh (x+y) = \sinh x \cosh y + \cosh x \sinh y   $$
$$ \cosh  (x+y) = \cosh x \cosh y + \sinh x \sinh y $$
$$  \tanh (x+y) = \frac{\tanh x + \tanh y}{1 + \tanh x \tanh y}  $$
$$ \sinh \frac{x}{2} = \pm \sqrt { \frac{\cosh x - 1}{2}   } $$
$$ \cosh \frac{x}{2} =  \sqrt { \frac{\cosh x + 1}{2}   } $$
$$ \tanh \frac{x}{2} = \pm \sqrt { \frac{\cosh x - 1}{\cosh x + 1}   } = \frac{\cosh x - 1}{\sinh x} = \frac{\sinh x}{\cosh x + 1} $$
$$  \mbox{arcsinh} \; x = \log \left( x + \sqrt{x^2 + 1} \right) $$
$$  \mbox{arccosh} \; x = \log \left( x + \sqrt{x^2 - 1} \right), \; \; \; x \geq 1 $$
$$  \mbox{arctanh} \; x =  \frac{1}{2} \; \log \left(  \frac{1 + x}{1 - x} \right), \; \; \; |x | < 1 $$
