-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSanders.nb
2478 lines (2409 loc) · 101 KB
/
Sanders.nb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 10.2' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[ 158, 7]
NotebookDataLength[ 100660, 2470]
NotebookOptionsPosition[ 93970, 2372]
NotebookOutlinePosition[ 94979, 2404]
CellTagsIndexPosition[ 94936, 2401]
WindowFrame->Normal*)
(* Beginning of Notebook Content *)
Notebook[{
Cell[CellGroupData[{
Cell["Biological Modelling and Model Analysis - day VI", "BookChapterLabel",
CellChangeTimes->{{3.6829991255094852`*^9, 3.68299914575751*^9},
3.682999421015033*^9, {3.683964417430398*^9, 3.6839644182337*^9}, {
3.684654757959724*^9, 3.684654759005673*^9}, 3.747971739143053*^9, {
3.778735279899466*^9,
3.778735283664885*^9}},ExpressionUUID->"ac1a8ae5-549a-47ee-b8f3-\
731ccb4cf90c"],
Cell["\<\
Mechanistic and phenomenological models of the action potential\
\>", "BookChapterTitle",
CellChangeTimes->{{3.682998874641573*^9, 3.682998895360573*^9}, {
3.683964426788683*^9, 3.683964434866899*^9}, {3.684654763386012*^9,
3.68465476916544*^9}, {3.7787353461555758`*^9,
3.7787353637713842`*^9}},ExpressionUUID->"2c4b54dc-161f-49c6-b974-\
51f703a2ebc5"],
Cell[CellGroupData[{
Cell["Sander van Doorn", "Author",
CellChangeTimes->{{3.68299919036697*^9,
3.6829991932712607`*^9}},ExpressionUUID->"cc1a0af8-a0d3-4818-9a63-\
45f7648b8f81"],
Cell["Groningen Institute for Evolutionary Life Sciences", "Institution",
CellChangeTimes->{{3.6829992274406776`*^9,
3.6829992458415174`*^9}},ExpressionUUID->"ccdf730c-e421-405b-a283-\
cd41e68a3cb8"],
Cell["g.s.van.doorn@rug.nl", "Department",
CellChangeTimes->{{3.68299926217015*^9,
3.6829992690098343`*^9}},ExpressionUUID->"faf78349-c108-4a22-a772-\
4bbe13bea055"]
}, Open ]],
Cell[CellGroupData[{
Cell["The Hodgkin-Huxley model of the action potential", "Section",
CellChangeTimes->{{3.6829992928352165`*^9, 3.6829992962185545`*^9}, {
3.684053399255887*^9, 3.6840534106583014`*^9}, {3.778735576269487*^9,
3.778735594005937*^9}},ExpressionUUID->"5fb5a7d7-ae6a-435c-855e-\
6ad11004cb7f"],
Cell["\<\
A classic model of the initiation and propagation of action potentials by \
nerve cells was proposed by Alan Lloyd Hodgkin and Andrew Fielding Huxley in \
1952, based on their electrophysiological measurements in the squid giant \
axon. Hodgkin & Huxley received the 1963 Nobel Prize in Physiology/Medicine \
for this work.\
\>", "Text",
CellChangeTimes->{{3.683964776135131*^9, 3.683964967347437*^9}, {
3.683965028754643*^9, 3.683965028756803*^9}, {3.684053425326909*^9,
3.684053430015729*^9}},ExpressionUUID->"55bda558-86e7-4179-86be-\
28928a5b8f82"],
Cell[TextData[{
"The core component of the Hodgkin-Huxley model is an equation that \
describes the change of the membrane potential as a function of three ionic \
currents, a ",
Cell[BoxData[
FormBox[
SuperscriptBox["Na", "+"], TraditionalForm]],ExpressionUUID->
"b8786fba-77e6-48a5-b64e-c4c8dbcd5b20"],
"current that depolarises the cell, a ",
Cell[BoxData[
FormBox[
SuperscriptBox[
StyleBox["K",
FontSlant->"Plain"], "+"], TraditionalForm]],ExpressionUUID->
"a224d336-a480-459a-82d6-7f9ca73767a8"],
"current that repolarises the cell, and a group of unspecified other \
currents that help to restore the resting state. The equation for the \
membrane potential is "
}], "Text",
CellChangeTimes->{{3.683964776135131*^9, 3.683964967347437*^9}, {
3.683965028754643*^9, 3.683965276291059*^9}, {3.683965306676963*^9,
3.6839653716315928`*^9},
3.683971102298107*^9},ExpressionUUID->"6bb003e3-c4a6-40af-a52e-\
de12f2688671"],
Cell[BoxData[
RowBox[{
RowBox[{"eqV", "[",
RowBox[{"V_", ",", "m_", ",", "h_", ",", "n_"}], "]"}], ":=",
RowBox[{
RowBox[{"-",
FractionBox["1", "C"]}],
RowBox[{"(",
RowBox[{
RowBox[{"120.0",
SuperscriptBox["m", "3"], "h",
RowBox[{"(",
RowBox[{"V", "+", "115.0"}], ")"}]}], "+",
RowBox[{"36.0", " ",
SuperscriptBox["n", "4"],
RowBox[{"(",
RowBox[{"V", "-", "12.0"}], ")"}]}], "+",
RowBox[{"0.3",
RowBox[{"(",
RowBox[{"V", "+", "10.5989"}], ")"}]}]}], ")"}]}]}]], "Input",
CellChangeTimes->{{3.683964484161379*^9, 3.683964490258279*^9}, {
3.6839653752745037`*^9, 3.683965476662602*^9}, {3.683969983081421*^9,
3.6839699835452633`*^9}, {3.6839711053905287`*^9, 3.683971108712481*^9}, {
3.6839713270067787`*^9, 3.683971357182889*^9}, 3.684049099658181*^9},
CellLabel->"In[15]:=",ExpressionUUID->"503877eb-d9d2-4441-9437-735ee32e824d"],
Cell[TextData[{
"where ",
Cell[BoxData[
FormBox["C", TraditionalForm]],ExpressionUUID->
"8cf678cf-e1ed-431e-803e-c208560e6b31"],
" is the capacity of the membrane. The variable ",
Cell[BoxData[
FormBox["m", TraditionalForm]],ExpressionUUID->
"aa42a230-c7a8-445f-8dd5-31b23a3dcced"],
", ",
Cell[BoxData[
FormBox["h", TraditionalForm]],ExpressionUUID->
"fc617f0e-ecaa-48a8-b6a3-aed6171980c7"],
" and ",
Cell[BoxData[
FormBox["n", TraditionalForm]],ExpressionUUID->
"79d7a4c4-1699-4a09-a01b-ffa066873c23"],
" represent the state of the voltage sensitive sodium and potassium channels \
in the membrane. The dependence of these variables on the voltage was \
measured by Hodgkin and Huxley in clever patch-clamp experiments, in which \
they systematically blocked specific channels in order to measure the \
currents through each channel separately. Based on fits of logistic curves to \
the patch-clamp data, Hodgkin and Huxley proposed the following equations for \
the gating variables ",
Cell[BoxData[
FormBox["m", TraditionalForm]],ExpressionUUID->
"3976c44c-90cf-4534-994b-5da54c41312d"],
", ",
Cell[BoxData[
FormBox["h", TraditionalForm]],ExpressionUUID->
"dc2deade-1463-4444-8a33-6364fc8e9c57"],
" and ",
Cell[BoxData[
FormBox["n", TraditionalForm]],ExpressionUUID->
"bd956ec5-8b3a-4f41-bc58-fef780f099cd"],
" "
}], "Text",
CellChangeTimes->{{3.6839654986734343`*^9, 3.68396551251654*^9}, {
3.683965551442984*^9, 3.683965862639476*^9}, {3.68396590505615*^9,
3.683965968696045*^9}, {3.6839660310347424`*^9, 3.683966044021246*^9}, {
3.6840536562257547`*^9,
3.684053679433024*^9}},ExpressionUUID->"707a657b-535b-45b6-af84-\
f84b8be59779"],
Cell[BoxData[{
RowBox[{
RowBox[{"eqm", "[",
RowBox[{"V_", ",", "m_"}], "]"}], ":=",
RowBox[{
RowBox[{"0.1",
RowBox[{"(",
RowBox[{"1.0", "-", "m"}], ")"}],
FractionBox[
RowBox[{"V", "+", "25.0"}],
RowBox[{
RowBox[{"Exp", "[",
RowBox[{
RowBox[{"0.1", "V"}], "+", "2.5"}], "]"}], "-", "1"}]]}], "-",
RowBox[{"4.", "m", " ",
RowBox[{"Exp", "[",
RowBox[{"V", "/", "18.0"}], "]"}]}]}]}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"eqh", "[",
RowBox[{"V_", ",", "h_"}], "]"}], ":=",
RowBox[{
RowBox[{"0.07",
RowBox[{"(",
RowBox[{"1.0", "-", "h"}], ")"}],
RowBox[{"Exp", "[",
RowBox[{"V", "/", "20.0"}], "]"}]}], "-",
FractionBox["h",
RowBox[{
RowBox[{"Exp", "[",
RowBox[{
RowBox[{"0.1", "V"}], "+", "3.0"}], "]"}], "+", "1"}]]}]}],
" "}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"eqn", "[",
RowBox[{"V_", ",", "n_"}], "]"}], ":=",
RowBox[{
RowBox[{"0.01",
RowBox[{"(",
RowBox[{"1.0", "-", "n"}], ")"}],
FractionBox[
RowBox[{"V", "+", "10.0"}],
RowBox[{
RowBox[{"Exp", "[",
RowBox[{
RowBox[{"0.1", "V"}], "+", "1.0"}], "]"}], "-", "1"}]]}], "-",
RowBox[{"0.125", "n", " ",
RowBox[{"Exp", "[",
RowBox[{"V", "/", "80.0"}], "]"}]}]}]}]}], "Input",
CellChangeTimes->{{3.6839654986734343`*^9, 3.68396551251654*^9}, {
3.683965551442984*^9, 3.683965862639476*^9}, {3.68396590505615*^9,
3.683965968696045*^9}, {3.6839660310347424`*^9, 3.683966102356365*^9}, {
3.683966258537586*^9, 3.6839664345431643`*^9}},
CellLabel->"In[16]:=",ExpressionUUID->"5588f7fe-ad00-4a2e-9c79-6b19e92a862d"],
Cell[TextData[{
"The following simulation mimicks an experiment in which a nerve cell is \
stimulated with a stepwise stimulus current ",
Cell[BoxData[
FormBox[
RowBox[{"S", "(", "t", ")"}], TraditionalForm]],ExpressionUUID->
"9d948a57-3b02-4a4c-8750-4bd4fb3af182"],
" administered by an electrode. The stimulus current is added as an \
additional term to the equation for the membrane potential. The parameters ",
Cell[BoxData[
FormBox[
SubscriptBox["T", "on"], TraditionalForm]],ExpressionUUID->
"14eacba2-35b9-4b9c-8ab5-30b0a005a2d6"],
" and ",
Cell[BoxData[
FormBox[
SubscriptBox["T", "off"], TraditionalForm]],ExpressionUUID->
"0896e474-c4ba-4782-8bb3-df0f93565ef1"],
"define the start and end time of the step current, and ",
Cell[BoxData[
FormBox[
SubscriptBox["i", "on"], TraditionalForm]],ExpressionUUID->
"740aed4d-367d-4348-b8a8-93b59693a00c"],
" represents the stimulus intensity."
}], "Text",
CellChangeTimes->{{3.6839654986734343`*^9, 3.68396551251654*^9}, {
3.683965551442984*^9, 3.683965862639476*^9}, {3.68396590505615*^9,
3.683965968696045*^9}, {3.6839660310347424`*^9, 3.683966044021246*^9}, {
3.6840536562257547`*^9, 3.684053728836813*^9}, {3.6840544710714273`*^9,
3.684054759434245*^9}},ExpressionUUID->"a08fc8f3-fcf3-4a69-927b-\
6ccfe787da54"],
Cell[BoxData[{
RowBox[{
RowBox[{"pars", "=",
RowBox[{"{",
RowBox[{
RowBox[{"C", "\[Rule]", "1.0"}], ",",
RowBox[{
SubscriptBox["T", "on"], "\[Rule]", "50"}], ",",
RowBox[{
SubscriptBox["T", "off"], "\[Rule]", "100"}], ",",
RowBox[{
SubscriptBox["i", "on"], "\[Rule]", "25.0"}]}], "}"}]}],
";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"vars", "=",
RowBox[{"{",
RowBox[{
RowBox[{"V", "[", "t", "]"}], ",",
RowBox[{"m", "[", "t", "]"}], ",",
RowBox[{"h", "[", "t", "]"}], ",",
RowBox[{"n", "[", "t", "]"}]}], "}"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"sys", "=",
RowBox[{"{", "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"D", "[",
RowBox[{
RowBox[{"V", "[", "t", "]"}], ",", "t"}], "]"}], "==",
RowBox[{
RowBox[{"eqV", "[",
RowBox[{
RowBox[{"V", "[", "t", "]"}], ",",
RowBox[{"m", "[", "t", "]"}], ",",
RowBox[{"h", "[", "t", "]"}], ",",
RowBox[{"n", "[", "t", "]"}]}], "]"}], "-",
FractionBox[
RowBox[{"S", "[", "t", "]"}], "C"]}]}], ",", "\[IndentingNewLine]",
RowBox[{
RowBox[{"D", "[",
RowBox[{
RowBox[{"m", "[", "t", "]"}], ",", "t"}], "]"}], "==",
RowBox[{"eqm", "[",
RowBox[{
RowBox[{"V", "[", "t", "]"}], ",",
RowBox[{"m", "[", "t", "]"}]}], "]"}]}], ",", "\[IndentingNewLine]",
RowBox[{
RowBox[{"D", "[",
RowBox[{
RowBox[{"h", "[", "t", "]"}], ",", "t"}], "]"}], "==",
RowBox[{"eqh", "[",
RowBox[{
RowBox[{"V", "[", "t", "]"}], ",",
RowBox[{"h", "[", "t", "]"}]}], "]"}]}], ",", "\[IndentingNewLine]",
RowBox[{
RowBox[{"D", "[",
RowBox[{
RowBox[{"n", "[", "t", "]"}], ",", "t"}], "]"}], "==",
RowBox[{"eqn", "[",
RowBox[{
RowBox[{"V", "[", "t", "]"}], ",",
RowBox[{"n", "[", "t", "]"}]}], "]"}]}]}], "\[IndentingNewLine]", " ",
"}"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"init", "=",
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"V", "[", "0", "]"}], "\[Equal]", "0.0"}], ",", " ",
RowBox[{
RowBox[{"m", "[", "0", "]"}], "\[Equal]", "0.05"}], ",", " ",
RowBox[{
RowBox[{"h", "[", "0", "]"}], "\[Equal]", "0.59"}], ",",
RowBox[{
RowBox[{"n", "[", "0", "]"}], "\[Equal]", "0.32"}], ",",
RowBox[{
RowBox[{"S", "[", "0", "]"}], "\[Equal]", "0.0"}]}], "}"}]}],
";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"stimulus", "=",
RowBox[{"{",
RowBox[{
RowBox[{"WhenEvent", "[",
RowBox[{
RowBox[{"t", "\[Equal]",
SubscriptBox["T", "on"]}], ",",
RowBox[{
RowBox[{"S", "[", "t", "]"}], "\[Rule]",
SubscriptBox["i", "on"]}]}], "]"}], ",",
RowBox[{"WhenEvent", "[",
RowBox[{
RowBox[{"t", "\[Equal]",
SubscriptBox["T", "off"]}], ",",
RowBox[{
RowBox[{"S", "[", "t", "]"}], "\[Rule]", "0.0"}]}], "]"}]}], "}"}]}],
";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"solution", "=",
RowBox[{"NDSolve", "[",
RowBox[{
RowBox[{
RowBox[{"Join", "[",
RowBox[{"sys", ",", "init", ",", "stimulus"}], "]"}], "/.", "pars"}],
",", "vars", ",",
RowBox[{"{",
RowBox[{"t", ",", "0", ",", "150"}], "}"}], ",",
RowBox[{"DiscreteVariables", "\[Rule]", "S"}]}], "]"}]}],
";"}]}], "Input",
CellChangeTimes->CompressedData["
1:eJxTTMoPSmViYGAQBmIQzfg6RmRO0WvH+PgALRBt0Phaci6QTvLTlAHRsifl
k0G0/yLBVBB9pXRNHog+cEQjH0TXOB27CqJf6O69DaLz16jzzwPSC3ZMlgXR
AkWViiD6uRa/Moj+c+W7FogOerhID0Rby2ROOQSk962fDqYzjGvmg+hX9srL
QXT595zVIHomY806EG3SVLUVRAtVy58G0QdYxWSOAOmKB+1gWiRu7cNjQFpl
xvpHINqzJUL+OJD26ddQB9G/rp7xANFmDvM9QfTqn38+6S984/jmrtFnED1j
8qFphkBavL50BohOOZWyH0T/+mx7AEQDACN2oNE=
"],ExpressionUUID->"7fe1fe3a-9c82-4772-a274-9dfb8c8733cc"],
Cell[BoxData[
RowBox[{"GraphicsColumn", "[",
RowBox[{"{", "\[IndentingNewLine]",
RowBox[{
RowBox[{"Plot", "[",
RowBox[{
RowBox[{
RowBox[{"Piecewise", "[",
RowBox[{
RowBox[{"{",
RowBox[{"{",
RowBox[{
SubscriptBox["i", "on"], ",",
RowBox[{
RowBox[{"t", ">",
SubscriptBox["T", "on"]}], "&&", " ",
RowBox[{"t", "<",
SubscriptBox["T", "off"]}]}]}], "}"}], "}"}], ",", "0"}], "]"}],
"/.", "pars"}], ",",
RowBox[{"{",
RowBox[{"t", ",", "0", ",", "150"}], "}"}], ",",
RowBox[{"PlotRange", "\[Rule]", "All"}], ",",
RowBox[{"Frame", "\[Rule]", "True"}], ",",
RowBox[{"PlotStyle", "\[Rule]", "Black"}], ",",
RowBox[{"FrameLabel", "\[Rule]",
RowBox[{"{",
RowBox[{"\"\<time\>\"", ",", "\"\<stimulus\>\""}], "}"}]}]}], "]"}],
",", "\[IndentingNewLine]",
RowBox[{"Plot", "[",
RowBox[{
RowBox[{
RowBox[{"-",
RowBox[{"V", "[", "t", "]"}]}], "/.", "solution"}], ",",
RowBox[{"{",
RowBox[{"t", ",", "0", ",", "150"}], "}"}], ",",
RowBox[{"PlotRange", "\[Rule]", "All"}], ",",
RowBox[{"Frame", "\[Rule]", "True"}], ",",
RowBox[{"PlotStyle", "\[Rule]",
RowBox[{"Darker", "[", "Blue", "]"}]}], ",",
RowBox[{"FrameLabel", "\[Rule]",
RowBox[{"{",
RowBox[{"\"\<time\>\"", ",", "\"\<membrane potential\>\""}],
"}"}]}]}], "]"}], ",", "\[IndentingNewLine]",
RowBox[{"Plot", "[",
RowBox[{
RowBox[{"Evaluate", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"m", "[", "t", "]"}], ",",
RowBox[{"h", "[", "t", "]"}], ",",
RowBox[{"n", "[", "t", "]"}]}], "}"}], "/.", "solution"}], "]"}],
",",
RowBox[{"{",
RowBox[{"t", ",", "0", ",", "150"}], "}"}], ",",
RowBox[{"PlotRange", "\[Rule]", "All"}], ",",
RowBox[{"Frame", "\[Rule]", "True"}], ",",
RowBox[{"PlotStyle", "\[Rule]",
RowBox[{"{",
RowBox[{"Red", ",", "Orange", ",",
RowBox[{"Darker", "[", "Red", "]"}]}], "}"}]}], ",",
RowBox[{"FrameLabel", "\[Rule]",
RowBox[{"{",
RowBox[{"\"\<time\>\"", ",", "\"\<gating variables\>\""}], "}"}]}]}],
"]"}]}], "}"}], "]"}]], "Input",
CellChangeTimes->{{3.683969270857291*^9, 3.683969278744135*^9}, {
3.683969797999609*^9, 3.683969890206883*^9}, {3.683969934972193*^9,
3.683969939804255*^9}, {3.6839700743924294`*^9, 3.683970088962118*^9}, {
3.6839702147170477`*^9, 3.6839702359213057`*^9}, {3.6839702895669403`*^9,
3.683970304764539*^9}, {3.683970372919256*^9, 3.683970526603449*^9}, {
3.683970562338162*^9, 3.683970710677902*^9}, {3.6839711459132633`*^9,
3.6839711477275248`*^9}, {3.683971311836618*^9, 3.683971316432727*^9}, {
3.6839713723103456`*^9, 3.683971407356613*^9}, {3.683971471820817*^9,
3.683971494547825*^9}, 3.6840460023469954`*^9, {3.684046383624516*^9,
3.6840463855243683`*^9}, {3.6840465247459393`*^9, 3.684046784220504*^9}, {
3.684054796151609*^9, 3.6840548019474983`*^9}},
CellLabel->"In[45]:=",ExpressionUUID->"83787306-2e75-486a-8e2b-5a8a2572314f"],
Cell[TextData[{
StyleBox["Q1: ",
FontWeight->"Bold",
FontSlant->"Italic"],
StyleBox["Adjust the scale of the plots to zoom in on a single action \
potential, and examine the changes in the membrane potential in relation to \
the dynamic of the gating variables. Describe what happens to the ",
FontWeight->"Bold"],
Cell[BoxData[
FormBox[
SuperscriptBox["Na", "+"], TraditionalForm]],
FontWeight->"Bold",
FontSlant->"Plain",ExpressionUUID->"dda3513f-dd6a-4be8-99f9-c860905aa274"],
StyleBox[" and ",
FontWeight->"Bold"],
Cell[BoxData[
FormBox[
SuperscriptBox[
StyleBox["K",
FontSlant->"Plain"], "+"], TraditionalForm]],ExpressionUUID->
"f26f2868-0b9f-4093-a6a5-8eb03f995507"],
StyleBox[" currents during the different phases of the action potential.",
FontWeight->"Bold"]
}], "Text",
CellChangeTimes->{{3.6839654986734343`*^9, 3.68396551251654*^9}, {
3.683965551442984*^9, 3.683965862639476*^9}, {3.68396590505615*^9,
3.683965968696045*^9}, {3.6839660310347424`*^9, 3.683966044021246*^9}, {
3.6840536562257547`*^9, 3.684053728836813*^9}, {3.6840544710714273`*^9,
3.684054759434245*^9}, {3.68405487253192*^9, 3.684054887159724*^9}, {
3.684054918148314*^9, 3.6840549505665693`*^9}, {3.6840549895912647`*^9,
3.684055117799378*^9}, {3.684055163023621*^9,
3.68405517446024*^9}},ExpressionUUID->"8c8d7f30-7921-4f62-b16a-\
1d0a853b880a"],
Cell["", "Text",
CellChangeTimes->{{3.68405520395356*^9,
3.684055203955825*^9}},ExpressionUUID->"537ba235-3966-4d84-b946-\
09d32a2072dd"],
Cell[TextData[{
StyleBox["Q2: ",
FontWeight->"Bold",
FontSlant->"Italic"],
StyleBox["Manipulate the intensity of the stimulus and describe how the \
nerve cell responds. Is there an upper limit to amplitude of the action \
potential, or to the number of action potentials that can be generated within \
the 50 ms of the step stimulus. Do weak stimuli also elicit an action \
potential?",
FontWeight->"Bold"]
}], "Text",
CellChangeTimes->{{3.6839654986734343`*^9, 3.68396551251654*^9}, {
3.683965551442984*^9, 3.683965862639476*^9}, {3.68396590505615*^9,
3.683965968696045*^9}, {3.6839660310347424`*^9, 3.683966044021246*^9}, {
3.6840536562257547`*^9, 3.684053728836813*^9}, {3.6840544710714273`*^9,
3.684054759434245*^9}, {3.68405487253192*^9, 3.684054887159724*^9}, {
3.684054918148314*^9, 3.6840549505665693`*^9}, {3.6840549895912647`*^9,
3.684055117799378*^9}, {3.684055163023621*^9, 3.68405517446024*^9}, {
3.684055211738501*^9, 3.6840552134481087`*^9}, {3.6840552705866137`*^9,
3.684055270668708*^9}, {3.6840553660471888`*^9, 3.684055513882366*^9}, {
3.684055546653903*^9,
3.684055605766163*^9}},ExpressionUUID->"55add061-b4c8-4fe0-a8b1-\
68e9e834a853"],
Cell["", "Text",
CellChangeTimes->{{3.68405520395356*^9,
3.684055203955825*^9}},ExpressionUUID->"a0342cf4-898c-47aa-a547-\
2123ba5557dc"],
Cell[TextData[{
StyleBox["Q3: ",
FontWeight->"Bold",
FontSlant->"Italic"],
StyleBox["For the original parameter conditions ",
FontWeight->"Bold"],
Cell[BoxData[
FormBox[
RowBox[{"(",
RowBox[{
SubscriptBox["i", "on"], "=", "10.0"}]}], TraditionalForm]],
FontWeight->"Bold",ExpressionUUID->"343af1da-0da8-4f86-b0bb-bc4369a598f2"],
StyleBox["), the stimulus elicits four action potentials. If you look \
closely, you will see that the first action potential has a slightly larger \
amplitude than the following ones. Can you explain why this is so?",
FontWeight->"Bold"]
}], "Text",
CellChangeTimes->{{3.6839654986734343`*^9, 3.68396551251654*^9}, {
3.683965551442984*^9, 3.683965862639476*^9}, {3.68396590505615*^9,
3.683965968696045*^9}, {3.6839660310347424`*^9, 3.683966044021246*^9}, {
3.6840536562257547`*^9, 3.684053728836813*^9}, {3.6840544710714273`*^9,
3.684054759434245*^9}, {3.68405487253192*^9, 3.684054887159724*^9}, {
3.684054918148314*^9, 3.6840549505665693`*^9}, {3.6840549895912647`*^9,
3.684055117799378*^9}, {3.684055163023621*^9, 3.68405517446024*^9}, {
3.684055211738501*^9, 3.6840552134481087`*^9}, {3.6840552705866137`*^9,
3.684055270668708*^9}, {3.6840553660471888`*^9, 3.684055513882366*^9}, {
3.684055546653903*^9, 3.684055605766163*^9}, {3.684055644187067*^9,
3.684055811615841*^9}},ExpressionUUID->"a46a408f-24ee-4051-87e5-\
2a0c7ce43fb8"],
Cell["", "Text",
CellChangeTimes->{{3.68405520395356*^9,
3.684055203955825*^9}},ExpressionUUID->"be99ddcb-3ce9-4061-bb2c-\
c2678b45e594"],
Cell[TextData[{
"The Hodgin-Huxley model can also be used to simulate the propagation of the \
action potential along the axon of a nerve cell. To do this, we consider the \
membrane potential ",
Cell[BoxData[
FormBox["V", TraditionalForm]],ExpressionUUID->
"37000496-30eb-46c4-9ce3-a52028a1d1e1"],
" and the gating variables ",
Cell[BoxData[
FormBox["m", TraditionalForm]],ExpressionUUID->
"1e7e01df-6745-4c20-93f7-ec19e0cb00aa"],
", ",
Cell[BoxData[
FormBox["h", TraditionalForm]],ExpressionUUID->
"260263ce-2f1f-4533-942c-9cd936041054"],
" and ",
Cell[BoxData[
FormBox["n", TraditionalForm]],ExpressionUUID->
"5375d8da-8bc8-487b-a436-490cd49df876"],
" as functions of a spatial coordinate ",
Cell[BoxData[
FormBox["x", TraditionalForm]],ExpressionUUID->
"ebda2cbc-b2b3-4581-8214-450215e84861"],
"(representing the spatial position along the axon) and time ",
Cell[BoxData[
FormBox["t", TraditionalForm]],ExpressionUUID->
"41880ec0-1da1-41b2-9d34-73fb5278a29b"],
". The ionic currents diffuse along the axon, which is captured by including \
a diffusion term for ",
Cell[BoxData[
FormBox[
RowBox[{"V", "(",
RowBox[{"x", ",", "t"}], ")"}], TraditionalForm]],ExpressionUUID->
"228fa4af-0603-4bad-aa94-44b6b76cfbaa"],
" in the equation for the membrane potential. We further assume that the \
axon is stimulated at one end by a sinusoidal current, and that there is no \
flux of voltage at the other end of the axon. The resulting partial \
differential equation is solved numerically by a call to ",
StyleBox["NDSolve", "Input"]
}], "Text",
CellChangeTimes->{{3.6839654986734343`*^9, 3.68396551251654*^9}, {
3.683965551442984*^9, 3.683965862639476*^9}, {3.68396590505615*^9,
3.683965968696045*^9}, {3.6839660310347424`*^9, 3.683966044021246*^9}, {
3.6840536562257547`*^9, 3.684053728836813*^9}, {3.6840544710714273`*^9,
3.684054759434245*^9}, {3.684055856354288*^9, 3.684055891118384*^9}, {
3.6840559401362743`*^9, 3.684056342616802*^9}, {3.684056410896696*^9,
3.684056441600119*^9}},ExpressionUUID->"0f40d611-57b1-41ec-9ae3-\
0c86e48556f8"],
Cell[BoxData[{
RowBox[{
RowBox[{"pars", "=",
RowBox[{"{",
RowBox[{
RowBox[{"C", "\[Rule]", "1.0"}], ",",
RowBox[{
SubscriptBox["\[GothicCapitalD]", "V"], "\[Rule]", " ", "0.05"}], ",",
RowBox[{"A", "\[Rule]", "20.0"}], ",",
RowBox[{"f", "\[Rule]", "0.1"}], ",",
RowBox[{"L", "\[Rule]", " ", "10.0"}]}], "}"}]}],
";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"vars", "=",
RowBox[{"{",
RowBox[{
RowBox[{"V", "[",
RowBox[{"x", ",", "t"}], "]"}], ",",
RowBox[{"m", "[",
RowBox[{"x", ",", "t"}], "]"}], ",",
RowBox[{"h", "[",
RowBox[{"x", ",", "t"}], "]"}], ",",
RowBox[{"n", "[",
RowBox[{"x", ",", "t"}], "]"}]}], "}"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"sys", "=",
RowBox[{"{", "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"D", "[",
RowBox[{
RowBox[{"V", "[",
RowBox[{"x", ",", "t"}], "]"}], ",", "t"}], "]"}], "==",
RowBox[{
RowBox[{"eqV", "[",
RowBox[{
RowBox[{"V", "[",
RowBox[{"x", ",", "t"}], "]"}], ",",
RowBox[{"m", "[",
RowBox[{"x", ",", "t"}], "]"}], ",",
RowBox[{"h", "[",
RowBox[{"x", ",", "t"}], "]"}], ",",
RowBox[{"n", "[",
RowBox[{"x", ",", "t"}], "]"}]}], "]"}], " ", "+",
RowBox[{
SubscriptBox["\[GothicCapitalD]", "V"], " ",
RowBox[{"D", "[",
RowBox[{
RowBox[{"V", "[",
RowBox[{"x", ",", "t"}], "]"}], ",", "x", ",", "x"}], "]"}]}]}]}],
",", "\[IndentingNewLine]",
RowBox[{
RowBox[{"D", "[",
RowBox[{
RowBox[{"m", "[",
RowBox[{"x", ",", "t"}], "]"}], ",", "t"}], "]"}], "==",
RowBox[{"eqm", "[",
RowBox[{
RowBox[{"V", "[",
RowBox[{"x", ",", "t"}], "]"}], ",",
RowBox[{"m", "[",
RowBox[{"x", ",", "t"}], "]"}]}], "]"}]}], ",",
"\[IndentingNewLine]",
RowBox[{
RowBox[{"D", "[",
RowBox[{
RowBox[{"h", "[",
RowBox[{"x", ",", "t"}], "]"}], ",", "t"}], "]"}], "==",
RowBox[{"eqh", "[",
RowBox[{
RowBox[{"V", "[",
RowBox[{"x", ",", "t"}], "]"}], ",",
RowBox[{"h", "[",
RowBox[{"x", ",", "t"}], "]"}]}], "]"}]}], ",",
"\[IndentingNewLine]",
RowBox[{
RowBox[{"D", "[",
RowBox[{
RowBox[{"n", "[",
RowBox[{"x", ",", "t"}], "]"}], ",", "t"}], "]"}], "==",
RowBox[{"eqn", "[",
RowBox[{
RowBox[{"V", "[",
RowBox[{"x", ",", "t"}], "]"}], ",",
RowBox[{"n", "[",
RowBox[{"x", ",", "t"}], "]"}]}], "]"}]}]}], "\[IndentingNewLine]",
" ", "}"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"init", "=",
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"V", "[",
RowBox[{"x", ",", "0"}], "]"}], "\[Equal]", "0.0"}], ",", " ",
RowBox[{
RowBox[{"m", "[",
RowBox[{"x", ",", "0"}], "]"}], "\[Equal]", "0.05"}], ",", " ",
RowBox[{
RowBox[{"h", "[",
RowBox[{"x", ",", "0"}], "]"}], "\[Equal]", "0.59"}], ",",
RowBox[{
RowBox[{"n", "[",
RowBox[{"x", ",", "0"}], "]"}], "\[Equal]", "0.32"}], ",",
RowBox[{
RowBox[{"V", "[",
RowBox[{"0", ",", "t"}], "]"}], " ", "\[Equal]",
RowBox[{"A", " ",
RowBox[{"Sin", "[",
RowBox[{"2", "\[Pi]", " ", "f", " ", "t"}], "]"}]}]}], ",",
RowBox[{
RowBox[{
SuperscriptBox["V",
TagBox[
RowBox[{"(",
RowBox[{"1", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None], "[",
RowBox[{"L", ",", "t"}], "]"}], "\[Equal]", "0"}]}], "}"}]}],
";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"solution", " ", "=", " ",
RowBox[{"NDSolve", "[",
RowBox[{
RowBox[{
RowBox[{"Join", "[",
RowBox[{"sys", ",", " ", "init"}], "]"}], " ", "/.", " ", "pars"}],
",", " ", "vars", ",", " ",
RowBox[{"{",
RowBox[{"t", ",", " ", "0", ",", " ", "100"}], "}"}], ",",
RowBox[{"{",
RowBox[{"x", ",", "0", ",", "10"}], "}"}], ",",
RowBox[{"Method", "\[Rule]",
RowBox[{"{",
RowBox[{"\"\<PDEDiscretization\>\"", "\[Rule]",
RowBox[{"{",
RowBox[{"\"\<MethodOfLines\>\"", ",", " ",
RowBox[{"\"\<SpatialDiscretization\>\"", "\[Rule]",
RowBox[{"{",
RowBox[{"\"\<TensorProductGrid\>\"", ",",
RowBox[{"\"\<MinPoints\>\"", "\[Rule]", "500"}]}], "}"}]}]}],
"}"}]}], "}"}]}]}], "]"}]}], ";"}]}], "Input",
CellChangeTimes->CompressedData["
1:eJwdzzlIQgEABuDnQzoGMSMKQzGLLu1QFAMju8CWDnEIOsgwhIrIkiQ0KwqC
cOxABEsRykApCAKJTn0V5eJglEVDghS5tDlU0Pvf8PMN//L/YqNZbyIJghDR
gazMcJHHkmk3GHQSKFvJ8Hdojb21Aii8F43BPj/PBBPW0DS8omrM0NFx+wg/
689foTlUzd2l9YU3hbDAYhPDDwm3Av4mshKof/c3wGbBxFaE9uLIxTiucHjh
V2tFAM5np4LQzXIcQuWq/QQWLohiMEcrr4vSjsaoRngZjJEUfqwd5kJf5IED
5wK9xbCT+BFDta6pGl4LVFI4aXhRQuqI0sDBAo4WbvTk2Zi+OW6HpGZxGepT
qnV4+va8Cdmzyy5GjXMX8u5+vbC737IHz5zpfThTNRCEyRFhCObzZccw9Cdn
tHe9hKFyqCQKS9vUcWha6mcUfLufoFPWkoJWdrrshjbD/WFUODmVkCQ1NdCT
LD+4w/5tKeM/cqIAXw==
"],
CellLabel->"In[52]:=",ExpressionUUID->"7b00a617-90d6-487d-9f6c-3c161f01a1cd"],
Cell[TextData[{
"The solution is plotted below in three different ways: the upper diagram \
shows time-plots of the membrane potential recorded at five different \
positions along the axon; the middle diagram show a snapshot of the potential \
along the axon at ",
Cell[BoxData[
FormBox[
RowBox[{
RowBox[{"t", "=", "23"}], ",", " ",
RowBox[{"t", "=", "24"}], ",", " ",
RowBox[{"t", "=", "25"}], ",", " ",
RowBox[{"t", "=",
RowBox[{
RowBox[{"26", " ", "and", " ", "t"}], "=", "27"}]}]}],
TraditionalForm]],ExpressionUUID->"4cc556d6-8610-4571-a232-686c5c71fc7c"],
"; the lower diagram uses a color scale to show the membrane potential at \
any point along the axon at any point in time. "
}], "Text",
CellChangeTimes->{{3.6839654986734343`*^9, 3.68396551251654*^9}, {
3.683965551442984*^9, 3.683965862639476*^9}, {3.68396590505615*^9,
3.683965968696045*^9}, {3.6839660310347424`*^9, 3.683966044021246*^9}, {
3.6840536562257547`*^9, 3.684053728836813*^9}, {3.6840544710714273`*^9,
3.684054759434245*^9}, {3.684055856354288*^9, 3.684055891118384*^9}, {
3.6840559401362743`*^9, 3.684056342616802*^9}, {3.684056410896696*^9,
3.684056441600119*^9}, {3.684056475187724*^9, 3.6840565698255177`*^9}, {
3.68405663460765*^9, 3.684056651914877*^9}, {3.6840566937022333`*^9,
3.684056708088512*^9}, {3.684056741400457*^9, 3.684056752678194*^9}, {
3.684058223240677*^9, 3.684058282930686*^9}, {3.684058596448498*^9,
3.6840586510419407`*^9}},ExpressionUUID->"f7caf562-7bf4-473a-b945-\
03af51bd2cc1"],
Cell[BoxData[{
RowBox[{
RowBox[{
RowBox[{"v", "[",
RowBox[{"x_", ",", "t_"}], "]"}], "=",
RowBox[{
RowBox[{"-",
RowBox[{"V", "[",
RowBox[{"x", ",", "t"}], "]"}]}], "/.", "solution"}]}],
";"}], "\[IndentingNewLine]",
RowBox[{"GraphicsColumn", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"Plot", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"v", "[",
RowBox[{"0", ",", "t"}], "]"}], ",",
RowBox[{"v", "[",
RowBox[{"1.0", ",", "t"}], "]"}], ",",
RowBox[{"v", "[",
RowBox[{"2.0", ",", "t"}], "]"}], ",",
RowBox[{"v", "[",
RowBox[{"3.0", ",", "t"}], "]"}], ",",
RowBox[{"v", "[",
RowBox[{"4.0", ",", "t"}], "]"}], ",",
RowBox[{"v", "[",
RowBox[{"5.0", ",", "t"}], "]"}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"t", ",", "0", ",", "100"}], "}"}], ",",
RowBox[{"PlotRange", "\[Rule]", "All"}], ",",
RowBox[{"Frame", "\[Rule]", "True"}], ",",
RowBox[{"PlotStyle", "\[Rule]",
RowBox[{"{",
RowBox[{"Black", ",",
RowBox[{"Darker", "[", "Blue", "]"}], ",",
RowBox[{"Darker", "[", "Green", "]"}], ",",
RowBox[{"Darker", "[", "Yellow", "]"}], ",", "Orange", ",",
RowBox[{"Darker", "[", "Red", "]"}]}], "}"}]}], ",",
RowBox[{"FrameLabel", "\[Rule]",
RowBox[{"{",
RowBox[{"\"\<time\>\"", ",", "\"\<membrane potential\>\""}], "}"}]}],
",",
RowBox[{"AspectRatio", "\[Rule]", "1"}]}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"Plot", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"v", "[",
RowBox[{"x", ",", "23.0"}], "]"}], ",",
RowBox[{"v", "[",
RowBox[{"x", ",", "24.0"}], "]"}], ",",
RowBox[{"v", "[",
RowBox[{"x", ",", "25.0"}], "]"}], ",",
RowBox[{"v", "[",
RowBox[{"x", ",", "26.0"}], "]"}], ",",
RowBox[{"v", "[",
RowBox[{"x", ",", "27.0"}], "]"}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"x", ",", "0", ",", "10"}], "}"}], ",",
RowBox[{"PlotRange", "\[Rule]", "All"}], ",",
RowBox[{"Frame", "\[Rule]", "True"}], ",",
RowBox[{"PlotStyle", "\[Rule]",
RowBox[{"{",
RowBox[{
RowBox[{"Darker", "[", "Blue", "]"}], ",",
RowBox[{"Darker", "[", "Green", "]"}], ",",
RowBox[{"Darker", "[", "Yellow", "]"}], ",", "Orange", ",",
RowBox[{"Darker", "[", "Red", "]"}]}], "}"}]}], ",",
RowBox[{"FrameLabel", "\[Rule]",
RowBox[{"{",
RowBox[{
"\"\<position along axon\>\"", ",", "\"\<membrane potential\>\""}],
"}"}]}], ",",
RowBox[{"AspectRatio", "\[Rule]", "1"}]}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"DensityPlot", "[",
RowBox[{
RowBox[{"v", "[",
RowBox[{"x", ",", "t"}], "]"}], ",",
RowBox[{"{",
RowBox[{"t", ",", "0", ",", "100"}], "}"}], ",",
RowBox[{"{",
RowBox[{"x", ",", "0", ",", "10"}], "}"}], ",",
RowBox[{"PlotRange", "\[Rule]", "All"}], ",",
RowBox[{"ColorFunction", "\[Rule]", "\"\<ThermometerColors\>\""}], ",",
RowBox[{"PlotPoints", "\[Rule]", "100"}], ",",
RowBox[{"FrameLabel", "\[Rule]",
RowBox[{"{",
RowBox[{"\"\<time\>\"", ",", "\"\<position along axon\>\""}],
"}"}]}], ",",
RowBox[{"MeshFunctions", "->",
RowBox[{"{",
RowBox[{"#3", "&"}], "}"}]}], ",",
RowBox[{"Mesh", "\[Rule]", "8"}]}], "]"}]}], "}"}], ",",
RowBox[{"ImageSize", "\[Rule]", "Large"}]}], "]"}]}], "Input",
CellChangeTimes->{{3.684049450732829*^9, 3.6840495043061123`*^9}, {
3.684049591284625*^9, 3.684049633968052*^9}, {3.684049690442356*^9,
3.684049848815494*^9}, {3.6840499697395287`*^9, 3.684049970810413*^9}, {
3.684050006183666*^9, 3.684050067282*^9}, {3.684050134293542*^9,
3.684050148616465*^9}, {3.6840502019750957`*^9, 3.684050206205854*^9}, {
3.684050283780036*^9, 3.68405030479743*^9}, {3.684050334821117*^9,
3.6840503538603897`*^9}, {3.684050473020976*^9, 3.684050480045898*^9}, {
3.684050546016603*^9, 3.6840505840094213`*^9}, {3.6840506835763187`*^9,
3.6840507118864326`*^9}, {3.684051014954348*^9, 3.684051080729702*^9}, {
3.684051147807724*^9, 3.684051150221663*^9}, 3.684051184090312*^9, {
3.684051873939975*^9, 3.684051875042906*^9}, {3.684052866949162*^9,
3.684052875074492*^9}, {3.6840529630319977`*^9, 3.6840529910710983`*^9}, {
3.684056383515396*^9, 3.6840563899336567`*^9}, {3.684058298730534*^9,
3.68405837258429*^9}, {3.684058460503146*^9, 3.684058566400079*^9}},
CellLabel->"In[57]:=",ExpressionUUID->"8ce2d5ac-0ca7-448f-9647-2680c6b39f46"],
Cell[TextData[{
StyleBox["Q4: ",
FontWeight->"Bold",
FontSlant->"Italic"],
StyleBox["Why are the curves in the upper and middle panel displaced \
relative to one another?",
FontWeight->"Bold"]
}], "Text",
CellChangeTimes->{{3.6839654986734343`*^9, 3.68396551251654*^9}, {
3.683965551442984*^9, 3.683965862639476*^9}, {3.68396590505615*^9,
3.683965968696045*^9}, {3.6839660310347424`*^9, 3.683966044021246*^9}, {
3.6840536562257547`*^9, 3.684053728836813*^9}, {3.6840544710714273`*^9,
3.684054759434245*^9}, {3.68405487253192*^9, 3.684054887159724*^9}, {
3.684054918148314*^9, 3.6840549505665693`*^9}, {3.6840549895912647`*^9,
3.684055117799378*^9}, {3.684055163023621*^9, 3.68405517446024*^9}, {
3.684056826738449*^9, 3.684056926092456*^9}, {3.684057896419353*^9,
3.6840578964832373`*^9}, {3.684058426558601*^9,
3.6840584339564543`*^9}},ExpressionUUID->"84787901-8b20-4759-a81f-\
c6296865328b"],
Cell[TextData[StyleBox["",
FontWeight->"Bold"]], "Text",
CellChangeTimes->{{3.6839654986734343`*^9, 3.68396551251654*^9}, {
3.683965551442984*^9, 3.683965862639476*^9}, {3.68396590505615*^9,
3.683965968696045*^9}, {3.6839660310347424`*^9, 3.683966044021246*^9}, {
3.6840536562257547`*^9, 3.684053728836813*^9}, {3.6840544710714273`*^9,
3.684054759434245*^9}, {3.68405487253192*^9, 3.684054887159724*^9}, {
3.684054918148314*^9, 3.6840549505665693`*^9}, {3.6840549895912647`*^9,
3.684055117799378*^9}, {3.684055163023621*^9, 3.68405517446024*^9}, {
3.684056826738449*^9,
3.68405689205987*^9}},ExpressionUUID->"3725f38c-74b9-48ee-9746-\
c73886107900"],
Cell[TextData[{
StyleBox["Q5: ",
FontWeight->"Bold",
FontSlant->"Italic"],
StyleBox["How can you infer from the lower diagram at what speed the action \
potential travels along the axon? Which parameter of the model has a direct \
effect on this speed?",
FontWeight->"Bold"]
}], "Text",
CellChangeTimes->{{3.6839654986734343`*^9, 3.68396551251654*^9}, {
3.683965551442984*^9, 3.683965862639476*^9}, {3.68396590505615*^9,
3.683965968696045*^9}, {3.6839660310347424`*^9, 3.683966044021246*^9}, {
3.6840536562257547`*^9, 3.684053728836813*^9}, {3.6840544710714273`*^9,
3.684054759434245*^9}, {3.68405487253192*^9, 3.684054887159724*^9}, {
3.684054918148314*^9, 3.6840549505665693`*^9}, {3.6840549895912647`*^9,
3.684055117799378*^9}, {3.684055163023621*^9, 3.68405517446024*^9}, {
3.684055211738501*^9, 3.6840552134481087`*^9}, {3.6840552705866137`*^9,
3.684055270668708*^9}, {3.6840553660471888`*^9, 3.684055513882366*^9}, {
3.684055546653903*^9, 3.684055605766163*^9}, 3.684056896106309*^9, {
3.684056937816987*^9, 3.68405694385879*^9}, {3.6840572368878202`*^9,
3.684057251638556*^9}, {3.684057900274572*^9,
3.6840579003587093`*^9}},ExpressionUUID->"cabf4f86-0faf-489e-b93b-\
591528277239"],
Cell["", "Text",
CellChangeTimes->{{3.68405520395356*^9,
3.684055203955825*^9}},ExpressionUUID->"2f3cd4a7-dfd2-4110-945d-\
93bd90efa4e6"],
Cell[TextData[{
StyleBox["Q6: ",
FontWeight->"Bold",
FontSlant->"Italic"],
StyleBox["For the original parameter set (",
FontWeight->"Bold"],
Cell[BoxData[
StyleBox[
RowBox[{"{",
RowBox[{
RowBox[{"C", "\[Rule]", "1.0"}], ",",
RowBox[{
SubscriptBox["\[GothicCapitalD]", "V"], "\[Rule]", " ", "0.05"}], ",",
RowBox[{"A", "\[Rule]", "20.0"}], ",",
RowBox[{"f", "\[Rule]", "0.1"}], ",",
RowBox[{"L", "\[Rule]", " ", "10.0"}]}], "}"}], "Input"]],
CellChangeTimes->CompressedData["
1:eJwdzzlIQgEABuDnQzoGMSMKQzGLLu1QFAMju8CWDnEIOsgwhIrIkiQ0KwqC
cOxABEsRykApCAKJTn0V5eJglEVDghS5tDlU0Pvf8PMN//L/YqNZbyIJghDR
gazMcJHHkmk3GHQSKFvJ8Hdojb21Aii8F43BPj/PBBPW0DS8omrM0NFx+wg/
689foTlUzd2l9YU3hbDAYhPDDwm3Av4mshKof/c3wGbBxFaE9uLIxTiucHjh
V2tFAM5np4LQzXIcQuWq/QQWLohiMEcrr4vSjsaoRngZjJEUfqwd5kJf5IED
5wK9xbCT+BFDta6pGl4LVFI4aXhRQuqI0sDBAo4WbvTk2Zi+OW6HpGZxGepT
qnV4+va8Cdmzyy5GjXMX8u5+vbC737IHz5zpfThTNRCEyRFhCObzZccw9Cdn
tHe9hKFyqCQKS9vUcWha6mcUfLufoFPWkoJWdrrshjbD/WFUODmVkCQ1NdCT
LD+4w/5tKeM/cqIAXw==
"],ExpressionUUID->"d3ee5906-95bd-4c14-9c24-bdf82ce742ab"],
StyleBox["), you can see in the upper diagram that the first and the second \
peak of the stimulus elicit an action potential, whereas the third peak does \
not. Moreover, this pattern repeats itself, leading to a 3:2 ratio of \
stimulus peaks to action potentials. Why does the axon not respond to every \
third stimulus peak? Test your hypothesis by changing the frequency and the \