%Rosemond Boateng Extra Credit. %problem 5 on 9.4. syms x y. sys1 = x*(1- x - y); sys2 = y*(1.5 - y - x); [xc, yc] = solve(sys1, sys2, x, y);

Similar documents
-LOWELL WEEI^LY JOURNAL.

Exploring the scalability of RPC with oslo.messaging

Master Class: Large Scale Data Analysis and Visualization Daniel Armyr Application Engineer

Matlab Notes for Mathematical Modeling. Lia Vas

and A L T ( ) SOLO "It means a lot to the iner-i IS FOR FARM H O M E S v ^ r. ' 0 Iak, "" h i s ruujie which was begun in July of last ) a i,, Mr

Matlab Notes for Calculus 3. Lia Vas

A Logistics Model Group Activity 8 STEM Project Week #11. Plot the data on the grid below. Be sure to label the x and y axis and label the window.

Transformations. Write three rules based on what you figured out above: To reflect across the y-axis. (x,y) To reflect across y=x.

8.6. Write and Graph Exponential Decay Functions. Warm Up Lesson Presentation Lesson Quiz

COGS 119/219 MATLAB for Experimental Research. Fall 2016 Week 1 Built-in array functions, Data types.m files, begin Flow Control

Programa Diploma BI. Funciones Given that f(x) = 2e 3x, find the inverse function f 1 (x). Working: Answers:

Building Geometries in Data Arrays

Math 1206 Calculus Sec. 5.6: Substitution and Area Between Curves (Part 2) Overview of Area Between Two Curves

Table of Contents. DS170 LUXEON CoB with FreshFocus Technology Product Datasheet Lumileds Holding B.V. All rights reserved.

Image and Multidimensional Signal Processing

Multi-Objective Optimization for Fibrous Composite Reinforced by Curvilinear Fibers

X 1 = = 1 2, X 2 = = 1 4.

Homework for CS 594. Wasp Nest Building and Discrete Stigmergy. Adaptive Function of Nests. Structure of Some Wasp Nests

the drawcurve() function code comments aimed at helping you in writing the code for the TODOs defined later.

Topic 2b Building Geometries into Data Arrays

2. Solve for x when x < 22. Write your answer in interval notation. 3. Find the distance between the points ( 1, 5) and (4, 3).

Graphing Calculator Graphing with the TI-89

Assignment #3: Scalar Field Visualization 3D: Cutting Plane, Wireframe Iso-surfacing, and Direct Volume Rendering

The Context of Forest Management & Economics, Modeling Fundamentals. Lecture 1 (03/27/2017)

An Exploration of Food Webs using Graph Theory

Advanced Microeconomics

Omit Present Value on pages ; Example 7.

Programming for Experimental Research. Flow Control

1) Find. a) b) c) d) e) 2) The function g is defined by the formula. Find the slope of the tangent line at x = 1. a) b) c) e) 3) Find.

LOWELL WEEKLY JOURNAL

Game Engineering: 2D

Introduction to MATLAB Programming

9.1 Solutions, Slope Fields, and Euler s Method

Descriptive Statistics and Graphing

Simple idea 1: load-time linking. Our main questions. Some terminology. Simple idea 2: base + bound register. Protection mechanics.

FUNCTIONS AND MODELS

the remaiis c p i j fi r a lent'tli of time, can havetspeclii and case any affi :er shall refuse" or neglect <to «J3,b.01Jllis p. m.

Chapter 15: Functions of Several Variables

Section 4.3. Graphing Exponential Functions

Assignment #2: 2D Vector Field Topological Analysis: Compute Differential Topology and Geometric-based Morse Decomposition

Gradebook - Grades Tab Create Assignment

CHAPTER 5: Exponential and Logarithmic Functions

Basic MATLAB. Getting MATLAB (for MIT students) Creating matrices and vectors. Some operation of matrices/vectors.

WEBSITE TELEPHONE CASE STUDY CLIENT WILD EARTH SERVICE SEO WEBSITE

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

