How can one evaluate the integral $\int\sqrt{\frac{1-ax}{1-x}}\ dx$? How can I evaluate the following integral:
$$\int\sqrt{\frac{1-ax}{1-x}}\ dx?$$
Here $a$ is a positive constant. I know that the function 
$$\sqrt{\frac{1-ax}{1-x}}$$
has a primitive, but I don't know how to find it.
 A: The standard way for these integrals is to use substitution: set
$$y^2=\frac{1-ax}{1-x}=a+\frac{1-a}{1-x},\enspace y>0,\enspace\text{whence}\enspace \mathrm 2y\, d\mkern1mu y=\frac{1-a}{(1-x)^2}\mathrm d\mkern1mu x$$
so that
$$\mathrm d\mkern1mu x =2y\frac{(1-x)^2}{1-a}y=\frac{2(1-a)y}{(y^2-a)^2}\mathrm d\mkern1mu y$$
and finally 
\begin{align*}\int\sqrt{\frac{1-ax}{1-x}}\,\mathrm d\mkern1mu x&=2(1-a)\int \frac{y^2}{(y^2-a)^2}\,\mathrm d\mkern1mu y=2(1-a)\int \frac{\mathrm d\mkern1mu y}{y^2-a}+2a(1-a)\int \frac{\mathrm d\mkern1mu y}{(y^2-a)^2}\\
&=\frac{1-a}{\sqrt a}\,\ln\biggl(\frac{y-\sqrt a}{y-\sqrt a}\biggr)\end{align*}
Now use partial fractions:$$\frac{y^2}{(y^2-a)^2}=\frac A{y-\sqrt a}+\frac B{y+\sqrt a}+\frac C{(y-\sqrt a)^2}+\frac D{(y+\sqrt a)^2}$$


*

*For symmetry reasons, one has $A=-B$, $C=D$.

*Multiplying both sides by $(y-\sqrt a)^2$ and setting $y=\sqrt a$ shows $\,C=D=\dfrac14$.

*Setting $y=0\,$ leads to $A=-B=\dfrac1{4\sqrt a}$
Thus
\begin{align*}\int \frac{y^2}{(y^2-a)^2}\,\mathrm d\mkern1mu y&=\dfrac1{4\sqrt a}\,\ln\biggl(\frac{y-\sqrt a}{y+\sqrt a}\bigg)-\frac14\biggl(\frac1{y-\sqrt a}+\frac1{y+\sqrt a}\biggr)\\
&=\dfrac1{4\sqrt a}\,\ln\biggl(\frac{y-\sqrt a}{y+\sqrt a}\bigg)-\frac y{2(y^2-a)}\\
&=\dfrac1{4\sqrt a}\,\ln\biggl(\frac{\sqrt{1-ax}-\sqrt{a(1+ax)}}{\sqrt{1-ax}+\sqrt{a(1+ax)}}\biggr)-\frac{\sqrt{(1-x)(1-ax)}}{2(1-a)}.
\end{align*}

A: Trying to get rid of the radical, just try $$\frac{1-ax}{1-x}=u^2$$ that is to say $$x=\frac{u^2-1}{u^2-a}$$ $$dx=-\frac{2 (a-1) u}{\left(a-u^2\right)^2}\, du$$ So, $$I=\int\sqrt{\frac{1-ax}{1-x}}\ dx=2 (1-a)\int\frac{ u^2}{\left(a-u^2\right)^2}\,du$$ Now, change again $u=t\sqrt a$ so $$I=\frac{2 (1-a) }{\sqrt{a} }\int\frac{t^2}{(t^2-1)^2}\,dt$$ Now, use partial fraction de composition $$\frac{t^2}{(t^2-1)^2}=-\frac{1}{4 (t+1)}+\frac{1}{4 (t+1)^2}+\frac{1}{4 (t-1)}+\frac{1}{4 (t-1)^2}$$
I hope that I did not introduce any mistake.
I am sure that you can take from here.
A: Try the sustitution $x = \frac{1-u^2}{a-u^2}$.Then the integrand $\sqrt{\frac{1 - ax}{1-x}} = u$ hence you can get the primitive by technique of partial fractions. The point is that the curve $y^2(1-x) = 1-ax$ is a cubic with a singular point at infinite. So it can be parametrized by using rational functions: $x = \frac{1-u^2}{a-u^2}$ and $y = u$. Namely, $y$ can be used as a parameter since the singuality is at $[1:0:0]$.
A: $$\frac{1-ax}{1-x}=1+(1-a)\frac{x}{1-x}=1+(1-a)\left(\frac1{1-x}-1\right)=$$
$$=a+\frac{1-a}{1-x}$$
Try the substitution
$$u=\frac{1-a}{1-x}\implies du=\frac{1-a}{(1-x)^2}dx\implies dx=\frac{1-a}{u^2}du\implies$$
$$I=\int\sqrt\frac{1-ax}{1-x}\,dx=\int\sqrt{1+u}\frac{1-a}{u^2}du=(1-a)\int\frac{\sqrt{1+u}}{u^2}du$$
One more substitution:
$$1+u=t^2\implies du=2tdt\implies$$
$$I=2(1-a)\int\frac{t^3}{(t-1)^2(t+1)^2}\,dt$$
Now just develop by partial fractions (coefficients seem to be $\;\frac12\,,\,\,\frac14\,,\,\,\frac12\,,\,\,-\frac14\;$)
