Mathematical Principles for Scientific Computing and Visualization
http : // www.farinhansford.com/books/scv
by Gerald Farin and Dianne Hansford

This notebook illustrates the Malthus initial value, first-order ordinary differential equation (ODE) and vectorfields.
Figure 9.1 was created with this notebook.

p(t) is population at a given time
p'(t) = c * p(t) describes population growth.
c is constant the depends on the particular population.
If we know the population at some time t_0, an initial value of p_0, then what is the population at some time t? 

Below we have plotted the slope p'(t) for pairs (t,p). The circles represent initial values. These initial values determine functions that follow the vectorfield.


See Chapter 9 : Computing Dynamic Processes for details.

Updated July 2008

(* Load the vectorfield package *)
Needs["VectorFieldPlots`"]

(* Set the output directory *)
SetDirectory[ToFileName[Extract["FileName"/.NotebookInformation[EvaluationNotebook[]],{1},FrontEnd`FileName]]];

(* Create the vectorfield *)
vecfield=VectorFieldPlot[{1,y},{x,-2,2},{y,-2,2},PlotPoints->20,Frame->True];

(* This is the solution to the given ODE with initial value (0,1) *)
fct1=Plot[(E^x),{x,-2,0.8`},Axes->False,PlotStyle->{Thickness[0.013`], Red}];

(* This is the solution to the given ODE with initial value (0,1/e) *)
fct2=Plot[(E^(x-1)),{x,-2,1.8`},Axes->False,PlotStyle->{Thickness[0.013`], Blue}];

(* Initial value (0,1) is on the red curve *)
start=ListPlot[{{0,1.0},{0,(1/E)}},Axes->False,PlotStyle->{{PointSize[0.03`], Black}}];

pic=Show[{vecfield,fct1,fct2,start}]

Export["vecfield3.eps",pic];