Agents That Move. NetLogo Guide 2. Turtles - Breeds. John Hayward Church Growth Modelling

18, Agiou Thoma Str 19004, Spata Athens, GR t f e.

CS 4349 Lecture October 18th, 2017

Homework Project #6. Math 365, Spring Due Wednesday April 27th

CHAPTER-5 APPLICATION OF SYMBIOTIC ORGANISMS SEARCH ALGORITHM

LUXEON Hot-color targeted industry standard package for uniform light ILLUMINATION

Uniform, high efficacy and easy to design array

MatrixGreen: Landscape Ecological Network Analysis Tool User manual

Step-by-step guide. How to become an FSC certified smallholder

Fair Entry Help. Helpful Information: Junior Fair Entries. This booklet will help you as you begin making entries.

Further abstraction techniques

B. Examples Set up the integral(s) needed to find the area of the region bounded by

Selecting the Right Model Studio - Excel 2007 Version

Microscopic Measurement

Interactive Computer Graphics. Hearn & Baker, chapter D transforms Hearn & Baker, chapter 5. Aliasing and Anti-Aliasing

Uniform, high efficacy and easy to design array

Edge Datacenter Placement BY ABHISHEK GUPTA FRIDAY GROUP MEETING JUNE 10, 2016

Section 2.3 (e-book 4.1 & 4.2) Rational Functions

x y

15.2. Volumes of revolution. Introduction. Prerequisites. Learning Outcomes. Learning Style

Types of Functions Here are six common types of functions and examples of each. Linear Quadratic Absolute Value Square Root Exponential Reciprocal

Discover the all-flash storage company for the on-demand world

City Growth Model Simulation VIGRE Spring 2012 Bowen Huang Faculty Advisor: David Aldous

MATH 2221A Mathematics Laboratory II

CMSC427 Final Practice v2 Fall 2017

Chapter 7 Fuzzy Logic Controller

Cellular and Satellite: together to serve a fast growing market

Package zeallot. R topics documented: September 28, Type Package

Further abstraction techniques

5 Things to Know About Certification

Become a Certified Reverse Mortgage Professional

DD2423 Image Analysis and Computer Vision IMAGE FORMATION. Computational Vision and Active Perception School of Computer Science and Communication

MISSOURI FBLA-PBL BLUE PANDA REGISTRATION SYSTEM SERVICE. EDUCATION. PROGRESS.

CATIA Electrical Space Reservation TABLE OF CONTENTS

RULES FOR BIOLOGICALLY INSPIRED ADAPTIVE NETWORK DESIGN WILL KNEZ CS 523 APRIL 5TH

Creating and Incorporating Dynamic Applets for Differential Equations the Easy Way

Exam 2 Preparation Math 2080 (Spring 2011) Exam 2: Thursday, May 12.

GRAPHING POLYNOMIALS DAY 2 U N I T 1 1

Sci.Int.(Lahore),28(1), ,2016 ISSN ; CODEN: SINTE 8 201

NOT RECOMMENDED FOR NEW DESIGNS

THERMAL TESTING OF A 3D PRINTED SUPER DENSE MESH HEATSINK AGAINST STATE-OF- THE-ART FINNED GEOMETRY

Name Student Activity

3.1. Exponential Functions. Copyright 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Objectives. Materials

Test 2 Version A. On my honor, I have neither given nor received inappropriate or unauthorized information at any time before or during this test.

Problem description. Bolt. Upper bracket. Lower bracket. Nut. A bracket assemblage is shown below in an exploded view:

Comprehensive Practice Handout MATH 1325 entire semester

RESEARCH SUMMARY. Yano Research Institute June 9, Research Outline. Key Findings Honcho, Nakano-ku, Tokyo , Japan

Managing Costs in Growing Networks with SEGway STPs and Point Code Emulation

List of scenarios discussed in this book About the companion website

System Performance Measures:

HW 10 STAT 472, Spring 2018

A BRIEF INTRODUCTION TO MATLAB Fotios Kasolis Introduction

4 PRODUCERS REGISTRATION USER GUIDE

