You should find the Single Neuron Equation assignment as a pdf on the course calendar at http://geofhagopian.net/m2c/M2C-S18/M2C-S18-Syllabus.pdf (under week 4 on the calendar). Use this space to start a collaboration with a partner on CoCalc, if you like. You can also use other means to complete the project.
Biologists are currently applying mathematical modeling to a wide range of problems. One such problem involves
the function of nerve cells (neurons) in the brain. These cells generate electrical impulses that move along their
axons, affecting the activity of neighboring cells. Even for a single neuron, a complete model using what is currently
known about its firing mechanism may take several equations, Since the human brain conatains on the order of 1010 neurons,
an exact model is not feasible. In this application you will be looking at a very simplified model for an isolated population
of neurons all having similar properties.
Let x(t) denote the percent of neurons firing at time t, normalized to be between 0 (low activity) and 1 (high activity).
A simple model representing the change of activity level in the population is given by the differential equation
where E is the level of activity coming from the cells external to the population, θ is a common threshold level for
cells in the set, and Sa is a response function that models the change in activity level due to a given input.
We will use a standard “sigmoidal” response function .
The nonlinear function Sa can be seen to increase monotonically from 0 to 1 as z increases from to ∞. It
is called a sigmoidal function because it has a sort of stylized S-shape. You may remember that solutions of the logistic growth
equation had this same shape.
Find a formula for the derivative of Sa(z), and show that it satisfies the identity
*Hint: Mostly algebra.*
Completed on seperate sheet of paper
Draw a graph of Sa(z) for a=3,10, and 20. Where is the slope a maximum? Is it the same in each case?
Explain how the graph of differs from the graph of Sa(z).
Because the value of Sa is always between 0 and 1, if x>1 the slope is negative and
if x<0 it is positive. This means that any equilibrium solutions, that is, values of x where dtdx=0
must lie between 0 and 1. It also implies that the arrows on the phase line are always pointing down above x=1 and
up below x=0.
Figure 2.27 shows the graphs of y=x (the dashed line) and the response function
for θ=0.4,0.7, and 1.0. It can be seen that for small θ there will be one equilibrium solution near x=1 and
for large θ there will be one equilibrium near x=0. This seems reasonable since a high threshold means it
takes a lot of input to produce very much activity. For θ in the middle range, however, there can be three
*In Sage, use commands like *
3) Draw phase lines for with θ=0.4,0.5,…,0.9,1.0 ¶
Label each equilibrium point as a sink, source or node. You will need a numerical equation solver to find the
equilibrium values; that is, the value of x where . As a check,
the three equilibria for θ=0.7 are x1≈0.007188,x2=0.5, and x3≈0.992812.
*Hint To get some idea of where to hunt for what, it's helpful to have a graph of the seven curves for * θ=0.4,0.5,…,0.9,1.0. In Sage,
g=Graphics() x,y=var('x y') p=plot(x,(x,-.2,1.2)) g=g+p for i in range(4,11): p=plot(1/(1+e^(-10*(x+0.2-i/10))),(x,-0.2,1.2)) g=g+p show(g)
To find the numerical approximations in Sage, you can use the find_root command.
Hint: The easiest way to get the bifurcation curve is just to connect the dots by hand with a smooth curve.
From the bifurcation diagram, estimate the two bifurcation values of θ where the number of equilibrium points
changes from one to three, and then from three back to one.
*Hint: I think it’s better to use the figure showing the functions * superimposed on y=x
h=find_root(-1+(10*exp(-10*(x+0.2)))/((1+exp(-10*(x+0.2)))^2),0.0,1.0)#we set the derivates equal to each other, and set the theta equal to 0f=(1/(1+exp(-10*(h+0.2))))#we then plug it into the origionalj=f-hshow(j)#we then subtract the root from the new y value(j)h=find_root(-1+(10*exp(-10*(x+0.2)))/((1+exp(-10*(x+0.2)))^2),-10,0)#we set the derivates equal to each other, and set the theta equal to 0f=(1/(1+exp(-10*(h+0.2))))#we then plug it into the origionalj=f-hshow(j)#we then subtract the root from the new y value(j)
These are the two bifurcation points
Find the two bifurcation values of θ analytically. You will need to solve two simultaneous equations obtained
by using the fact that at a bifurcation value of θ the curves and y=x have a point
of tangency. At this point the y-values are equal and the slopes are also equal.
Hint: Teasing a numerical solution to a system of non-linear equations out of Sage is not straight-forward.
Wolfram Alpha chugs away at it for a while and then gives up. You may resort to guess and check...we already know about where to look, after all. There is a clever way, I think.
See previous answer
Use your computer algebra system to draw a slope field for the ode with a=10,E=0.2, and θ=0.7.
Let t vary from 0 to 20. Use initial values x(0)=0.1,0.3,0.5,0.7, and 0.9. Describe what happens to the
activity as t→∞.
Hint: In order to accomplish this in Sage, it's helpful to write the code for the building the numerical solutions. The code below was adapted from the Mendel University (located in Brno, Czech Republic) site http://user.mendelu.cz/marik/sage/dr.pdf. In Czeck, "krok" must mean something like "step size":
t,x=var('t x') def rk(fnc,t0,x0,krok,t1): g=fast_float(fnc,'t x','x') n=int((1.0)*(t1-t0)/krok) t00=t0; x00=x0 soln=[[t00,x00]] for i in range(n+1): m1=g(t00,x00) m2=g(t00+krok/2,x00+m1*krok/2) x00=x00+krok*m2 t00=t00+krok soln.append([t00,x00]) return soln
If t goes to infinity the f(t) reaches an equilibrium
Redo problem (7) with periodic input E=E(t)=0.2(1+sin(t)). With this time varying input the equation
is no longer autonomous. Explain carefully how the activity differs from that described in (7). Do you think
there is a periodic solution separating the two types of solutions in the periodic case? This is an interesting
problem and it might be a good time to look at the paper “Qualitative tools for studying periodic solutions
and bifurcations as applied to the periodically harvested logistic equation” by Diego Benardete, V.W.Noonburg,
and B. Pollina, Amer. Math. Monthy, vol 115, 202-219(2008). It discusses, in a very readable way, how one
goes about determining the answer to such a question.
*HINT: At first it may seem simple enough to replace the 0.2 in the exponent of x′ with the sinusoid in Sage,
but as you may have come to expect, you get a cascade of red error messages. This caused me to look at the help file
for the fast_flot() function and modify it's call as shown below:
t,x=var('t x') (t_min, t_max, x_min,x_max)=(0,20,0,1) def rk(fnc,t0,x0,krok,t1): g=fast_float(fnc,'t','x') #,'x') n=int((1.0)*(t1-t0)/krok) t00=t0; x00=x0 soln=[[t00,x00]] for i in range(n+1): m1=g(t00,x00) m2=g(t00+krok/2,x00+m1*krok/2) x00=x00+krok*m2 t00=t00+krok soln.append([t00,x00]) return soln