HOMEWORK 3: Phase portraits for Mathmatical Models, Analysis and Simulation, Fall 2010 Report due Mon Oct 4, Maximum score 7.0 pts.

Similar documents
Problem set 7 Math 207A, Fall 2011 Solutions

Question: Total. Points:

Math 266: Phase Plane Portrait

Math 1270 Honors ODE I Fall, 2008 Class notes # 14. x 0 = F (x; y) y 0 = G (x; y) u 0 = au + bv = cu + dv

Math 331 Homework Assignment Chapter 7 Page 1 of 9

1 The pendulum equation

154 Chapter 9 Hints, Answers, and Solutions The particular trajectories are highlighted in the phase portraits below.

Math 215/255 Final Exam (Dec 2005)

Lab 5: Nonlinear Systems

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP

Computer lab for MAN460

ODE Homework 1. Due Wed. 19 August 2009; At the beginning of the class

MCE693/793: Analysis and Control of Nonlinear Systems

28. Pendulum phase portrait Draw the phase portrait for the pendulum (supported by an inextensible rod)

Problem set 6 Math 207A, Fall 2011 Solutions. 1. A two-dimensional gradient system has the form

Solutions to Math 53 Math 53 Practice Final

DO NOT DO HOMEWORK UNTIL IT IS ASSIGNED. THE ASSIGNMENTS MAY CHANGE UNTIL ANNOUNCED.

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP

Math 232, Final Test, 20 March 2007

AMS 27L LAB #6 Winter 2009

Solving Linear Systems of ODEs with Matlab

CDS 101/110a: Lecture 2.1 Dynamic Behavior

Physics: spring-mass system, planet motion, pendulum. Biology: ecology problem, neural conduction, epidemics

Lotka-Volterra Models Nizar Ezroura M53

Math 312 Lecture Notes Linear Two-dimensional Systems of Differential Equations

Physics with Matlab and Mathematica Exercise #1 28 Aug 2012

ANSWERS Final Exam Math 250b, Section 2 (Professor J. M. Cushing), 15 May 2008 PART 1

STABILITY. Phase portraits and local stability

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP

CHALMERS, GÖTEBORGS UNIVERSITET. EXAM for DYNAMICAL SYSTEMS. COURSE CODES: TIF 155, FIM770GU, PhD

Lesson 9: Predator-Prey and ode45

Chapter #4 EEE8086-EEE8115. Robust and Adaptive Control Systems

Using web-based Java pplane applet to graph solutions of systems of differential equations

Problem Weight Score Total 100

Chapter 6 Nonlinear Systems and Phenomena. Friday, November 2, 12

2D Plotting with Matlab

tutorial ii: One-parameter bifurcation analysis of equilibria with matcont

LAB 1: MATLAB - Introduction to Programming. Objective:

Nonlinear dynamics & chaos BECS

Prof. Krstic Nonlinear Systems MAE281A Homework set 1 Linearization & phase portrait

Motion II. Goals and Introduction

Lesson 4 Linear Functions and Applications

Final Exam Sample Problems, Math 246, Spring 2018

Lab #2 - Two Degrees-of-Freedom Oscillator

Computers, Lies and the Fishing Season

dy dt = ty, y(0) = 3. (1)

UNIVERSITY OF MANITOBA

3.3. SYSTEMS OF ODES 1. y 0 " 2y" y 0 + 2y = x1. x2 x3. x = y(t) = c 1 e t + c 2 e t + c 3 e 2t. _x = A x + f; x(0) = x 0.

Why are Discrete Maps Sufficient?

Math 2250 Maple Project 2, March Tacoma Narrows. CLASSTIME VERSION A-E, F-K, L-R, S-Z

Extreme Values and Positive/ Negative Definite Matrix Conditions

CDS 101/110a: Lecture 2.1 Dynamic Behavior

EE -213 BASIC CIRCUIT ANALYSIS LAB MANUAL

CHALMERS, GÖTEBORGS UNIVERSITET. EXAM for DYNAMICAL SYSTEMS. COURSE CODES: TIF 155, FIM770GU, PhD