4. Write sets of directions for how to check for direct variation. How to check for direct variation by analyzing the graph :

Transcription:

%Rosemond Boateng Extra Credit %problem 5 on 9.4 syms x y sys1 = x*(1- x - y); sys2 = y*(1.5 - y - x); [xc, yc] = solve(sys1, sys2, x, y); disp ('Critical Points:'); disp ([xc yc]) warning off all f1 = @ (t, x) [x(1)* (1 - x(1) - x(2)); x(2)* (1.5 - x(2) - x(1))]; figure; hold on for a = -5: 0.5:2.5 for b = 0.25: 0.25:2.5 [t, xa] = ode45(f1, [0 10], [a b]); [t, xa] = ode45(f1, [0-10], [a b]); title 'Problem 5' axis ([0 2 0 2]) [X Y] = meshgrid (0:0.25:2, 0:0.25:2); F1 = X.*(1- X - Y); F2 = Y.*(1.5 - Y - X);

L= sqrt((f1/3).^2 + (F2/6).^2); quiver(x, Y, F1./L, F2./L, 0.5); hold off % The critical points are: % (0,0) is a nodal source. % (0, 1.5) is a nodal sink % (1,0) is a saddle point. % This is a rabbit-squirrel competition relationship. Nither species likes % seeing the other species nor themselves because they are competing for % the same food supply. At (0,0), the population of both species is % increasing and approaching (1.5,0). If either species gets above the line % y= -1.5*x +1.5, the population of both species will decrease, then try to % increase and approach (1.5,0). Critical Points: [ 0, 0] [ 0, 3/2] [ 1, 0]

problem 6 syms x y sys1 = x*(1- x + 0.5*y); sys2 = y*(2.5-1.5*y + 0.25*x); [xc, yc] = solve(sys1, sys2, x, y); disp ('Critical Points:'); disp ([xc yc]) warning off all f2 = @ (t, x) [x(1)* (1 - x(1) + 0.5*x(2)); x(2)* (2.5-1.5*x(2) + 0.25*x(1))]; figure; hold on

for a = 0.25: 0.75:2.5 for b = 0.25: 0.25:2.5 [t, xa] = ode45(f2, [0 10], [a b]); [t, xa] = ode45(f2, [0-10], [a b]); title 'Problem 6' axis ([0 4 0 4]) [X Y] = meshgrid (0:0.25:4, 0:0.25:4); F1 = X.*(1- X + 0.5.*Y); F2 = Y.*(2.5-1.5.*Y + 0.25.*X); L= sqrt((f1/3).^2 + (F2/6).^2); quiver(x, Y, F1./L, F2./L, 0.5); hold off % (0,0) is a nodal source. % (0,5/3) is a saddle % (1,0) is a also a saddle % (2,2) is a nodal sink Critical Points: [ 0, 0] [ 0, 5/3]

[ 1, 0] [ 2, 2] combining prob 5 and 6 with alpha =c=0 warning off all c = 0 syms x y sys1 = (((1-c)*(x*(1 - x - y)))+ ((c)*(x*(1 - x + 0.5*y)))); sys2 = (((1-c)*(y*(1.5 - y - x)))+((c)*(y*(2.5-1.5*y + 0.25*x)))); [xc, yc] = solve(sys1, sys2, x, y); disp ('Critical Points:'); disp ([xc yc])

