We use high-order approximation schemes for the space derivatives in the nonlinear cable equation and investigate the behavior of numerical solution errors by using exact solutions, where available, and grid convergence. The space derivatives are numerically approximated by means of differentiation matrices. Nonlinearity in the equation arises from the Hodgkin-Huxley dynamics of the gating variables for ion channels. We have investigated in particular the effects of synaptic current distribution and compared the accuracy of the spectral solutions with that of finite differencing. A flexible form for the injected current is used that can be adjusted smoothly from a very broad to a narrow peak, which furthermore leads, for the passive cable, to a simple, exact solution. We have used three distinct approaches to assess the numerical solutions: comparison with exact solutions in an unbranched passive cable, the convergence of solutions with progressive refinement of the grid in an active cable, and the simulation of spike initiation in a biophysically realistic single-neuron model. The spectral method provides good numerical solutions for passive cables comparable in accuracy to those from the second-order finite difference method and far greater accuracy in the case of a simulated system driven by inputs that are smoothly distributed in space. It provides faster convergence in active cables and in a realistic neuron model due to better approximation of propagating spikes.