Copyright (c) 2006 Warren Weckesser

Name: MA 226 Exam 2 Show Your Work and JUSTIFY Your Responses. Problem Possible Actual Score TOTAL 100

MathQuest: Differential Equations

Read through A Graphing Checklist for Physics Graduate Students before submitting any plots in this module. See the course website for the link.

Symbolic Solution of higher order equations

Half of Final Exam Name: Practice Problems October 28, 2014

HOMEWORK 4: Numerical solution of PDEs for Mathmatical Models, Analysis and Simulation, Fall 2011 Report due Mon Nov 12, Maximum score 6.0 pts.

Entrance Exam, Differential Equations April, (Solve exactly 6 out of the 8 problems) y + 2y + y cos(x 2 y) = 0, y(0) = 2, y (0) = 4.

Math/Phys/Engr 428, Math 529/Phys 528 Numerical Methods - Summer Homework 3 Due: Tuesday, July 3, 2018

I have read and understood the instructions regarding academic dishonesty:

PH.D. PRELIMINARY EXAMINATION MATHEMATICS

Calculus and Differential Equations II

(Refer Slide Time: 00:32)

APPM 2360: Final Exam 10:30am 1:00pm, May 6, 2015.

Control Systems I. Lecture 4: Diagonalization, Modal Analysis, Intro to Feedback. Readings: Emilio Frazzoli

2 Solving Ordinary Differential Equations Using MATLAB

Lab 2 Worksheet. Problems. Problem 1: Geometry and Linear Equations

MATH 650 : Mathematical Modeling Fall, Written Assignment #3

( ) Chapter 3: Free Vibration of the Breakwater. 3.1 Introduction

MATH 215/255 Solutions to Additional Practice Problems April dy dt

Examples include: (a) the Lorenz system for climate and weather modeling (b) the Hodgkin-Huxley system for neuron modeling

Math 20D: Form B Final Exam Dec.11 (3:00pm-5:50pm), Show all of your work. No credit will be given for unsupported answers.

MAT 22B - Lecture Notes

Math Lecture 46

Old Math 330 Exams. David M. McClendon. Department of Mathematics Ferris State University

DO NOT DO HOMEWORK UNTIL IT IS ASSIGNED. THE ASSIGNMENTS MAY CHANGE UNTIL ANNOUNCED.

Nonconstant Coefficients

1 The relation between a second order linear ode and a system of two rst order linear odes

Graded Project #1. Part 1. Explicit Runge Kutta methods. Goals Differential Equations FMN130 Gustaf Söderlind and Carmen Arévalo

MA 226 FINAL EXAM. Show Your Work. Problem Possible Actual Score

Chapter 4: First-order differential equations. Similarity and Transport Phenomena in Fluid Dynamics Christophe Ancey

dt (0) = C 1 + 3C 2 = 3. x(t) = exp(3t).

A plane autonomous system is a pair of simultaneous first-order differential equations,

18.06 Problem Set 8 Due Wednesday, 23 April 2008 at 4 pm in

Solving systems of ODEs with Matlab

'XNH8QLYHUVLW\ (GPXQG73UDWW-U6FKRRORI(QJLQHHULQJ. EGR 103L Fall Test 2. Michael R. Gustafson II

Eigenvalues and Eigenvectors, More Direction Fields and Systems of ODEs

Problem Weight Total 100

Homework 1 Solutions

MOL 410/510: Introduction to Biological Dynamics Fall 2012 Problem Set #4, Nonlinear Dynamical Systems (due 10/19/2012) 6 MUST DO Questions, 1

Homework 6 MA/CS 375, Fall 2005 Due December 15

AA 242B / ME 242B: Mechanical Vibrations (Spring 2016)

APPLICATIONS OF FD APPROXIMATIONS FOR SOLVING ORDINARY DIFFERENTIAL EQUATIONS

Chapter 1, Section 1.2, Example 9 (page 13) and Exercise 29 (page 15). Use the Uniqueness Tool. Select the option ẋ = x

