Assignment 1 Marc Cent Elles
Assignment 1 Marc Cent Elles
Assignment 1
Authors:
Submission Date:
E ′ = −E + (1 − E)Se (c1 E − c2 I + P ),
(1)
I ′ = −I + (1 − I)Si (c3 E − c4 I + Q),
where the function Sx (u) with x = E, I is defined by:
1 1
Sx (u) = − .
1 + exp(−bx (u − θx )) 1 + exp(bx θx )
Reading this function definition carefully, we see that u = c1 E − c2 I + P is the argument
of the function Se for E ′ , and not multiplication.
The parameters are given by:
The excitatory population becomes active due to input P and excites both itself through
recurrent connections and the inhibitory population by projecting synapses.
2. Exercises (6 points)
The first two items are meant to structure your code and are necessary to solve later
parts.
1. Write a MATLAB function WC.m so that the call f=WC(t,X) is the evaluation of (1),
and f = (E’, I’) is a column vector. (0 points)
2. Write a MATLAB function JACWC.m so that the call A=JACWC(t,X) returns the
Jacobian matrix fX . We expect you to use the result from Tutorial 1. (0 points)
3. The equations dE
dt
= 0 and dIdt
= 0 define the nullclines. On the nullclines, solution
curves turn direction, i.e., up/right ↔ down/left. Since E ′ = 0 involves only one
term with I, we can write I as a function of E. Plot the resulting curves. (1.5
points)
Alternative to finding an analytical expression for the nullclines, you may consider
a root-finding method. In this case, for every fixed value of E, find I such that
E ′ = 0, and do this for a suitable range of values for E.
4. Find all equilibria of the Wilson-Cowan model for these parameter values numeri-
cally. (1 point)
5. Determine the linearization for each fixed point. Classify the fixed points based on
the eigenvalues. Make local phase portraits of the linearization x′ = Df (E0 , I0 )x in
separate figures. (1.5 points)
1
6. Make a global phase portrait for a relevant part of the unit square 0 ≤ E, I ≤ 1.
Your figure should contain the nullclines, the equilibria, and a few solutions (orbits).
Create these solutions by simulating the model with the Euler-Forward method and
use at most 10 initial conditions. For the equilibria with real eigenvalues, also plot
the lines given by X(s) = x0 +sv with v an eigenvector. Provide a short description
of this figure and comment on the attractors, i.e., where do the orbits go to? (2
points)
2
Exercise 1: Writing the WC.m Function
The objective of this exercise is to write a MATLAB function, WC.m, that evaluates the
Wilson-Cowan model equations. The function has to calculate the derivatives E ′ and I ′
of the excitatory and inhibitory populations, using the model parameters and equations
that were given in the proposed problem.
The function is defined such that the call f = WC(t, X) returns a column vector f =
(E’, I’) based on the equations:
E ′ = −E + (1 − E)Se (c1 E − c2 I + P ),
I ′ = −I + (1 − I)Si (c3 E − c4 I + Q),
where Sx (u) for x = E, I is given by:
1 1
Sx (u) = − .
1 + exp(−bx (u − δx )) 1 + exp(bx δx )
MATLAB Implementation
Below is the MATLAB code for the function WC.m:
1 % % Exercise 1
2
3 % We define all of the parameters
4 delta_e = 4;
5 b_e = 1.3;
6 delta_i = 3.7;
7 b_i = 2;
8 Q = 1;
9 c_1 = 20;
10 c_2 = 11.5;
11 c_3 = 15;
12 c_4 = 1;
13 P = 2;
14
15 function f = WC (t , X )
16 % Extract the variables from X
17 E = X (1) ;
18 I = X (2) ;
19
20 % Compute the arguments for S_e and S_i
21 u_e = c_1 * E - c_2 * I + P ;
22 u_i = c_3 * E - c_4 * I + Q ;
23
3
Explanation of the Code
1. Parameter Definition: The parameters of the Wilson-Cowan model, like c1 , c2 , be ,
and δe , are computed at the beginning. These parameters change the state of the
excitatory and inhibitory populations.
• The function WC has two inputs: t, the current time (which is actually not
being used in the overall definition because it only does the derivatives in one
a fixed time), and X, a vector containing the values of E and I at a given time,
the first on being E and the second one being I.
• The output f is a column vector that has the final derivatives E ′ and I ′ .
• The middle variables ue and ui that are used for the functions Se and Si are
computed using the equations in the stated before.
• The activation functions Se and Si are calculated based also on their respective
definitions.
4. Derivative Computation: Using the given equations, the derivatives E ′ and I ′ are
calculated.
MATLAB Implementation
Below is the MATLAB code for JACWC.m:
1 % % Exercise 2
2 % I take the function from the Tutorial Exercises :
3 function A = JACWC (t , X , h )
4 n = length ( X ) ; % Dimension of the state vector
5 A = zeros (n , n ) ; % Initialize the Jacobian matrix
6
7 for i = 1: n
8 v = zeros (n , 1) ; % Perturbation vector
9 v ( i ) = 1; % Perturb one variable at a time
10
11 % Evaluate the perturbed values of the function
12 X_plus = WC (t , X + v * h ) ;
13 X_minus = WC (t , X - v * h ) ;
14
4
17 end
18 end
19
20 % Example usage :
21 X = [ eq_points (1 , 1) , eq_points (1 , 2) ]; % Example equilibrium point
22 F = [ E_prima ( X (1) , X (2) ) ; I_prima ( X (1) , X (2) ) ]; % Evaluate derivatives
23 h = 1e -3; % Small perturbation
24 t = 0; % Current time
25
26 % Compute Jacobian using JACWC
27 A = JACWC (t , F , h ) ;
28 disp ( A )
29
30 % Analytical Jacobian ( for verification )
31 Jac = [ dEdE ( X (1) , X (2) ) , dEdI ( X (1) , X (2) ) ;
32 dIdE ( X (1) , X (2) ) , dIdI ( X (1) , X (2) ) ];
33 disp ( Jac )
• Inputs:
– t: Time (it is actually not used in this function because it is done at a
given time).
– X: A vector containing the current values of E and I, it has the E at the
first spot of the vector and I at the second.
– h: A small perturbation value that should be in the order of 10( − 3) or
lower.
• Output:
– A: The Jacobian matrix, where each entry is a numerical derivative.
• The Jacobian matrix is has in its positions all of the possible partial derivatives.
∂f
For a function f , the derivative ∂x i
is approximated as:
∂f f (X + hv) − f (X − hv)
≈ ,
∂xi 2h
where v is a perturbation vector with a 1 in the i-th position and 0 elsewhere.
3. Iterative Calculation:
• The for-loop iterates through each variable in X (that in our case are E and I),
computing the derivative with respect to that variable while having the others
constant.
4. Example Usage:
5
• The Jacobian is calculated at a sample equilibrium point, X = [eq points(1,1),
eq points(1,2)].
• Then, the Jacobian is compared to an analytical Jacobian matrix for verifica-
tion.
Code for Analytical Nullclines: Below is the MATLAB code for plotting the null-
clines analytically:
1 E = 0.01:0.01:0.49;
2 I = 0.01:0.01:0.5;
3 exp_e = 1 / (1 + exp ( b_e * delta_e ) ) ;
4 exp_i = 1 / (1 + exp ( b_i * delta_i ) ) ;
5
6 I_E = @ ( E ) ( log (1 ./ ( E ./(1 - E ) + exp_e ) - 1) ./ b_e + c_1 * E + P - delta_e ) /
c_2 ;
7 E_I = @ ( I ) ( - log (1 ./ ( I ./(1 - I ) + exp_i ) - 1) ./ b_i + c_4 * I - Q + delta_i )
/ c_3 ;
8
9 I_e = I_E ( E ) ;
10 E_i = E_I ( I ) ;
11
12 figure (1) ;
13 plot (E , I_e , ’b - ’ , ’ LineWidth ’ , 2) ; % Excitatory Nullcline
14 hold on ;
15 plot ( E_i , I , ’r - - ’ , ’ LineWidth ’ , 2) ; % Inhibitory Nullcline
16
17 grid on ;
6
18 xlabel ( ’ Excitatory Activity ( E ) ’ , ’ FontSize ’ , 12) ;
19 ylabel ( ’ Inhibitory Activity ( I ) ’ , ’ FontSize ’ , 12) ;
20 title ( ’ Nullclines of the Wilson - Cowan Model ’ , ’ FontSize ’ , 14) ;
21 legend ( ’ Excitatory Nullcline ’ , ’ Inhibitory Nullcline ’ , ’ Location ’ , ’
southeast ’) ;
22 hold off ;
Overall View:
1. The secant method detects roots by finding changes in the sign of E ′ or I ′ .
2. Equilibrium points are located where the excitatory and inhibitory nullclines inter-
sect.
• The arrays E array and I array are defined as discrete points inside the range
of E and I.
• The tolerance tol is set to have numerical precision.
2. Root Detection:
• For each fixed E = Earray (e), the function E prima(E, I) is evaluated over all
I values in I array.
• Changes in sign between one calculation and the net one of E prima are de-
tected using the condition:
• Similarly, for each fixed E = Earray (e), changes in sign of I prima(E, I) are
detected.
• For each detected root in E ′ , the initial extremes (x1 and x2 ) are set based on
the indices of iE.
• The secant formula is applied repeatedly to approximate the root:
f (x2 ) · (x2 − x1 )
x 3 = x2 − ,
f (x2 ) − f (x1 )
where f (x) is E prima(E, I).
7
• The new bounds are updated based on the sign of f (x3 ):
– If f (x1 ) · f (x3 ) < 0, the root is inside [x1 , x3 ], so x2 ← x3 .
– If not so, the root is in between [x3 , x2 ], so x1 ← x3 .
• Iteration continues until |f (x3 )| < tol.
• The process is repeated for I prima(E, I) with a fixed E, using the same
secant method.
• The calculated roots for E ′ and I ′ are saved in arrays E zero and I zero,
respectively.
• The arrays E zero and I zero are compared to find intersection points, that
are the actual equilibrium points.
• These are stored in the array possible eq points.
Code for Numerical Nullclines: Below is the MATLAB code used to calculate the
nullclines numerically and find the equilibrium points:
1 tol = 1e -10;
2 E_array = 0. 00 1: 0.0 01 :0 .9 99 ;
3 I_array = 0. 00 1: 0.0 01 :0 .9 99 ;
4 E_zero = [];
5 I_zero = [];
6 po ss ib le _e q_ po in ts = [];
7
8 for e = 1: length ( E_array )
9 yE = arrayfun ( @ ( I ) E_prima ( E_array ( e ) , I ) , I_array ) ;
10 iE = find ( yE (2: end ) .* yE (1: end -1) < 0) ;
11
12 yI = arrayfun ( @ ( I ) I_prima ( E_array ( e ) , I ) , I_array ) ;
13 iI = find ( yI (2: end ) .* yI (1: end -1) < 0) ;
14
15 if ~ isempty ( iE )
16 E = E_array ( e ) ;
17 x1 = I_array ( iE ) ;
18 x2 = I_array ( iE + 1) ;
19 x3 = x2 - E_prima (E , x2 ) * ( x2 - x1 ) /( E_prima (E , x2 ) - E_prima (E
, x1 ) ) ;
20 while abs ( E_prima (E , x3 ) ) >= tol
21 x3 = x2 - E_prima (E , x2 ) * ( x2 - x1 ) /( E_prima (E , x2 ) -
E_prima (E , x1 ) ) ;
22 if E_prima (E , x1 ) * E_prima (E , x3 ) < 0
23 x2 = x3 ;
24 else
25 x1 = x3 ;
26 end
27 end
28 E_zero = [ E_zero ; E_array ( e ) , x3 ];
29 end
8
30
31 if ~ isempty ( iI )
32 E = E_array ( e ) ;
33 x1 = I_array ( iI ) ;
34 x2 = I_array ( iI + 1) ;
35 x3 = x2 - I_prima (E , x2 ) * ( x2 - x1 ) /( I_prima (E , x2 ) - I_prima (E
, x1 ) ) ;
36 while abs ( I_prima (E , x3 ) ) >= tol
37 x3 = x2 - I_prima (E , x2 ) * ( x2 - x1 ) /( I_prima (E , x2 ) -
I_prima (E , x1 ) ) ;
38 if I_prima (E , x1 ) * I_prima (E , x3 ) < 0
39 x2 = x3 ;
40 else
41 x1 = x3 ;
42 end
43 end
44 I_zero = [ I_zero ; E_array ( e ) , x3 ];
45 end
46 end
47
48 for i = 2: length ( E_zero (: , 1) )
49 if ( E_zero (i , 2) - I_zero (i , 2) ) * ( E_zero (i -1 , 2) - I_zero (i -1 , 2) )
< 0
50 po ss ib le _e q_ po in ts = [ p oss ib le _e q_ po in ts ; E_zero (i , 1) E_zero (i ,
2) ];
51 end
52 end
53
54 figure (2) ;
55 plot ( E_zero (: , 1) , E_zero (: , 2) , ’b - ’ , ’ LineWidth ’ , 2 , ’ DisplayName ’ , ’
Excitatory Nullcline ’) ;
56 hold on ;
57 plot ( I_zero (: , 1) , I_zero (: , 2) , ’r - ’ , ’ LineWidth ’ , 2 , ’ DisplayName ’ , ’
Inhibitory Nullcline ’) ;
58 scatter ( po ss ib le_ eq _p oi nt s (: , 1) , po ss ib le _eq _p oi nt s (: , 2) , 50 , ’k ’ , ’
DisplayName ’ , ’ Equilibria ’) ;
59 xlabel ( ’ Excitatory Activity ( E ) ’ , ’ FontSize ’ , 12) ;
60 ylabel ( ’ Inhibitory Activity ( I ) ’ , ’ FontSize ’ , 12) ;
61 title ( ’ Numerical Solution of Wilson - Cowan Model Nullclines ’ , ’ FontSize ’ ,
14) ;
62 legend ( ’ show ’ , ’ Location ’ , ’ best ’) ;
63 grid on ;
64 hold off ;
• Numerical Method: Uses the secant method to find roots and works for the full
range 0 < E, I < 0.5.
9
Figures
10
Exercise 4: Equilibrium Points
The aim of this exercise is to numerically find the equilibrium points of the Wilson-Cowan
model for the values of the parameters provided. Equilibrium points happen when the
derivatives of the excitatory and inhibitory variables, E ′ (E, I) and I ′ (E, I), are both zero:
We use Newton’s method in two dimensions to find these points. The method iteratively
solves for roots of the vector function:
′
E (E, I)
F(E, I) = ′ ,
I (E, I)
by linearizing the system using the Jacobian matrix and solving for corrections.
Jacobian Matrix
The Jacobian matrix is defined as:
∂E ′ ∂E ′
J= ∂E ∂I .
∂I ′ ∂I ′
∂E ∂I
Each entry of the Jacobian matrix is computed using the derivatives of Se (E, I) and
Si (E, I).
∂E ′ ∂Se ∂E ′ ∂Se
= −1 − Se (E, I) + (1 − E) , = (1 − E) ,
∂E ∂E ∂I ∂I
∂I ′ ∂Si ∂I ′ ∂Si
= (1 − I) , = −1 − Si (E, I) + (1 − I) .
∂E ∂E ∂I ∂I
The derivatives of Se (E, I) and Si (E, I) are:
∂Se ∂Se
= be Se (E, I)(1 − Se (E, I))c1 , = −be Se (E, I)(1 − Se (E, I))c2 ,
∂E ∂I
∂Si ∂Si
= bi Si (E, I)(1 − Si (E, I))c3 , = −bi Si (E, I)(1 − Si (E, I))c4 .
∂E ∂I
11
MATLAB Code
Below is the MATLAB code used to implement Newton’s method in two dimensions and
find the equilibrium points:
1 tol = 1e -6;
2
3 % Define the sigmoid functions
4 S_e = @ (E , I ) 1/(1+ exp ( - b_e *( c_1 * E - c_2 * I + P - delta_e ) ) ) - 1/(1+ exp (
b_e * delta_e ) ) ;
5 S_i = @ (E , I ) 1/(1+ exp ( - b_i *( c_3 * E - c_4 * I + Q - delta_i ) ) ) - 1/(1+ exp (
b_i * delta_i ) ) ;
6
7 % Define the derivatives
8 E_prima = @ (E , I ) -E + (1 - E ) * S_e (E , I ) ;
9 I_prima = @ (E , I ) -I + (1 - I ) * S_i (E , I ) ;
10
11 dSedE = @ (E , I) b_e * S_e (E , I) * (1 - S_e (E , I)) * c_1 ;
12 dSedI = @ (E , I) b_e * S_e (E , I) * (1 - S_e (E , I)) * - c_2 ;
13 dSidE = @ (E , I) b_i * S_i (E , I) * (1 - S_i (E , I)) * c_3 ;
14 dSidI = @ (E , I) b_i * S_i (E , I) * (1 - S_i (E , I)) * - c_4 ;
15
16 dEdE = @ (E , I) -1 - S_e (E , I ) + (1 - E ) * dSedE (E , I ) ;
17 dEdI = @ (E , I) (1 - E ) * dSedI (E , I ) ;
18 dIdE = @ (E , I) (1 - I ) * dSidE (E , I ) ;
19 dIdI = @ (E , I) ( -1 - S_i (E , I ) + (1 - I ) * dSidI (E , I ) ) ;
20
12
53 break ;
54 end
55 if count > 15000
56 break ;
57 end
58 count = count + 1;
59 end
60 end
61
62 disp ( eq_points )
Results
The equilibrium points found are:
0.1541 0.1921
0.4727 0.4997 .
0.4346 0.4995
Conclusion
This implementation of Newton’s method calculates correctly the equilibrium points of the
Wilson-Cowan model. The nature of the mathematical computation of Newton’s method
allows to have rapid and accurate equilibrium points when initial guesses are close to the
actual equilibrium points.
Linearization
The linearization of the system around a fixed point (E0 , I0 ) is given by:
x′ = J(E0 , I0 )x,
E
where x = and J(E0 , I0 ) is the Jacobian matrix evaluated at (E0 , I0 ). The entries of
I
the Jacobian matrix J(E, I) are:
∂E ′ ∂E ′
J(E, I) = ∂I∂E′ ∂I
∂I ′ .
∂E ∂I
These derivatives are derived as in Exercise 4 and implemented in the MATLAB code
below.
13
Eigenvalues and Classification
The stability and classification of a fixed point are determined by the eigenvalues λ1 and
λ2 of the Jacobian matrix. The classifications are as follows:
• Stable Node: Both eigenvalues are real and negative.
• Stable Spiral Focus: Eigenvalues are complex with negative real parts.
• Unstable Spiral Focus: Eigenvalues are complex with positive real parts.
MATLAB Code
The following MATLAB code computes the Jacobian matrix for each fixed point, calcu-
lates the eigenvalues, classifies the fixed point, and prints the results:
1 % % Exercise 5
2
3 eig_vals = [];
4 for i = 1: length ( eq_points )
5 % Extract fixed point coordinates
6 X = [ eq_points (i , 1) ; eq_points (i , 2) ];
7
8 % Compute Jacobian matrix
9 Jac = [ dEdE ( X (1) , X (2) ) , dEdI ( X (1) , X (2) ) ;
10 dIdE ( X (1) , X (2) ) , dIdI ( X (1) , X (2) ) ];
11 a = Jac (1 , 1) ;
12 b = Jac (1 , 2) ;
13 c = Jac (2 , 1) ;
14 d = Jac (2 , 2) ;
15
16 % Compute eigenvalues
17 eigenvalue_1 = (( a + d ) + sqrt (( a + d ) ^2 - 4*( a * d - b * c ) ) ) / 2;
18 eigenvalue_2 = (( a + d ) - sqrt (( a + d ) ^2 - 4*( a * d - b * c ) ) ) / 2;
19
20 eig_vals = [ eig_vals ; [ eigenvalue_1 , eigenvalue_2 ]];
21
14
34 fprintf ( ’ The fixed point [% f , % f ] is a Stable Spiral Focus .\
n ’ , X (1) , X (2) )
35 elseif real ( eigenvalue_1 ) > 0 && real ( eigenvalue_2 ) > 0
36 fprintf ( ’ The fixed point [% f , % f ] is an Unstable Spiral
Focus .\ n ’ , X (1) , X (2) )
37 else
38 fprintf ( ’ The fixed point [% f , % f ] is a Center .\ n ’ , X (1) , X
(2) )
39 end
40 end
41
42 end
Conclusion
The linearization and eigenvalue analysis correctly classify the fixed points and give in-
formation about their dynamics. These classifications help to understand the stability
properties of the system near each fixed point.
15
Simulating the Orbits
To simulate the orbits, we use the Euler-Forward method, a simple numerical technique
for solving ordinary differential equations. Given a differential equation of the form:
dx
= f (x),
dt
the Euler-Forward method updates the state of the system as:
Here, ∆t is the time step. For this exercise, the time step is set to ∆t = 0.01 and the total
simulation time is tend = 10 units. The state variables E (excitatory) and I (inhibitory)
are updated at each step based on their corresponding derivatives E ′ and I ′ .
Initial Conditions
We use 10 different initial conditions for the simulation:
{(0.2, 0.2), (0.8, 0.2), (0.2, 0.8), (0.8, 0.8), (0.5, 0.5),
(0.1, 0.9), (0.9, 0.1), (0.4, 0.6), (0.6, 0.4), (0.5, 0.3),
Initial Conditions =
(0.3, 0.5), (0.2, 0.1), (0.1, 0.2), (0.9, 0.5), (0.5, 0.9),
(0.7, 0.8), (0.8, 0.7)}.
For each initial condition, we simulate the model for 1000 time steps (tsteps = 1000).
MATLAB Code
The following MATLAB code implements the Euler-Forward method, simulates the orbits
for the specified initial conditions, and plots the phase portrait.
1 % Parameters
2 dt = 0.01; % Time step for Euler - Forward method
3 t_end = 10; % Simulation duration
4 t_steps = t_end / dt ;
5
6 % Simulate Orbits
7 in it ia l_ co nd it io ns = [0.2 , 0.2; 0.8 , 0.2; 0.2 , 0.8; 0.8 , 0.8;
8 0.5 , 0.5; 0.1 , 0.9; 0.9 , 0.1; 0.4 , 0.6;
9 0.6 , 0.4; 0.5 , 0.3; 0.3 , 0.5; 0.2 , 0.1; 0.1 , 0.2;
0.9 0.5; 0.5 0.9; 0.7 0.8; 0.8 0.7];
10 orbits = cell ( size ( initial_conditions , 1) , 1) ;
11 for i = 1: size ( initial_conditions , 1)
12 E = zeros (1 , t_steps ) ;
13 I = zeros (1 , t_steps ) ;
14 E (1) = in it ia l_ co nd it io ns (i , 1) ;
15 I (1) = in it ia l_ co nd it io ns (i , 2) ;
16 for t = 1: t_steps -1
17 dE = E_prima ( E ( t ) , I ( t ) ) ;
18 dI = I_prima ( E ( t ) , I ( t ) ) ;
19 E ( t +1) = E ( t ) + dE * dt ;
20 I ( t +1) = I ( t ) + dI * dt ;
21 end
22 orbits { i } = [ E ; I ];
16
23 end
24
25 E = 0.01:0.01:0.49;
26 I = 0.01:0.01:0.5;
27 % Plotting
28 figure ;
29 hold on ;
30 plot ( E_zero (: , 1) , E_zero (: , 2) , ’ DisplayName ’ , ’ Excitatory Nullcline ’)
31 hold on
32 plot ( I_zero (: , 1) , I_zero (: , 2) , ’ DisplayName ’ , ’ Inhibitory Nullcline ’)
33 hold on
34
35 % Plot Equilibria
36 scatter ( eq_points (: ,1) , eq_points (: ,2) , 50 , ’k ’ , ’ DisplayName ’ , ’
Equilibria ’) ;
37
38 % Plot Eigenvector Lines
39 quiver ( E_grid , I_grid , E_prime , I_prime , DisplayName = ’ Derivatives Grid ’)
;
40
41 % Plot Orbits
42 for i = 1: length ( orbits )
43 orbit = orbits { i };
44 plot ( orbit (1 ,:) , orbit (2 ,:) , ’k ’ , ’ HandleVisibility ’ , ’ off ’) ;
45 end
46
47 % Final touches
48 xlabel ( ’E ’) ;
49 ylabel ( ’I ’) ;
50 xlim ([0 1]) ;
51 ylim ([0 1]) ;
52 title ( ’ Global Phase Portrait ’) ;
53 legend show ;
54 grid on ;
• Nullclines: The nullclines of the excitatory and inhibitory populations are plotted,
showing where the derivatives E ′ and I ′ are zero. The range of these curves are
in between 0 and 0.5 because it is only plotted the values where the result of the
nullcline is non-imaginary.
• Equilibria: The fixed points found in Exercise 4 are shown as black circles. These
points are the equilibrium points of the system.
• Eigenvector Lines: For fixed points with real eigenvalues, the lines representing
the eigenvectors are drawn. These lines show the directions of the local phase space
near each equilibrium.
17
• Orbits: The orbits are plotted for the various initial conditions shown before. These
trajectories represent the time evolution of the system starting from different initial
points.
18