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.
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++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section7.5: Case Studies
Problem 15E
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr