Differential equations for the heartbeat and nerve impulse