  The Lagrange-mesh method has the simplicity of a calculation on a mesh and
can have the accuracy of a variational method. It is applied to the study of a
confined helium atom. Two types of confinement are considered. Soft
confinements by potentials are studied in perimetric coordinates. Hard
confinement in impenetrable spherical cavities is studied in a system of
rescaled perimetric coordinates varying in [0,1] intervals. Energies and mean
values of the distances between electrons and between an electron and the
helium nucleus are calculated. A high accuracy of 11 to 15 significant figures
is obtained with small computing times. Pressures acting on the confined atom
are also computed. For sphere radii smaller than 1, their relative accuracies
are better than $10^{-10}$. For larger radii up to 10, they progressively
decrease to $10^{-3}$, still improving the best literature results.
