Asymptotic form of the density profile for Gaussian and Laguerre random matrix ensembles with orthogonal and symplectic symmetry