Logistic Equation with MatLab

541 Views Asked by At

I want to write a MatLab file that can solve the following logistic equation:

$$\frac{dN(t)}{dt} = [a-bN(t)]N(t) \;\;\;\; a>0, b>0$$

But I'm not sure how to go about it. Are there any examples anywhere that I could follow?

1

There are 1 best solutions below

0
On BEST ANSWER

Hint

Without speaking of Matlab, you could first notice that this is a separable equation and the easiest way is to integrate $t$ with respect to $N$. Using partial fraction decomposition, this leads quickly to $$t=c_1 +\frac{\log (N(t))-\log (a-b N(t))}{a}$$ and now, you can solve for $N(t)$. After some basic simplifications, you should arrive to $$N(t)=\frac{a e^{a t+c_1}}{b e^{a t+c_1}+1}$$