f1 = @ (t, x) [x(1)* (1 - x(1) - x(2)); x(2)* (1.5 - x(2) - x(1))]; f2 = @ (t, x) [x(1)* (1 - x(1) + 0.5*x(2)); x(2)* (2.5-1.5*x(2) + 0.25*x(1))]; f3 = @ (t, x) [(((1-c)*(x(1)* (1 - x(1) - x(2))))+ (c*(x(1)* (1 - x(1) + 0.5*x(2))))); (((1-c)*(x(2)* (1.5 - x(2) - x(1))))+((c)*(x(2)* (2.5-1.5*x(2) + 0.25*x(1)))))]; figure; hold on for a = -5: 0.5:2.5 for b = 0.25: 0.25:2.5 [t, xa] = ode45(f3, [0 10], [a b]); [t, xa] = ode45(f3, [0-10], [a b]); title 'Problem 5 and 6 with c= 0' axis ([0 2 0 2]) [X Y] = meshgrid (0:0.25:2, 0:0.25:2); F1 = (((1-c).*(X.* (1 - X - Y)))+ ((c).*(x.* (1 - X + 0.5.*Y)))); F2 = (((1-c).*(Y.* (1.5 - Y - X)))+((c).*(Y.* (2.5-1.5.*Y + 0.25.*X)))); L= sqrt((f1/3).^2 + (F2/6).^2); quiver(x, Y, F1./L, F2./L, 0.5); hold off % The critical points are:

% (0,0) is a nodal source. % (0, 1.5) is a nodal sink % (1,0) is a saddle point. % This is a rabbit-squirrel competition relationship. Nither species likes % seeing the other species nor themselves because they are competing for % the same food supply. At (0,0), the population of both species is % increasing and approaching (1.5,0). If either species gets above the line % y= -1.5*x +1.5, the population of both species will decrease, then try to % increase and approach (1.5,0). c = 0 Critical Points: [ 0, 0] [ 0, 3/2] [ 1, 0]

combining prob 5 and 6 with alpha =c=1/6 warning off all c = 1/6 syms x y sys1 = (((1-c)*(x*(1 - x - y)))+ ((c)*(x*(1 - x + 0.5*y)))); sys2 = (((1-c)*(y*(1.5 - y - x)))+((c)*(y*(2.5-1.5*y + 0.25*x)))); [xc, yc] = solve(sys1, sys2, x, y); disp ('Critical Points:'); disp ([xc yc]) f1 = @ (t, x) [x(1)* (1 - x(1) - x(2)); x(2)* (1.5 - x(2) - x(1))];

f2 = @ (t, x) [x(1)* (1 - x(1) + 0.5*x(2)); x(2)* (2.5-1.5*x(2) + 0.25*x(1))]; f3 = @ (t, x) [(((1-c)*(x(1)* (1 - x(1) - x(2))))+ (c*(x(1)* (1 - x(1) + 0.5*x(2))))); (((1-c)*(x(2)* (1.5 - x(2) - x(1))))+((c)*(x(2)* (2.5-1.5*x(2) + 0.25*x(1)))))]; figure; hold on for a = -0.25: 0.75:2 for b = -0.25: 0.25:2 [t, xa] = ode45(f3, [-5 10], [a b]); [t, xa] = ode45(f3, [-5-10], [a b]); title 'Problem 5 and 6 with c= 1/6' axis ([-0.5 2 0 2]) [X Y] = meshgrid (-0.5:0.25:2, 0:0.25:2); F1 = (((1-c).*(X.* (1 - X - Y)))+ ((c).*(x.* (1 - X + 0.5.*Y)))); F2 = (((1-c).*(Y.* (1.5 - Y - X)))+((c).*(Y.* (2.5-1.5.*Y + 0.25.*X)))); L= sqrt((f1/3).^2 + (F2/6).^2); quiver(x, Y, F1./L, F2./L, 0.5); hold off % The critical points are: % (0,0) is a nodal source. % (0, 20/13) is a nodal sink

% (1,0) is a also a saddle % (-16/47,84/47) is also saddle % It's still a rabbit-squirrel competition relationship but both species % increase from (0,0) until they get close to the curve going from 1.54 to % approximately 1, then they approach the point (0, 1.54). One of the % species has started to evolve causing the line when c=0 to change into a % curve. c = 0.1667 Critical Points: [ 0, 0] [ 0, 20/13] [ 1, 0] [ -16/47, 84/47]