Lab Project 4a MATLAB Model of Oscillatory Flow

Math Assignment 5

Transcription:

HOMEWORK 3: Phase portraits for Mathmatical Models, Analysis and Simulation, Fall 2010 Report due Mon Oct 4, 2010. Maximum score 7.0 pts. Three problems are to be solved in this homework assignment. The first consists in scaling of a homogeneous and a nonhonogeneous differential equation. The second is a study of a dynamical system with a simple bifurcation, and the third problem deals with predator-prey models. Hints for plotting phase-planes with Matlab are enclosed. Problem 1 (1.0 p) The differential equation for damped free oscillations is a second order homogeneous linear equation. It can be written in the following form: m d2 u 2 + cdu + ku = 0. Here the state variable u is the deviation from a stationary position and t is the time. The equation contains three parameters, i.e. the mass m, the damping constant c, and the spring constant k. We first introduce a dimensionless time τ by scaling of the original time variable t. After this is done, we derive a differential equation for u(τ) from the equation above for u(t). One of the results is that the equation for nondimensionalized variables will often contain fewer parameters than the original equation. This fact will simplify the formal mathematical treatment of the problem, and it will also lead to improved insight about both the problem and its solution. We reparametrize by introducing two parameters as follows: The undamped (angular) frequency ω 0 is defined by ω 0 = k/m and the critical damping c 0 is defined by c 0 = 2 km. Note that these new parameters are not dimensionless. We use them to define the dimensionless damping constant α = c/c 0 and the dimensionless time τ = ω 0 t. Your first task is to derive the differential equation for u(τ) and to show that it equals u + 2αu + u = 0. Observe that the scaling of the time has reduced the number of parameters from three to one. With forced oscillations we study the differential equation m d2 u 2 + cdu + ku = F cos ωt.

Here there are two additional parameters, the amplitude F and the (angular) frequency ω of the external force. It is easy to nondimensionalize the driving frequency ω since we already have introduced the reference frequency ω 0. Thus we introduce a dimensionless driving frequency β. Furthermore we introduce a dimensionless state variable y by proper choice of scale factor (this should contain F, of course). Your second task is to derive a differential equation for y(t). In this case the scaling of both the dependent and the independent variables has reduced the number of parameters from five to two: α and β. Problem 2 (3.0 p) Consider the following linear system of differential equations: where P is a real-valued parameter. [ u 1 1 = P 1 (1.5) a) Determine the type of phase portrait as a function of P. (There are five different types.) Determine the slopes of the named manifolds (in those cases where they exist) as a function of P. (1.5) b) Determine the limit of u(t) and of y(t)/x(t) (with u(t) = (x(t), y(t)) T )) as t in all five cases. Note that the result may depend on the initial point u(0) and on the value of P. Determine the bifurcation value P 0 of P where stability is lost and describe the type of phase portrait on either side of it. ] u, Problem 3 (3.0 p) (0.5) a) Consider the two-species models of the form, dx = a(x, y)x, dy = b(x, y)y, where x and y denote the populations of two species, and a and b denote the corresponding growth rates. Assume that a and b are smooth functions. We are now interested in a predator-prey model, where y denotes the predator and x denotes the prey population, which have the following (meaningful) assumptions: (i) If there is not enough prey, the predator population declines. 2

(ii) An increase in the prey population increases the growth rate of the predator. (iii) If no predators are present, a small prey population will increase. (iv) If the prey population goes beyond a certain size, it must decrease. (v) If the predator population increases, the growth rate of the prey population declines. Express the assumptions (i) (v) in terms of a, b, x and y. Verify that the simple model with a(x, y) = α βy λx and b(x, y) = δx γ µy (α, β, γ, δ, λ, µ > 0) satisfy (i) (v). (2.5) b) Consider the predator-prey model of a), x = (α βy λx)x, y = (δx γ µy)y, where α, β, γ, δ, λ, µ are positive constants. Show that x(t), y(t) > 0 for t > 0 if x(0), y(0) > 0. Determine the critical points of this system! To reduce the number of parameters, introduce the scaling, τ = ct, u = dx and v = ey. Choose the scalings to make the transformed equations have three parameters which are combinations of the original ones, such that u = (1 v Au)u, v = (u C Bv)v. What is the condition on A,B, and C that there be a strictly positive critical point? Consider two sets of parameters, 1. A = 1,C = 1/2,B = 1 2. A = 1,C = 1/2,B = 8. Characterize the stability of the strictly positive critical point in both cases. Hand in plots of the phase portrait of the linearized equations and original equations around one of these critical points which shows the difference between the solution of the linearized and non-linearized equations. 3

