Dynamical Systems Exercises
Silvia Roy
Question 1:
a) code and the plot:
b) code and the plot
1
In this exercise, the solution of the differential equation is obtained using
its explicit analytical formula, which allows us to compute 𝑥(𝑡) directly without
numerical approximation. This approach is particularly useful here because the
solution has a vertical asymptote, and numerical methods like Euler can become
unstable near the singularity. The code generates a vector of time points
using numpy and evaluates the solution for the initial condition 𝑥(0) = −1. A plot
of 𝑥(𝑡) versus 𝑡 illustrates how the solution evolves over time, showing the blow-
up behavior near the asymptote. For the representative solutions, multiple initial
conditions are used, which clearly demonstrate the behavior of trajectories
relative to the equilibrium points at 𝑥 = 0 and 𝑥 = 1, showing whether solutions
converge to an equilibrium or diverge to infinity.
Question 2:
Solution and the plot:
2
This exercise considers a general quadratic differential equation of the
form 𝑑𝑥/𝑑𝑡 = 𝑎(𝑥 − 𝑏)(𝑥 − 𝑐), which has two equilibrium points at 𝑥 =
𝑏 and 𝑥 = 𝑐. Because deriving an explicit analytical solution can be
cumbersome for arbitrary values of the parameters 𝑎, 𝑏, and 𝑐, the code
instead uses the forward Euler method to numerically approximate the
solution. In this method, the value of 𝑥 is updated incrementally over small
time steps based on the slope defined by the differential equation, providing
a simple yet effective way to visualize the dynamics. By using multiple initial
conditions, the code generates representative trajectories, showing how
solutions evolve over time relative to the equilibrium points. Trajectories that
start between the equilibria typically move toward the stable equilibrium,
while those starting outside the equilibria may diverge, depending on the sign
of 𝑎(𝑥 − 𝑏)(𝑥 − 𝑐). This visualization helps to intuitively understand the
behavior of solutions, including convergence, divergence, and the effect of
parameter choices on the system’s dynamics. Overall, the code offers a clear
demonstration of the qualitative behavior of a quadratic ODE and the stability
of its equilibrium points.
3
Question 3:
Solution and the plot:
4
In this exercise, the code generalizes the approach to any function 𝑓(𝑥) with
known roots. The differential equation is integrated numerically using
the forward Euler method, and multiple initial conditions are chosen to
produce representative trajectories. Horizontal dashed lines indicate the
roots of 𝑓(𝑥), which are the equilibrium points. The direction of the flow is
determined by the sign of 𝑓(𝑥): solutions increase when 𝑓(𝑥) > 0 and
decrease when 𝑓(𝑥) < 0. This allows visualization of the behavior of
solutions in all intervals between equilibria and demonstrates how the
method can be applied to arbitrary nonlinear differential equations to
understand their qualitative dynamics.