combining prob 5 and 6 with alpha =c=1/3 warning off all c = 1/3 syms x y sys1 = (((1-c)*(x*(1 - x - y)))+ ((c)*(x*(1 - x + 0.5*y)))); sys2 = (((1-c)*(y*(1.5 - y - x)))+((c)*(y*(2.5-1.5*y + 0.25*x)))); [xc, yc] = solve(sys1, sys2, x, y); disp ('Critical Points:'); disp ([xc yc]) f1 = @ (t, x) [x(1)* (1 - x(1) - x(2)); x(2)* (1.5 - x(2) - x(1))];

f2 = @ (t, x) [x(1)* (1 - x(1) + 0.5*x(2)); x(2)* (2.5-1.5*x(2) + 0.25*x(1))]; f3 = @ (t, x) [(((1-c)*(x(1)* (1 - x(1) - x(2))))+ (c*(x(1)* (1 - x(1) + 0.5*x(2))))); (((1-c)*(x(2)* (1.5 - x(2) - x(1))))+((c)*(x(2)* (2.5-1.5*x(2) + 0.25*x(1)))))]; figure; hold on for a = 0.25: 0.75:2.5 for b = 0.25: 0.25:3 [t, xa] = ode45(f3, [0 10], [a b]); [t, xa] = ode45(f3, [0-10], [a b]); title 'Problem 5 and 6 with c= 1/3' axis ([0 2 0 2]) [X Y] = meshgrid (0:0.1:2, 0:0.25:2); F1 = (((1-c).*(X.* (1 - X - Y)))+ ((c).*(x.* (1 - X + 0.5.*Y)))); F2 = (((1-c).*(Y.* (1.5 - Y - X)))+((c).*(Y.* (2.5-1.5.*Y + 0.25.*X)))); L= sqrt((f1/3).^2 + (F2/6).^2); quiver(x, Y, F1./L, F2./L, 0.5); hold off % The critical points are: % (0,0) is a nodal source % (0,11/7) is a saddle

% (1,0) is a also a saddle % (2/7, 10/7) is a nodal sink % It's still a rabbit-squirrel competition relationship. One of the species % has evolved some more causing the curve to widen at the base. Both % species increase from (0,0) and approach (2/7, 10/7). If any of the % species get above the curve, their population will decrease then increase % and approach (2/7, 10/7). c = 0.3333 Critical Points: [ 0, 0] [ 0, 11/7] [ 1, 0] [ 2/7, 10/7]

combining prob 5 and 6 with alpha =c=1/2 warning off all c = 1/2 syms x y sys1 = (((1-c)*(x*(1 - x - y)))+ ((c)*(x*(1 - x + 0.5*y)))); sys2 = (((1-c)*(y*(1.5 - y - x)))+((c)*(y*(2.5-1.5*y + 0.25*x)))); [xc, yc] = solve(sys1, sys2, x, y); disp ('Critical Points:'); disp ([xc yc]) f1 = @ (t, x) [x(1)* (1 - x(1) - x(2)); x(2)* (1.5 - x(2) - x(1))];

f2 = @ (t, x) [x(1)* (1 - x(1) + 0.5*x(2)); x(2)* (2.5-1.5*x(2) + 0.25*x(1))]; f3 = @ (t, x) [(((1-c)*(x(1)* (1 - x(1) - x(2))))+ (c*(x(1)* (1 - x(1) + 0.5*x(2))))); (((1-c)*(x(2)* (1.5 - x(2) - x(1))))+((c)*(x(2)* (2.5-1.5*x(2) + 0.25*x(1)))))]; figure; hold on for a = 0.25: 0.75:3 for b = 0.25: 0.25:3 [t, xa] = ode45(f3, [0 10], [a b]); [t, xa] = ode45(f3, [0-10], [a b]); title 'Problem 5 and 6 with c= 1/2' axis ([0 2 0 2]) [X Y] = meshgrid (0:0.2:2, 0:0.25:2); F1 = (((1-c).*(X.* (1 - X - Y)))+ ((c).*(x.* (1 - X + 0.5.*Y)))); F2 = (((1-c).*(Y.* (1.5 - Y - X)))+((c).*(Y.* (2.5-1.5.*Y + 0.25.*X)))); L= sqrt((f1/3).^2 + (F2/6).^2); quiver(x, Y, F1./L, F2./L, 0.5); hold off % The critical points are: % (0,0) is a nodal source. % (0, 8/5) is a saddle

