The paper describes an experiment aimed at studying muon capture by He-3 nuclei in pure He-3 and D-2+He-3 mixtures at various densities. Energy distributions of protons and deuterons produced via mu(-)+He-3-->p+n+n+nu(mu) and mu(-)+He-3-->d+n+nu(mu) are measured for the energy intervals 10-49 MeV and 13-31 MeV, respectively. Muon capture rates lambda(cap)(p)(DeltaE(p)) and lambda(cap)(d)(DeltaE(d)) are obtained using two different analysis methods. The least-squares methods give lambda(cap)(p)=(36.7+/-1.2) s(-1), lambda(cap)(d)=(21.3+/-1.6) s(-1). The Bayes theorem gives lambda(cap)(p)=(36.8+/-0.8) s(-1), lambda(cap)(d)=(21.9+/-0.6) s(-1). The experimental differential capture rates, dlambda(cap)(p) (E-p)/dE(p) and dlambda(cap)(d)(E-d)/dE(d), are compared with theoretical calculations performed using the plane-cap wave impulse approximation with the realistic nearest-neighbor interaction Bonn B potential. Extrapolation to the full energy range yields total proton and deuteron capture rates in good agreement with former results.