{'fraction_non_alphanumeric': 0.013950538998097653, 'fraction_numerical': 0.0, 'mean_word_length': 5.362903225806452, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Spectral Method and High-Order Finite Differences for the Nonlinear Cable Equation

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.