Part I (50%)
This part is required to be submitted in class.
Part II (50%)
Population growth is described by an ODE of the form y0(t) = ry(t), where r is the growth rate. In a typical population, the growth rate is not a constant, but is density dependent. For example, as the population grows, there might be less food available, and as a result the growth rate decreases. We consider the following Logistic Equation:
(t) = r(1 K )y; 0
y(0) = y0
where 0 < y0 < K. Then the exact solution is given by
y(t) = y0 + (K y0)e rt :
Solve IVP (1) with y0 = 1000, r = 0:2, K = 4000 numerically using Euler’s method. Choose the step sizes
= 10; 1; 0:1, respectively.
a) Compare the solutions to the exact solution in plots of population vs. time. Compare the actual maximal error max jy(ti) wij with the error bound predicted in Theorem 5.9 (p.271).
b) Discuss the behavior of the solutions as a function of h. What happens for very large step size h?
Requirements Print your pdf le and submit it in the discussion section. Submit to CCLE the code, for example: a MATLAB (or C++, C, etc) function euler.m that implements ALGORITHM 5.1 (p.267), and a MATLAB script main.m that solves the IVP (1) and plots the approximated solutions versus the exact one.