An analytic map for space charge in a nonlinear lattice