1. ( 50 Points) Replicate figure 1.8 below in Ermentrout and Terman. This is called a voltage-clamp experiment, where the voltage is held at rest and then stepped up to a testing voltage. Step the voltage to \( 0,+30,+60 \mathrm{mV} \), and show all the Na currents and the K currents together in one plot. Submit an ipynb file. From your simulation explain the flow of Na ions (in or out of the cell) in all traces. Notice that our HH model is slightly different than the one used by Ermentrout and Terman.
1.9 Hodgkin-Huxley Model
21
Fig. 1.8 Numerically computed voltage-clamp experiment. The membrane potential is stepped from rest to 0 mV . This results in an inward current followed by an outward current. The separate \( \mathrm{K}^{+} \)and \( \mathrm{Na}^{+} \)currents are also shown
\#2. (50 Points) Create a plot where you show all the activation and inactivation curves. In a separate plot, show the time constants.
\#3. (50 Points) Solve the HH equations with a brief pulse of current that produces an action potential. In this case, the voltage is not clamped anymore. Try to figure out how to determine the scale of time exactly. Use a current stimulation that is \( \sin (\mathrm{wt}) \) where w is the frequency of the stimulation. Use frequencies between 10 and 1000 hz ( \( \mathrm{wT}=2 \mathrm{pi} \) and \( \mathrm{T}=1 / \mathrm{f} \) ) to show how the action potential is modulated. Change the amplitude of the sine wave so that you can see an effect. Explain what you see. Use the Euler integration and compare with the RK methods.
\#4. (50 Points) Compare the accuracy of the Euler integration with the RK second order. Calculate an approximate error and use it to monitor the error as the action potential is generated. How does the error change in the Euler scheme in the different phases of the action potential?
\#5 (Sage's Question, 50 Points). Replicate numerically what happens to the action potential when the inactivation is shifted 20 mV towards positive voltage. Plot the new inactivation and the old inactivation as functions of voltage. Show the new action potential and compare it with the old one.