5.2.2 The Van der Pol oscillator The Van der Pol oscillator is a nonlinear dynamical system with many applications, e.g., in physics, biology, sociology and economics. It is a non-conservative oscillator with nonlinear damping, modelled by the differential equation x” − µ(1 − x²)x′ + x = 0, where the parameter μ measures the strength of the nonlinear damping. (5.9) (1) Rewrite Equation (5.9) as a system of two first-order ODEs for x and x'. Then, write a Python function vdp(x) which returns the vector f(x), as defined in (5.1), for the Van der Pol system. Here, x must be an array of "shape" [1,2]. (2) Solve the Van der Pol system with µ = 1/2, using your Python functions rk4 and vdp, for t = [0, 30], starting with initial conditions (i) x(0) = x'(0) = 0.1; and (ii) x(0) = −2,x'(0) = 2. (You should fix a suitable step size, h.) Then, plot time series, x(t), of the solutions (i) and (ii) in one figure, and plot phase portraits, (x(t), y(t)), for the two solutions, in another figure. Discuss your results. (3) Solve the Van der Pol system with µ = 5, now using your Python functions euler and vdp, for tЄ [0,30], starting with initial conditions x (0) = x'(0) = 0.1. First, plot a time series and phase portrait of the solution for h = 0.01. Then, do the same computations (using the Euler scheme) and plots for h = 0.08. Discuss you results.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter10: Classes And Data Abstraction
Section: Chapter Questions
Problem 19PE
icon
Related questions
Question
5.2.2 The Van der Pol oscillator
The Van der Pol oscillator is a nonlinear dynamical system with many applications, e.g., in physics,
biology, sociology and economics. It is a non-conservative oscillator with nonlinear damping,
modelled by the differential equation
x” − µ(1 − x²)x′ + x = 0,
where the parameter μ measures the strength of the nonlinear damping.
(5.9)
(1) Rewrite Equation (5.9) as a system of two first-order ODEs for x and x'. Then, write a
Python function vdp(x) which returns the vector f(x), as defined in (5.1), for the Van der
Pol system. Here, x must be an array of "shape" [1,2].
(2) Solve the Van der Pol system with µ = 1/2, using your Python functions rk4 and vdp, for
t = [0, 30], starting with initial conditions (i) x(0) = x'(0) = 0.1; and (ii) x(0) = −2,x'(0) = 2.
(You should fix a suitable step size, h.) Then, plot time series, x(t), of the solutions (i) and
(ii) in one figure, and plot phase portraits, (x(t), y(t)), for the two solutions, in another figure.
Discuss your results.
(3) Solve the Van der Pol system with µ = 5, now using your Python functions euler and vdp,
for tЄ [0,30], starting with initial conditions x (0) = x'(0) = 0.1. First, plot a time series and
phase portrait of the solution for h = 0.01. Then, do the same computations (using the Euler
scheme) and plots for h = 0.08. Discuss you results.
Transcribed Image Text:5.2.2 The Van der Pol oscillator The Van der Pol oscillator is a nonlinear dynamical system with many applications, e.g., in physics, biology, sociology and economics. It is a non-conservative oscillator with nonlinear damping, modelled by the differential equation x” − µ(1 − x²)x′ + x = 0, where the parameter μ measures the strength of the nonlinear damping. (5.9) (1) Rewrite Equation (5.9) as a system of two first-order ODEs for x and x'. Then, write a Python function vdp(x) which returns the vector f(x), as defined in (5.1), for the Van der Pol system. Here, x must be an array of "shape" [1,2]. (2) Solve the Van der Pol system with µ = 1/2, using your Python functions rk4 and vdp, for t = [0, 30], starting with initial conditions (i) x(0) = x'(0) = 0.1; and (ii) x(0) = −2,x'(0) = 2. (You should fix a suitable step size, h.) Then, plot time series, x(t), of the solutions (i) and (ii) in one figure, and plot phase portraits, (x(t), y(t)), for the two solutions, in another figure. Discuss your results. (3) Solve the Van der Pol system with µ = 5, now using your Python functions euler and vdp, for tЄ [0,30], starting with initial conditions x (0) = x'(0) = 0.1. First, plot a time series and phase portrait of the solution for h = 0.01. Then, do the same computations (using the Euler scheme) and plots for h = 0.08. Discuss you results.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr