analytical solution to train of action potentials