% (1,0) is a also a saddle % (24/37, 52/37) is a nodal sink % One of the species has evolved more than the other one causing the curve % from c= 1/3 to widen more at the base. The more evolved species increases % from (0,0)at a faster rate but their growth is limited because they % eventually approach (24/37, 52/37) just like the other species. c = 0.5000 Critical Points: [ 0, 0] [ 0, 8/5] [ 1, 0] [ 24/37, 52/37]

combining prob 5 and 6 with alpha =c=4/6 warning off all c= 4/6 syms x y sys1 = (((1-c)*(x*(1 - x - y)))+ ((c)*(x*(1 - x + 0.5*y)))); sys2 = (((1-c)*(y*(1.5 - y - x)))+((c)*(y*(2.5-1.5*y + 0.25*x)))); [xc, yc] = solve(sys1, sys2, x, y); disp ('Critical Points:'); disp ([xc yc]) f1 = @ (t, x) [x(1)* (1 - x(1) - x(2)); x(2)* (1.5 - x(2) - x(1))];

f2 = @ (t, x) [x(1)* (1 - x(1) + 0.5*x(2)); x(2)* (2.5-1.5*x(2) + 0.25*x(1))]; f3 = @ (t, x) [(((1-c)*(x(1)* (1 - x(1) - x(2))))+ (c*(x(1)* (1 - x(1) + 0.5*x(2))))); (((1-c)*(x(2)* (1.5 - x(2) - x(1))))+((c)*(x(2)* (2.5-1.5*x(2) + 0.25*x(1)))))]; figure; hold on for a = 0.25: 0.75:3 for b = 0.25: 0.25:3 [t, xa] = ode45(f3, [0 10], [a b]); [t, xa] = ode45(f3, [0-10], [a b]); title 'Problem 5 and 6 with c= 4/6' axis ([0 2 0 2]) [X Y] = meshgrid (0:0.2:2, 0:0.25:2); F1 = (((1-c).*(X.* (1 - X - Y)))+ ((c).*(x.* (1 - X + 0.5.*Y)))); F2 = (((1-c).*(Y.* (1.5 - Y - X)))+((c).*(Y.* (2.5-1.5.*Y + 0.25.*X)))); L= sqrt((f1/3).^2 + (F2/6).^2); quiver(x, Y, F1./L, F2./L, 0.5); hold off % The critical points are: % (0,0) is a nodal source. % (0,13/8) is a saddle

% (1,0) is a also a saddle % (1,1.5) is a nodal sink % Both species have evolevd a lot. They are getting close to a mutually % benefiting relationship. They increase from (0,0) and approach (1,1.5). % Both species also cannot keep increasing if they increase too much they % decrease and approach (1, 1.5) c = 0.6667 Critical Points: [ 0, 0] [ 0, 13/8] [ 1, 0] [ 1, 3/2]

combining prob 5 and 6 with alpha =c=5/6 warning off all c = 5/6 syms x y sys1 = (((1-c)*(x*(1 - x - y)))+ ((c)*(x*(1 - x + 0.5*y)))); sys2 = (((1-c)*(y*(1.5 - y - x)))+((c)*(y*(2.5-1.5*y + 0.25*x)))); [xc, yc] = solve(sys1, sys2, x, y); disp ('Critical Points:'); disp ([xc yc]) f1 = @ (t, x) [x(1)* (1 - x(1) - x(2)); x(2)* (1.5 - x(2) - x(1))];

