Wolfram alpha gives me the integral
$$J=\int_a^0\dfrac{dx}{\sqrt{\dfrac{a}{x}-1}}=-\dfrac{\pi a}{2}$$
However, making the integral by hand with the change $t^2=\sqrt{\dfrac{a}{x}-1}$ gives me only $J=-a\pi$. What am I missing?
Wolfram alpha gives me the integral
$$J=\int_a^0\dfrac{dx}{\sqrt{\dfrac{a}{x}-1}}=-\dfrac{\pi a}{2}$$
However, making the integral by hand with the change $t^2=\sqrt{\dfrac{a}{x}-1}$ gives me only $J=-a\pi$. What am I missing?
I am not sure what kind of mistake occure precisely because you didn't show you the way you work it out, but I think this kind of question can be solved by trigonometry substitution, here is my method:
$\begin{aligned}J&=\int_{a}^{0}\frac {dx}{\sqrt{\frac{a}{x}-1}}~(Substitute~x~by~acos^2y,~y~is~from~0~to~\frac{\pi}{2})\\&=\int_{0}^{\frac{\pi}{2}}\frac {d(acos^2y)}{\sqrt{sec^2y-1}}\\&=-\int_{0}^{\frac{\pi}{2}}\frac {2acosysinydy}{\sqrt{sec^2y-1}}\\&=-\int_{0}^{\frac{\pi}{2}}\frac {2acosysinydy}{tany}\\&=-\int_{0}^{\frac{\pi}{2}}2acos^2ydy\\&=-\int_{0}^{\frac{\pi}{2}}a(cos2y+1)dy\\&=-\int_{0}^{\frac{\pi}{2}}acos2ydy-\int_{0}^{\frac{\pi}{2}}ady\\&=\frac{1}{2}asin2y|_{0}^{\frac{\pi}{2}}-ay|_{0}^{\frac{\pi}{2}}\\&=0-\frac{a\pi}{2}\\&=-\frac{a\pi}{2}\end{aligned}$
So the answer is $-\frac{a\pi}{2}$
I found out I missed one point in my simple fraction decomposition. I will show you my result and where I missed the two factor (arithmetical error, my mistake). After my change:
$$J=-a\int_0^\infty 2(x^2)'(1/(1+(x^2)^2)^2)dx$$
Then I made a naughty trick, since now I define
$$I=\int_0^\infty \dfrac{(x^2)'}{1+(x^2)^2}\dfrac{1}{1+(x^2)^2}dx$$
I make the decomposition
$$\dfrac{2(x^2)'}{1+(x^2)^2}\dfrac{1}{1+(x^2)^2}=\dfrac{(x^2)'}{(1+(x^2)^2)}+\dfrac{A}{(1+(x^2)^2)^2}$$ And here is where I made an error because I should have included de 2 in $J$ for a best simple fraction ( I lost the 2 factor now included above), and thus I get
$$A=2x-2x^5$$
and therefore the integral splitting reads:
$$J/(-a)=tan^{-1}(x^2)\vert_0^\infty+\int_0^\infty\dfrac{2x-x^5}{(1+x^4)^2}dx$$
The last integral can also be done with a mischivious trick: adjusting a quotient derivative. It can be shown that
$$\dfrac{d}{dx}\left(\dfrac{Ax^2+Bx+C}{(1+x^4)}\right)=\dfrac{2x-x^5}{(1+x^4)^4}$$
if we fit $$A=1, B=C=0$$ Therefore:
$$J/(-a)=tan^{-1}(x^2)\vert_0^\infty+\dfrac{x^2}{1+x^4}\vert_0^\infty$$
Evaluating the integral, finally i get $-\pi a/2$ since the second term vanishes in the given limits. I lost the 2 fact in the fraction decomposition and so I lost the right coefficient after some manipulations the right numbers...
P.S.: By the way, I did not realize the change with $cos^2$. It would have made my calculations easier. However, I learned to be more careful with numbers in decompositions myself. Machines are surely less doomed to fail in these numerical mistakes. Damn!