## 2 Materials and Methods
### Active Nerve Axon  
The cable equation (Equation (1)) illustrates how the induced electric field interacts with the neuron but does not fully capture the kinetics of nerve stimulation. To improve our model, we add a mathematical representation of the ion channels in the nerve membrane. These channels behave nonlinearly; therefore, a linear process like Fourier analysis is no longer appropriate. Instead, we solve the cable equation, including the ion channels, numerically. The Hodgkin\(-\)Huxley model, as shown in Figure 1, allows us to calculate the stimulation and propagation of action potentials numerically [23]. Figure 1: Electrical equivalent circuit for a short segment of a squid giant axon membrane [23]. Capacitor (capacitance per unit area \(C_{m}\) of the cell membrane); Variable conductances (voltage-dependent \(Na^{+}\) and \(K^{+}\) conductance per unit area, \(g_{Na}\), \(g_{K}\)); fixed conductance (voltage-independent leakage conductance per unit area \(g_{l}\)); Batteries (reversal potentials for \(Na^{+}\), \(K^{+}\), and leakage: \(E_{Na}\), \(E_{K}\), \(E_{l}\)); Membrane potential \(V=V_{in}-V_{out}\); Arrows (current densities \(I_{Na}\), \(I_{K}\) and \(I_{l}\)). The sodium, potassium, and leak ionic current densities are  
\[I_{Na}=g_{Na}m^{3}h[V-E_{Na}],\ I_{K}=g_{Na}n^{4}[V-E_{K}],\ I_{l}=g_{l}[V-E_{l}], \tag{8}\]  
where the dimensionless variables \(n\), \(m\), and \(h\) represent the opening and closing of the ion channels and vary between 0 and 1. Differential equations of the first order determine these gating variables:  
\[\frac{\partial m}{\partial t}=\alpha_{m}(1-m)-\beta_{m}m,\ \frac{\partial h}{ \partial t}=\alpha_{h}(1-h)-\beta_{h}h,\ \frac{\partial n}{\partial t}=\alpha_{n}(1-n)-\beta_{n}n. \tag{9}\]  
The values of the rate constants \(\alpha\) and \(\beta\) (in 1/ms) are functions of \(V\) (in mV) and are given by [23]  
\[\alpha_{n}=0.01\frac{V+55}{1-\exp\Bigl{(}-\frac{V+55}{10}\Bigr{)}}\,\ \alpha_{m}=0.1\frac{V+40}{1-\exp \Bigl{(}-\frac{V+40}{10}\Bigr{)}}\,\ \alpha_{h}=0.07\exp\left(-\frac{V+65}{20}\right), \tag{10}\]  
\[\beta_{n}=0.125\exp\left(-\frac{V+65}{80}\right),\ \beta_{m}=4\exp\left(-\frac{V+65}{18} \right),\ \beta_{h}=\frac{1}{1+\exp\Bigl{(}-\frac{V+35}{10}\Bigr{)}}. \tag{11}\]  
With no source of external current and no spatial dependence, the Hodgkin\(-\)Huxley equation for \(V\) is  
\[C_{m}\frac{dV}{dt}+g_{K}n^{4}(V-E_{K})+g_{Na}m^{3}h(V-E_{Na})+g_{l}(V-E_{l})=0. \tag{12}\]  
When we plug the Hodgkin\(-\)Huxley Equation (12) into the cable Equation (1), it becomes [23]  
\[\frac{a}{2R_{i}}\frac{\partial^{2}V}{\partial x^{2}}-(I_{Na}+I_{K}+I_{l})=C_{ m}\frac{\partial V}{\partial t}+\frac{a}{2R_{i}}\frac{\partial E_{x}}{ \partial x}(x,t), \tag{13}\]  
where \(a\) is the axon radius and \(R_{i}\) is the intracellular resistivity. We solve Equation (13) numerically using the parameters in Table 1.  
Equation (14) expresses the time course of the current in the coil \(I(t)\) that induces the electric field. It consists of a rapid rise and then an exponential decay with a time constant \(\tau_{coil}\). We take \(\tau_{coil}\) to be 0.1 ms, typical of a magnetic stimulation pulse (Figure 2a). The induced electric field varies with the derivative of the coil current. It is biphasic with a brief, strong positive phase followed by a longer, weaker negative phase (Figure 2b)  
\[I(t)=\mathrm{te}^{-\frac{1}{\tau_{coil}}}, \tag{14}\]  
\[\frac{dI}{dt}(t)=\left(1-\frac{t}{\tau_{coil}}\right)\mathrm{e}^{-\frac{1}{ \tau_{coil}}}. \tag{15}\]