f2 = @ (t, x) [x(1)* (1 - x(1) + 0.5*x(2)); x(2)* (2.5-1.5*x(2) + 0.25*x(1))]; f3 = @ (t, x) [(((1-c)*(x(1)* (1 - x(1) - x(2))))+ (c*(x(1)* (1 - x(1) + 0.5*x(2))))); (((1-c)*(x(2)* (1.5 - x(2) - x(1))))+((c)*(x(2)* (2.5-1.5*x(2) + 0.25*x(1)))))]; figure; hold on for a = 0.25: 0.75:3 for b = 0.25: 0.25:3 [t, xa] = ode45(f3, [0 10], [a b]); [t, xa] = ode45(f3, [0-10], [a b]); title 'Problem 5 and 6 with c= 5/6' axis ([0 2.5 0 2.5]) [X Y] = meshgrid (0:0.25:2.5, 0:0.5:2.5); F1 = (((1-c).*(X.* (1 - X - Y)))+ ((c).*(x.* (1 - X + 0.5.*Y)))); F2 = (((1-c).*(Y.* (1.5 - Y - X)))+((c).*(Y.* (2.5-1.5.*Y + 0.25.*X)))); L= sqrt((f1/3).^2 + (F2/6).^2); quiver(x, Y, F1./L, F2./L, 0.5); hold off % The critical points are: % (0,0) is a nodal source. % (0, 28/17) is a saddle

% (1,0) is a also a saddle % (64/45, 76/45) is a nodal sink % The relationship is evolving into a mutually benefiting one. They both % increase from (0,0).Both species have evolved to a point of almost % tollerating one another without competing for resources. However, they % always grow or decrease to approach (64/45, 76/45). c = 0.8333 Critical Points: [ 0, 0] [ 0, 28/17] [ 1, 0] [ 64/45, 76/45]

combining prob 5 and 6 with alpha =c= 1 warning off all c = 1 syms x y sys1 = (((1-c)*(x*(1 - x - y)))+ ((c)*(x*(1 - x + 0.5*y)))); sys2 = (((1-c)*(y*(1.5 - y - x)))+((c)*(y*(2.5-1.5*y + 0.25*x)))); [xc, yc] = solve(sys1, sys2, x, y); disp ('Critical Points:'); disp ([xc yc]) f1 = @ (t, x) [x(1)* (1 - x(1) - x(2)); x(2)* (1.5 - x(2) - x(1))];

f2 = @ (t, x) [x(1)* (1 - x(1) + 0.5*x(2)); x(2)* (2.5-1.5*x(2) + 0.25*x(1))]; f3 = @ (t, x) [(((1-c)*(x(1)* (1 - x(1) - x(2))))+ (c*(x(1)* (1 - x(1) + 0.5*x(2))))); (((1-c)*(x(2)* (1.5 - x(2) - x(1))))+((c)*(x(2)* (2.5-1.5*x(2) + 0.25*x(1)))))]; figure; hold on for a = 0.25: 0.75:3 for b = 0.25: 0.25:3 [t, xa] = ode45(f3, [0 10], [a b]); [t, xa] = ode45(f3, [0-10], [a b]); title 'Problem 5 and 6 with c= 1' axis ([0 4 0 4]) [X Y] = meshgrid (0:0.25:4, 0:0.5:4); F1 = (((1-c).*(X.* (1 - X - Y)))+ ((c).*(x.* (1 - X + 0.5.*Y)))); F2 = (((1-c).*(Y.* (1.5 - Y - X)))+((c).*(Y.* (2.5-1.5.*Y + 0.25.*X)))); L= sqrt((f1/3).^2 + (F2/6).^2); quiver(x, Y, F1./L, F2./L, 0.5); hold off % The critical points are: % (0,0) is a nodal source. % (0,5/3) is a saddle

% (1,0) is a also a saddle % (2,2) is a nodal sink % The relationship between the species has evolved into a mutually % beneficial one but there is still competition between individual species. % An example of this is the trees in a forest and underground bacteria % relationship. The trees compete for sunlight while the bacteria compete % for food and shelter among themselves. They both benefit because the % bacteria gets shelter and the trees can use waste produced by the % bacteria. The graph is now an attracting cw sprial sink approaching (2,2) % because there is still internal competition between the individual % species. c = 1 Critical Points: [ 0, 0] [ 0, 5/3] [ 1, 0] [ 2, 2]

Published with MATLAB 7.6