Problem Set

1. Using the JupyterLab file ForEulerRC.ipynb as a template solve the RC circuit equation using the Runge-Kutta 4th order and backward Euler methods.

\[\frac{\text{dV}}{\text{dt}} = (I_{\text{stim}} - \ GV)/C\]

 

2. For a 20 μm diameter cell for which the cell membrane has a specific capacitance of \(0.01\ pF \cdot µm^{- 2}\) and a specific leak conductance of \(3.0\ pS \cdot µm^{- 2}\), determine the magnitude of the steady-state voltage response to a 50 pA current injection.

 

3. Using the JupyterLab file ForEulerLeak.ipynb as a template solve the membrane equation using the Runge-Kutta 4th order method,

\[\frac{\text{dV}}{\text{dt}} = (I_{\text{stim}}/A - \ G_{L}(V - V_{L}))/C_{m}\]

Plot the response of the cell to the following current injections: -0.1, -0.05, 0, 0.05 and 0.1 nA.

 

4. Solve the Hodgkin and Huxley rate equations using the backward Euler method. The JupyterLab file VoltageClamp.ipynb can be used as a template.

 

5. Demonstrate that solution of the linked differential equations describing the Hodgkin and Huxley model (equations 1-4) using a combination of the implicit Trapezoid method and the backward Euler method is in fact second order accurate with respect to voltage. Run simulations at dt = 0.1, 0.01, 0.001, 0.0001 and 0.00001. Assume that the finest resolution time step is exact and derive errors for the other time steps relative to that solution. The JupyterLab file HHcell.ipynb can be used as a template.

     

Jupyter Notebooks

ForEulerRC.ipynb

ForEulerLeak.ipynb

VoltageClamp.ipynb

HHcell.ipynb

     

Right click on a link to download a JupyterLab file (select ‘Save Link As…’). The files can be run locally using JupyterLab or in the cloud using Google Colab. Upload the files into Colab by selecting ‘File>Upload notebook’.