How to plot phase portraits with Matlab. There are some orbits in phase portraits that are more important, and carry more information, than others. Among the most important are the orbits on the socalled named manifolds. The term named manifolds is used to refer to the slow and fast manifolds of nodes and the stable and unstable manifolds of saddle points. We require of any plot of phase portraits that it includes orbits on all named manifolds. We show by treating a concrete example how you can use Matlab to plot the phase portrait of a linear system in the plane. The system of equations is written u = AA*u, where AA is a given 2 2-matrix and u is a column vector. The matrix is denoted in Matlab with two letters instead of one since it will be a so-called global variable, and it is customary in Matlab to denote global variables with long names with capital letters. The first step is to write an m-file that computes the left-hand side of the system of equations when the righthand side is known. Let the name of the file be e.g. lin.m. The file may look like follows: % lin.m Linear diff eq system in two variables. function uprim = lin(t,u) global AA uprim = AA*u; The variable AA is global. It is declared global both in this mfile and in the main program. Its value is set in the main program. After you have saved this file, move to the main Matlab window and give the following commands: >> global AA >> AA = [-1 1;1-3]; >> tspan = [0 5]; >> Va = [-1 1-1 1]; axis(va), axis equal, hold on, grid The second line sets the value AA. If you wish to work with another system you just feed in a new matrix AA. The third line above sets the time span from initial value t0 = 0 to final value tf = 5 - of the independent variable t. If you later wish to run backwards in time, then all you have to do is to set tspan = [0,-5], that means t < 0. The command axis(va) in the fourth line defines a window in the x-y-plane, whose corners are determined by Va = [xmin xmax ymin ymax]. axis equal sets equal units in both x- and y-directions. The command hold on allows you to plot several curves in the same figure without removing earlier plots. The command grid, finally, plots a grid in the plane. The main tool for plotting phase portraits is Matlabs command ode23 or ode45. We start plotting one orbit of the phase portrait by giving the following commands: >> u0 = [1;1]; >> [t,u] = ode23(@lin,tspan,u0); plot(u(:,1),u(:,2)) 4

The initial point is denoted u0. The semicolon makes it a column vector. The second line contains the main command line. It will be used repeatedly in the sequel. Its first command asks Matlab to solve the system of equations in lin.m with the initial value u(t0) = u0. The solution is given in the form of a column vector of t-values in the interval from t0 to tf, and a matrix of corresponding values of u. The number of t-values, and their spacing, is determined by the program. It is used here with default values for tolerances etc. Read the help-file on ode23 (and ode45) to find out what they are and how to change them! You can check the number of steps the program has taken by giving the command size(t). The matrix of u-values has two columns. The first one contains a vector of values of x, and the second one contains a column of values of y. Check with size(u). The second command on the main command line plots the orbit. Here, u(:,1) and u(:,2) denote the first and second columns of the matrix u. When you wish to plot one more orbit, then you give a new initial point u0, after which you repeat the main command line. You do not have to retype any commands; the old ones can be recalled with the arrow-up key. Choose seven additional initial points uniformly distributed on the circumference of the window determined by Va. You might want to experiment with a loop like this 1. n = 7; st = exp(i*2*pi*(1:n)/n); for s = st u0 = [real(s);imag(s)]; [t,u] = ode23(@lin,tspan,u0); plot(u(:,1),u(:,2)); end The phase portrait that you have produced so far shows eight orbits that all approach the origin with the same slope. This behavior is typical of the stable node. To complete the phase portrait you need to plot the orbits on the slow and fast manifolds. You find the orbits on the slow manifold by choosing initial points sufficiently far away from the origin. I suggest that you try u0 = [10;10] and then u0 = -u0. The orbits on the fast manifold are found in a different way. One way would be to experiment with a large number of initial points on the circumference of the window until you find one that gives you one of the orbits. An alternative is to start near the origin and run backwards in time. The initial point should then be chosen in a direction from the origin determined by the slope of the fast manifold. 1 A more advanced possibility consists of using Matlab script files 5

