I was reading about the Hilbert matrix and Cauchy determinants:

\[ \det \left[ \frac{1}{i+j-1} \right]_{i,j} \]

By guessing where this determinant is $0$ or $\infty$ we can guess the right formula. In Wikipedia, I found this problem:

"Assume that $I = [a, b]$ is a real interval. Is it then possible to find a non-zero polynomial $P$ with integral coefficients, such that the integral $\int_a^b P(x)^2\, dx$ is smaller than any given bound $\varepsilon > 0$, taken arbitrarily small?"

To answer this question, Hilbert derives an exact formula for the determinant of the Hilbert matrices and investigates their asymptotics. He concludes that the answer to his question is positive if the length $b − a$ of the interval is smaller than $4$.

I'm asking for a reference / proof to this exercise. I think you can expand $P$ in Legendre polynomials, or use the Gram determinant.

In general, why is this matrix related to approximation theory?