3. (5 points).
Assume the differential equation for the problem is
(1) y' = c y (M-y),
y(0) = y0 is given.
Find the steady state solution, i.e. equilibrium(s).
4. (10 points).Write
a matlab function to define the right hand side of the differential
equation; write a matlab file to solve the equation using
Matlab built in function ode23 or ode45. Using
global command for the parameters. Explain the meanings of ode23
and ode45. Do they fixed or variable time steps? You need to attach your
Matlab Codes.
5. Numerical Experiments. Consider the personal communication model where the population is measured in percent so that M = 100.
(a) (5 points) Take c = 1, by choosing the initial value y(0) close to the equilibriums, judge whether the equilibrium are stable or unstable.
(b) (20 points)Assume initially 1 percent know the information so that y(0) = 1. Assume also after one day, we have y(1) = 1+ 0.S * k. Use the implicit Euler's method
y(1) = y(0) + h* ( f(0, y(0)) + f(1, y(1))/2, where h = 1, (why?)
to determine the parameters c, where S is your social security number. You can put your solution for c in your Matlab code. Use ode23 or ode45 to solve the problem with different choice of k; Plot and label the solutions versus time.
What happens when y(1) increases?Find the solution when k = 1. Find the solution when k = 2. Find the solution when k = 5.
(c). (Extra Credit for 5 points.) Suppose both mass and personal communication modes of learning are taking place so that the model is
y' = cy(M - y) + k(M - y).
Solve and plot the problem with k=5 using
both ode23 and ode45. Compare the plots obtained using ode23 and
ode45.