Integration of a square root of a reciprocal function I've been trying to solve this integration for an investigation but have no idea where to start:
$$\int\sqrt{\frac{a+x}{b-x}}dx$$
I've tried integrating by parts, but seem to end up with an even more complicated integral.
I also tried to move the $x$ to the denominator:
$$\int\sqrt{\frac{a+b}{b-x}-1}dx$$
But I don't think I've ever solved an integral like this before.
with $$t=\sqrt{\frac{a+x}{b+x}}$$ we get
$$x=\frac{t^2b-a}{1+t^2}$$ and $$dx=\frac{2t(a+b)}{(t^2+1)^2}dt$$ and our integral is given by now as $$\int\frac{2t^2(a+b)}{(t^2+1)^2}dt$$
Hint:

If $x\ne -a,$ we need $$(x+a)(x-b)&lt;0$$

Assuming $b&gt;-a,$ we need $$-a&lt;x&lt;b$$

$\iff p-a&lt;p+x&lt;p+b$

If we set $p+b=-(p-a),2p=a-b\implies\dfrac{a-b}2-a&lt;\dfrac{a-b}2+x&lt;\dfrac{a-b}2+b$

Set $\dfrac{a-b}2+x=\dfrac{a+b}2\cdot\cos2t$

$\iff x=b\cos^2t-a\sin^2t$

$x+a=?,b-x=?$