  We use techniques from nonparametric function estimation theory to extract
the density profiles, and their derivatives, from a set of N-body dark matter
halos. We consider halos generated from LCDM simulations of gravitational
clustering, as well as isolated, spherical collapses. The logarithmic density
slopes gamma = d(log rho)/d(log r) of the LCDM halos are found to vary as
power-laws in radius, reaching values of gamma ~ -1 at the innermost resolved
radii (~0.01 r_virial). This behavior is significantly different from that of
broken power-law models like the NFW profile, but similar to that of models
like de Vaucouleurs'. Accordingly, we compare the N-body density profiles with
various parametric models to find which provide the best fit. We consider an
NFW-like model with arbitrary inner slope; Dehnen & McLaughlin's anisotropic
model; Einasto's model (identical in functional form to Sersic's model but fit
to the space density); and the density model of Prugniel & Simien that was
designed to match the deprojected form of Sersic's R^{1/n} law. Overall, the
best-fitting model to the LCDM halos is Einasto's, although the Prugniel-Simien
and Dehnen-McLaughlin models also perform well. With regard to the spherical
collapse halos, both the Prugniel-Simien and Einasto models describe the
density profiles well, with an rms scatter some four times smaller than that
obtained with either the NFW-like model or the 3-parameter Dehnen-McLaughlin
model. Finally, we confirm recent claims of a systematic variation in profile
shape with halo mass.
