How can I get all solutions of nonlinear systems of equations using vpasolve?
6 views (last 30 days)
Show older comments
Itai Beaudoin de roca
on 14 Dec 2020
Answered: Walter Roberson
on 14 Dec 2020
I am trying to determine the fixed points of a nonlinear system of differential equations (Hodgkin-Huxley model). I went about using vpasolve to find the solutions of the system when the derivatives are set to zero, and I got a solution which seemed to make sense, but I was expecting three solutions (see Wang, Chen, and Fei's, Analysis and Control of the Bifurcation of the Hodgkin Huxley Model, I am using slightly different parameters, but I expect to get a similar result). Does anybody have any tips on getting all solutions to the system? (My deepest apologies if my assumption is wrong and the system has but one fixed point).
gNabar=120 ;%((muA/mV)/cm~2)
gKbar=36; %((muA/mV)/cm~2)
gLbar=0.3; %((muA/mV)/cm~2)
ENa = 45 ;%(mV)
EK = -82; %(mV)
EL = -59 ;%(mV)
theta1=(V+45)/10; %init AlphaM
aM=(1.0*theta1/(1-exp(-theta1)));
theta2 = (V+70)/18; %init BetaM
bM=(4.0*exp(-theta2));
theta3=(V+60)/10; %init Alpha N
aN=(0.1*theta3/(1-exp(-theta3)));
theta4 = (V+70)/80; %init Beta N
bN=(0.125*exp(-theta4));
theta5 = (V+70)/20; %init Alpha H
aH=(0.07*exp(-theta5));
theta = (V+40)/10; %init Beta H
bH=(1.0/(1+exp(-theta)));
[VE, nE, mE, hE] = vpasolve(gNabar*m^(3)*h*(V-ENa)+gKbar*n^(4)*(V-EK)+gLbar*(V-EL)==0, m==aM/(aM+bM), n==aN/(aN+bN), h==aH/(aH+bH), V, n, m, h)
0 Comments
Accepted Answer
Walter Roberson
on 14 Dec 2020
Your second, third, and fourth equations are each of the form variable = expression in V, and you ask to solve for each of those variables. Those variables are all used in the first equation.
Therefore instead of trying to solve for all of the equations as a system of four equations, substititute the definitions of the variables into the first equation -- e.g.
E1 = subs(gNabar*m^(3)*h*(V-ENa)+gKbar*n^(4)*(V-EK)+gLbar*(V-EL), [m, n, h], [aM/(aM+bM), aN/(aN+bN), aH/(aH+bH)])
what you get out is single equation in a single variable, V.
You can now fplot(E1) to look for zeros. You can find one near -50
However.. if you plot more, you will probably not find any more real-valued solutions.
The question then becomes whether you can find any complex-valued solutions. I do not seem to be finding any at the moment.
0 Comments
More Answers (0)
See Also
Categories
Find more on Neural Simulation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!