Help solving differential equations and plotting graphs

3 views (last 30 days)
I have to answer the following questions, I want to check if I am going about this the correct way and need some help with the last two questions. I have included my code, attached, which I think gives me answer for the first two questions. The last piece of code refers to the last question. Mega stuck.
Questions
A modified growth model with similar behaviour to logistic growth can be developed from the differential equation:
dN/dt=r(N)N where r(N)=r0(1−(NK)2)
For the following use parameters values r0=0.0347 and K=1000.
i) For the modified model plot dN/dt.
ii) Use MATLAB to find the value of N at which the growth rate is a maximum. (Hint. MATLAB gives two solutions but we require N>0. )
iii) Find the solution of this differential equation using the dsolve command.
iv) Create two figures overlaying plots showing population growth for this modified model and the Logistic growth solution (Equation 1.3.3). Do this for both N0=100 and N0=5,000.
syms N r0 K
f = r0*N*N*(1-(N/K^2));
df = diff(f,N);
mdf = matlabFunction(df,'vars',[N,r0,K])
fun = @(N) mdf(N,0.0347,1000);
limits = [0 1200];
fplot(fun,limits)
line( [0,1200], [0,0], 'Color','k' )
ylabel('d/N x (dN/dt)')
xlabel('N')
solve(df==0,N)
syms L r0 K t N0
L=dsolve('DL=r0*L*(1-L/K)','L(0)=N0','t')
L=simplify(L)
mL = matlabFunction(L,'vars',[N0,K,r0,t])
funL100 = @(t) mL(100,1000,0.0347,t);
limits = [0 120];
fplot(funL100,limits)
line( [0,1200], [0,0], 'Color','k' )
ylabel('d/N x (dN/dt)')
xlabel('N')

Answers (1)

Shahir Monjur
Shahir Monjur on 25 Aug 2021
How has nobody answered this question in 8 years! Now I am stuck with this problem as well.

Categories

Find more on Mathematics in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!