You are on page 1of 1

Indian Institute of Technology Indore

Department of Mathematics
Assignment-2
Subject: Nonlinear Dynamics and Computations (MA 407/607)
Max. Marks: 20 Submission date: 27th January, 2023

Instruction Please write the MATLAB code in MATLAB file for the first 3 questions
and share with me. You must also write the code of Q3 on notebook and share with me.
You will be called for a short interaction to explain the code.

Questions

1. Write a matlab code using RK4 method to solve

ẋ = 0.1x − 5y
ẏ = 5x − 0.2y,

where x(0) = 0.1, y(0) = 0.2, t ∈ [0, 20]. Plot (i) x vs t (time series plot), (ii) y
vs t (time series plot), and (iii) y vs x (phase portrait) in three separate figure
windows.
2. Write a matlab code using RK4 method to solve

ẋ = rx − axy,
ẏ = bxy − my,

where x(0) = 1, y(0) = 1, t ∈ [0, 100] with the parameter values r = 1, a = 0.9, b =
0.8, m = 0.4. Plot (i) x vs t (time series plot), (ii) y vs t (time series plot), and
(iii) y vs x (phase portrait) in three separate figure windows.
3. Write a matlab code using RK4 method method to solve

ẋ = y + x(x2 + y 2 − 1),
ẏ = −x + y(x2 + y 2 − 1),

where x(0) = 2, y(0) = 2, t ∈ [0, 100]. Plot (i) t vs x (time series plot), (ii) t vs y
(time series plot), and (iii) x vs y (phase portrait) in three separate figure windows.
4. Repeat the above questions using ode45 inbuilt code in MATLAB

? ? ??

You might also like