The density matrix for the impenetrable Bose gas in Dirichlet and Neumann boundary conditions can be written in terms of n l=1 | cos φ1 − cos θ l || cos φ2 − cos θ l | , where the average is with respect to the eigenvalue probability density function for random unitary matrices from the classical groups Sp(n) and O + (2n) respectively. In the large n limit log-gas considerations imply that the average factorizes into the product of averages of the form n l=1 | cos φ − cos θ l | . By changing variables this average in turn is a special case of the function of t obtained by averaging n l=1 |t − x l | 2q over the Jacobi unitary ensemble from random matrix theory. The latter task is accomplished by a duality formula from the theory of Selberg correlation integrals, and the large n asymptotic form is obtained. The corresponding large n asymptotic form of the density matrix is used, via the exact solution of a particular integral equation, to compute the asymptotic form of the low lying effective single particle states and their occupations, which are proportional to √ N .