First Example
In[1]:=
a=0.05;
s=0.01;
Po=3;
equations={P'[t]==a P[t] - s (P[t])^2,P[0]==Po}
depvar=P[t];
indepvar=t;
Out[1]=
2
{P'[t] == 0.05 P[t] - 0.01 P[t] , P[0] == 3}
In[2]:=
messysolution=DSolve[equations,depvar,indepvar]
Out[2]=
0.05 t
E
{{P[t] -> ----------------------}}
0.05 t
0.133333 + 0.2 E
The cell below defines solution to be the part to the right of the arrow in the messysolution above.
In[3]:=
solution=messysolution[[1,1,2]];
In[4]:=
plot1=Plot[solution,{t,0,100},AxesLabel->{indepvar,depvar},
PlotStyle->{RGBColor[1.000,0.000,0.000]},
AxesOrigin->{0,0},PlotRange->{0,2a/s}];

Is this reasonable? If the initial population is 300, should the population increase as the graph suggests? Look at the differential equation at the begining and convince yourself that P should increase by considering the sign of ist first derivative P'[t].
How will things be different if the initial population is 200? Should it increase or not? Will it attain the levels as with initial value 300? Lets find out.
In[5]:=
Clear[Po,equations,messysolution,solution];
Po=2;
equations={P'[t]==a P[t] - s (P[t])^2,P[0]==Po}
messysolution=DSolve[equations,depvar,indepvar]
solution=messysolution[[1,1,2]];
Out[5]=
2
{P'[t] == 0.05 P[t] - 0.01 P[t] , P[0] == 2}
Out[6]=
0.05 t
E
{{P[t] -> -----------------}}
0.05 t
0.3 + 0.2 E
In[7]:=
plot2=Plot[solution,{t,0,100},AxesLabel->{indepvar,depvar},
PlotStyle->{RGBColor[0.000,1.000,0.000]},
AxesOrigin->{0,0},PlotRange->{0,2a/s}];

We can compare the previous two cases graphically to get an idea. I have given names to the graphs above so we can display them using the command Show.
In[8]:=
Show[plot1,plot2];

To Do
To Do
WRITE YOUR TEXT HERE
In[9]:=
Clear[Po,messysolution,solution];
Po=7;
equations={P'[t]==a P[t] - s (P[t])^2,P[0]==Po}
messysolution=DSolve[equations,depvar,indepvar]
solution=messysolution[[1,1,2]];
Out[9]=
2
{P'[t] == 0.05 P[t] - 0.01 P[t] , P[0] == 7}
Out[10]=
0.05 t
E
{{P[t] -> ------------------------}}
0.05 t
-0.0571429 + 0.2 E
In[11]:=
plot4=Plot[solution,{t,0,100},AxesLabel->{indepvar,depvar},
PlotStyle->{RGBColor[0.502,0.000,0.251]},
AxesOrigin->{0,0},PlotRange->{0,2 a/s}];

In[12]:=
Show[plot1,plot2,plot3,plot4];
Show::gcomb: An error was encountered in combining the graphics
objects in Show[-Graphics-, -Graphics-, plot3, -Graphics-].
To Do
To DoUp to The Logistic Equation