matlab project submit your elms mor.ru xsep 17, 2020  · matlab project submission submit your code...

6
MATLAB project submission Submit your code to ELMS mor.ru x marhproblem bycomment outpnt section E In the absence of predators rats grow exponentially and double their population every 3 years Initially there are 20000 rats and they are eaten by predators at a rate of 3000 per year What is the population of rats after 6 years no predators r p r p l t I e t p 10 1 P 13 2 P Pie e 2 3 r l n 2 r with predators i r p h l t f p 3000 linear ODE you can also do separable

Upload: others

Post on 16-Oct-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MATLAB project Submit your ELMS mor.ru xSep 17, 2020  · MATLAB project submission Submit your code to ELMS mor.ru x marhproblem bycomment outpnt section E In the absence of predators

MATLAB project submission

Submit your code to ELMS mor.ru x

marhproblem bycomment outpnt section

E In the absence of predators rats grow exponentially

and double their population every 3 years Initiallythere are 20000 rats and they are eaten by predators

at a rate of 3000 per year What is the population

of rats after 6 years

no predators 㖲 r p r

p l t I e t p10 1

P 13 2 P Piee 23 r l n 2 r

with predators i 桇 r p h l t

装 f p 3000

linear ODE you can also do separable

Page 2: MATLAB project Submit your ELMS mor.ru xSep 17, 2020  · MATLAB project submission Submit your code to ELMS mor.ru x marhproblem bycomment outpnt section E In the absence of predators

装 f p 3000

alt Y Alt 11 Y dt ftintegrating factor ieftftletpk 3ooefte

tpm efpifl oooe

sjdse.it30001今 s__

器 e i 1

ént P 器 e 哭 1

Pit P e t器 1 e的

P 20000

in 6 2000 ⼼ 2㙄 11 巴以9

Page 3: MATLAB project Submit your ELMS mor.ru xSep 17, 2020  · MATLAB project submission Submit your code to ELMS mor.ru x marhproblem bycomment outpnt section E In the absence of predators

o Logistic model i

桇 Rlplp h.lt

R l p r a p r so as o

7Youth rate L when pT

similar toeyp growth restriction from environment

㖲 r a p p when no harvest

autonomous

eq.glp r a p p r 1 1 f l p r11 炎 p

h f sophase portrait i

g 0 o

o kunstable stable

hi Ccrryinsy of the ecosystem

Page 4: MATLAB project Submit your ELMS mor.ru xSep 17, 2020  · MATLAB project submission Submit your code to ELMS mor.ru x marhproblem bycomment outpnt section E In the absence of predators

1.7 Numerical methods

if It y y It ⼆ I

want to solve on t E Et I tFIp exact soI'm Y It1

i1ifi i

i i 1 1ihh.in i.i st.tl ˊ____ tN1

ti t Fit Nto

u Discretinnne iti.it ⻔t t.at at r____ t 灬 t t F

uniform time steps i h E n h n 0,1.2 NtF t Ih N stepsie.se

Design formula to get It n yn n 0 li

Nyuapproximates Y Hn

Explicit Euler method

Page 5: MATLAB project Submit your ELMS mor.ru xSep 17, 2020  · MATLAB project submission Submit your code to ELMS mor.ru x marhproblem bycomment outpnt section E In the absence of predators

Y It f It Y It IYltthl YHIYltthl Yl.tlY ⼼ ⼆点 x

⼀ ⼆h

if his small

YltthI Ylti

tflt.YltilYltthJEYltlthflt.Yltilevalnate

t

tnYltnt.IE Yltn h f Itn Yltn

explicit Enter method

y n_n ⼆ ynthfltniynl.n.co I

y ⼆ ⼆

⼆ Solve y f y E y l n 2

by explicit Enter method w h 0.1

to approximate Y 1 2 1the exact soI 1

to 1 t 1.1 tz 1.2

y 2

y y h f to y 2 0.11 f 2 12 23

y y thflt.it 2.3 1 011只以 药⽅

Page 6: MATLAB project Submit your ELMS mor.ru xSep 17, 2020  · MATLAB project submission Submit your code to ELMS mor.ru x marhproblem bycomment outpnt section E In the absence of predators

I compare ul exact sok Y It P 3⽇ ㄚ 11.2 2.592____

Global error Y It ㄧ y N

Localerrorzren i when substitute Yin into

numerical method the error you have

For explicit Euler

local error is Yltntil Yltnl hfltn.YHnll

YHntni ltn.li啊O h

us expect global error EN Olli O l h

h t N toexplicit Euler is firsforderaccurate_r.cor moregenerally when global error is Ollithen the method is math order accurate