To determine the initial point, we need to determine eigenvalues and eigenvectors of the matrix AA: >> [V,D] = eig(aa) The matrix V contains two eigenvectors as columns, and the matrix D has the corresponding eigenvalues on its diagonal. The slopes of the two eigenvectors, sls and slf, are determined with the following commands. The last letter in the slope designation is s for the slow manifold and f for the fast one. >> v1 = V(:,1); sls = v1(2)/v1(1) >> v2 = V(:,2); slf = v2(2)/v2(1) Change the numbering if the slow manifold eigenvector is the second column of V! To plot an orbit on the fast manifold we choose an initial point whose coordinates are determined by the fast manifold. In addition we run time backwards: >> u0 = 0.02*v2; tspan = [0,-5]; After this we execute the main command line. You get the other orbit on the same manifold by changing the sign of u0 and then executing the main command line. When the phase portrait is finished and you are satisfied with its esthetic appearance, you may wish to equip it with a title. You can for example write as follows, replacing my name with yours: >> title(phase portrait by my name) >> xlabel(x), ylabel(y) Finish off by giving the command print: >> print -deps figure.eps Even simpler, you may use the menu of the figure window (Export). Get your copy at the printer, and equip the orbits with arrows that show the directions they are traversed as time increases. Let us plot one more phase portrait. The window is erased with the command clf (clear figure). To prepare for a new phase portrait and reset the direction of the time axis to normal you give the following command: >> clf, axis(va), axis equal, hold on, grid, tspan = [0,5]; Feed in a new matrix as follows: >> AA = [-1 4;4-3]; Now plot the orbits for a number of initial points on the boundary of the window determined by Va. The orbits indicate that you are dealing with a saddle point. Use the command eig to determine eigenvalues and eigenvectors of the matrix AA. Determine the slopes sls and slu of the stable and unstable manifolds from the stable and unstable eigenvectors vs viz. vu. Use initial points u0 = 0.02*v and u0 = -u0, where v is replaced by vs and vu. Let time run forward to get the unstable manifold and backward to get the stable one. It should be noted that the rules that we have followed for plotting orbits on 6

the named manifolds could be somewhat simplified if we are only concerned with linear systems. Our rules have the virtue that they can also be used when we are dealing with nonlinear systems. We summarize the rules for plotting orbits on the named manifolds of stable nodes and of saddle points that have been used above: - The orbits on the slow manifold of a stable node are plotted with initial points far away from the critical point, and with time running forward. - All other orbits are plotted with initial points close to the critical point. The initial point is chosen on a straight line through the critical point whose slope is given by the corresponding eigenvector. - The orbits on the unstable manifold of the saddle point are plotted with time running forward. - The orbits on both the stable manifold of the saddle point and on the fast manifold of the stable node are plotted with time running backward. - An unstable node is transformed into a stable one by letting time run backward. A note on using ode45: The initial value solver ode45 has a much higher order than ode23. On one hand, this is nice: the computation time is much lower than with ode23. On the other hand, the number of steps taken (e.g., size(t)) is much lower such that the phase plot may become a polygon with visible corners. The latter can be avoided by using an alternative main command line: >> sol = ode45(@lin,tspan,u0); >> t = linspace(tspan(1),tspan(end),101); >> u = deval(sol,t); >> plot(u(1,:),u(2,:)) % Note the transposition of u! For details please consult Matlabs documentation. 7