Initial value problems 243
for an initial perturbation ∆x0. If κ > 0 the system is unstable, if κ < 0 then the
system is stable.
You can also see this result (without the rigorous math) by looking at the function
itself. To be a stable steady state, you need to have f(xss −∆x)>0 and f(xss +
7k = [0.0015;0.15;3.5;20];
8
9%get stable steady states from part 1
10 root1 = get root(12,k);
11 root2 = get root(72,k);
22 x = 0;
23 plot integration(x,k,tmax,root1,root2,‘ob’)
24 x = 15;
25 plot integration(x,k,tmax,root1,root2,‘or’)
26 x = 30;
37 dt = 1e-4;
38 tstep = 1000; %number of steps per plot
39 t = 0;
40 plot(t,x,s)
41 while dx1 >tol && dx2 >tol