Computations of the diffraction effect and the nonlinear effect on spatial solitons in nonlinear planar waveguides