I am trying to compute the integral $$\int\limits_Q^1\sqrt{(1-x^2)(1-\frac{Q^2}{x^2})}\mathrm{d}x$$ where $0\leq Q <1$ is a real number.
I tried to substitute $x=\cos y,$ but this didn't bring much. My other idea was to use complex integration along the lines of https://en.wikipedia.org/wiki/Methods_of_contour_integration#Example_.28VI.29_.E2.80.93_logarithms_and_the_residue_at_infinity. However I am not completely sure how to proceed and to take my branch cuts.
Hint: Maple yields to solution $$\frac{\pi}{4}Q^2-\frac{\pi}{2}Q+\frac{\pi}{4}.$$
$$\mathrm{ I=\int_Q^1{\sqrt{(1-x^2)(x^2-Q^2)}\over x}\,dx }$$ Use the substitution $$\mathrm{ (1-x^2)=z^2(x^2-Q^2)\\ \implies -2xdx=2z(x^2-Q^2)dz+2z^2xdx\\ \implies -x(1+z^2)dx=z(x^2-Q^2)dz\quad\cdots(1) }$$ The definition of $\mathrm z$ implies $$\mathrm{ -x^2(1+z^2)=-(1+z^2Q^2)\;\cdots(2) }$$ Combining $(1),(2)$ we get $$\mathrm{ -{(1+z^2Q^2)\over x}dx=z(x^2-Q^2)dz=z\left({1+z^2Q^2\over1+z^2}-Q^2\right)dz=z{1-Q^2\over1+z^2}dz }$$ And thus our integral turns into $$\mathrm{ I=(1-Q^2)^2\int_0^\infty{z^2\over(1+z^2)^2(1+z^2Q^2)}dz }$$ The integrand has poles of order $2$ at $\mathrm{z=\pm i}$ and simple poles at $\mathrm{\pm{i\over Q}}$. If we use a semi-circular contour in the upper half-plane, we only enclose the poles $\mathrm{ i, {i\over Q}}$ at which residues are $-\mathrm{i(1+Q^2)\over4(1-Q^2)^2}$ and $\mathrm{iQ\over2(1-Q^2)^2}$ respectively and therefore (omitting some details) the required integral is $$\mathrm{ (1-Q^2)^2{1\over2}\times2\pi i\left[\mathrm{i(1+Q^2)\over4(1-Q^2)^2}-\mathrm{iQ\over2(1-Q^2)^2}\right]\\ =\frac{\pi}{4}Q^2-\frac{\pi}{2}Q+\frac{\pi}{4} }$$