nonlinear: fix the fix to the density calculation

My rescaling interacted poorly with the optimization (i.e., it was
computing the wrong numbers).  These are the first results that look
somewhat plausible, though even after 1,000 iterations it may not have
converged.