DE.04 Modern DiffEq Issues
 LITERACY

Needs["Graphics`Colors`"];
Needs["Graphics`FilledPlot`"];

If[MemberQ[{"Global`","Graphics`Common`GraphicsCommon`","Vector3D`"}, 
    Context[ScaleFactor]],Remove["*`ScaleFactor"]];
<<"Graphics`Legend`";
<<"Graphics`Common`GraphicsCommon`";
Remove["*`ScaleFactor"];
Graphics`Colors`GosiaGreen=RGBColor[0, 0.392187, 0];
Off[General::spell];
Off[General::spell1];
Off[ParametricPlot3D::ppcom];
Off[ParametricPlot::ppcom];
Off[Plot::plnr];
Needs["Calculus`Master`"];
Off[Unique::"usym"];
SetOptions[Limit,Analytic->True];

CMView = {2.7, 1.6, 1.2};

Off[Graphics::gpt]

New Vector Drawers

(* :Title:  NewVectorDraw  *)
(* :Author: Bruce Carpenter *)
(* :Summary:  Construct 2 and 3 dimensional vectors,
     arrows, and arrowheads as graphics 
     objects.
*)
(* :Date:  Copyright 1997, Math Everywhere, Inc. 
*)
(*  :Drawbacks:  Since the vectors are drawn out of 
     context, the shapes of the arrowheads are only 
     correct with AspectRatio set to Automatic.
*)
BeginPackage["Vector3D`","Graphics`Colors`"];

Axes3D::usage = "Axes3D[a, b] creates a Graphics3D object of cartesian axes with x, y, and z running from -a/3 to a, and with axes labels b units beyond the tips of the axes.  Axes3D[a] is Axes3D[a, a/8].";

Perpend::usage = "Perpend[a] returns a unit vector which is perpendicular to the vector a.";

Arrow::usage = "Arrow[a] produces a 2 or 3 dimensional vector from the origin to a. Arrow[a, Tail -> tail] gives a vector from tail to a.";
	
Vector::usage = "Vector[a, b] gives a 2D or 3D vector from a to b.";

ArrowHead::usage = "ArrowHead[a, vec] produces an arrowhead with its tip placed at the point a, pointing in the direction of the vector vec.";

Tail::usage = "Tail -> point puts the tail of the vector at point.";

Norm::usage = "Norm[vec] returns the Euclidean length of vec.";

Normalize::usage = "Normalize[vec] returns a unit vector in the direction of vec, provided vec is nonzero.";

Aperture::usage = "Aperture is the ratio of the radius of the base to the length of the head of a vector.";

TipSize::usage = "TipSize specifies an absolute size for the inner tip length of the head of a vector.";

TipRatio::usage = "TipRatio is the ratio of the inner length of the arrowhead to the length of the shaft of a vector.";

HeadRatio::usage = "HeadRatio is the ratio of the outer length of the arrowhead to the length of the shaft of a vector.";

HeadSize::usage = "HeadSize specifies an absolute size for the head of a vector.";

ScaleFactor::usage = "ScaleFactor specifies the amount to scale a vector in length and may be either a number or a pure function.";

ZeroVectorPointSize::usage = "ZeroVectorPointSize is the size of the point used to represent a zero vector.";

Options[Vector] = Options[Arrow] = Options[ArrowHead] =
{HeadRatio -> 0.18, TipRatio -> 0.14, Aperture -> 0.3, ScaleFactor -> 1, HeadType -> Polygon, ShaftQ -> True, EdgesQ -> True, VectorColor -> RGBColor[0,0,1], ShaftWidth -> 0.005, ZeroVectorPointSize -> 0.01};
		
Begin["`Private`"];

SetOptions[ParametricPlot,AspectRatio -> Automatic];
SetOptions[Plot,AspectRatio -> Automatic];
SetOptions[Graphics,AspectRatio -> Automatic];

Axes3D[u_,v_] := 
      Graphics3D[{
            {Blue,Line[{{-u/3,0,0},{u,0,0}}]},
                    Text["x",{u + v,0,0}],
            {Blue,Line[{{0,-u/3,0},{0,u,0}}]},
                    Text["y",{0, u + v,0}],
            {Blue,Line[{{0,0,-u/3},{0,0,u}}]},
                    Text["z",{0,0,u + v}]}]; 
Axes3D[u_] := Axes3D[u,u/8];
				
Norm[a_?VectorQ] := N[Sqrt[a.a]];

Normalize[a_?VectorQ] := If[a.a == 0, a, a/Norm[a]];

Perpend[a_?VectorQ] := Normalize[{a[[2]],-a[[1]]}]/;Length[a]==2
Perpend[a_?VectorQ] := Normalize[If[a[[1]]==0,{1,0,0},{0,a[[3]],-a[[2]]}]]/;Length[a]==3

Base3D = Table[{Cos[2 k Pi/8.], Sin[2 k Pi/8.]},{k,0,8}]; 

Vector[from_?VectorQ, to_?VectorQ, opts___] := Module[
   {sq, sw, ht, hs, hr, tr, ap, sf, vc, zvps, diff = to - from, tip},
   {sq, sw, ht, hs, hr, ts, tr, ap, sf, vc, zvps} = {ShaftQ, ShaftWidth, HeadType, HeadSize, HeadRatio, TipSize, TipRatio, Aperture, ScaleFactor, VectorColor, ZeroVectorPointSize} /. {opts} /. Options[Vector];
   If[from==to, Return[Graphics[{PointSize[zvps],vc,Point[from]}]]];
   diff = If[NumberQ[N[sf]], sf diff, sf[diff]];
   tip = from + diff;
   If[NumberQ[hs], hr = hs/Norm[diff]; tr = 0.75 hr];
   If[NumberQ[ts], tr = ts/Norm[diff]];
   Graphics[{If[sq,{vc,Thickness[sw],Line[{from,tip - tr diff}]},{}],
      With[{trans = ap hr Norm[diff] Perpend[diff]},
      {vc, Thickness[sw], ht[{tip,
                   (tip - hr diff + trans),
                   (tip - tr diff),
                   (tip - hr diff - trans),tip}]}]}]
] /; Length[from]==Length[to]==2

Vector[from_?VectorQ, to_?VectorQ, opts___] := Module[
   {sq, eq, sw, hs, hr, tr,ap, sf, vc, zvps, diff = to - from, tip},
   {sq, eq, sw, hs, hr, ap, sf, vc, zvps} = {ShaftQ, EdgesQ, ShaftWidth, HeadSize, HeadRatio, Aperture, ScaleFactor, VectorColor, ZeroVectorPointSize} /. {opts} /. Options[Vector];
   If[from==to, Return[Graphics3D[{PointSize[zvps],vc,Point[from]}]]];
   diff = If[NumberQ[N[sf]], sf diff, sf[diff]];
   tip = from + diff;
   If[NumberQ[hs], hr = hs/Norm[diff]];
   tr = hr/2;
   Graphics3D[{If[sq,{vc,Thickness[sw],Line[{from,tip-tr diff}]},{}], If[eq, {}, EdgeForm[]], {SurfaceColor[vc],
      With[{temp = Perpend[diff]},
      Polygon[Append[#,tip]]& /@ Partition[(tip - hr diff + #)&/@((ap hr Norm[diff] Base3D) . {temp,Normalize[Cross[temp,diff]]}),2,1]]}}]
] /; Length[from]==Length[to]==3


Arrow[a_, Tail->b_, opts___] := Vector[b,a+b,opts]

Arrow[a_, opts___] := Vector[Table[0,{Length[a]}],a,opts]

ArrowHead[a_, b_, opts___] := Vector[a-b,a,ShaftQ->False,opts];

End[];

EndPackage[];
Null

VectorField and Phase Lines

(*  :Title: VectorAndPhase.m  *)

(*  :Author:  Bill Davis  *)

(*  :Dates:  about March, 1996 *)

(*  :Drawbacks:  I wish someone serious would come and turn these into
                 Really carefully done packages.  *)

BeginPackage["PhaseStuff`","Vector3D`",
		"Utilities`FilterOptions`"];

PhaseLine::usage = "PhaseLine[fcn,{var,a,b},tint,pos]
	makes a vertical phase line for the function, fcn, of the variable, var,
	for the variable going from a to b, with 
	a color given by tint,  at the x-coordinate pos.";
	
PhaseLine3D::usage = "PhaseLIne3D[fcn,{var,a,b},tint,loc]
	makes a vertical phase line for the function, fcn, of the variable, var,
	for the variable going from a to b, with 
	a color given by tint, and base point at loc = {x,y}";
	
VectorField::usage = "VectorField[{function,{var1,a,b,space1},{var2,c,d,space2}]
	will make a vector field of normalized vectors, colored by
	magnitude, for the function of the variables on the
	range {r1,r2} with spacing between points given by 
	{space1, space2}.  If a single function of a single variable is given,
	the vector field {1,f} will be plotted.";
	
StikPikXZ::usage = "StikPikXZ[picture,a:_0] takes a 2 dimensional
	Mathematica picture and embeds it on the XZ plane at y = a.  
	Some optional characteristics of the graphs are lost in the 
	process.  StikPikYZ and StikPikXZ are similar.";
	
StikPikYZ::usage = "StikPikYZ[picture,a:_0] takes a 2 dimensional
	Mathematica picture and embeds it on the XZ plane at y = a.  
	Some optional characteristics of the graphs are lost in the 
	process.  StikPikYZ and StikPikXZ are similar.";
	
StikPikXY::usage = "StikPikXY[picture,a:_0] takes a 2 dimensional
	Mathematica picture and embeds it on the XZ plane at y = a.  
	Some optional characteristics of the graphs are lost in the 
	process.  StikPikYZ and StikPikXZ are similar.";
	
Begin["`Private`"];	

PhaseLine[fcn_,{var_,a_,b_},tint_,pos_:0] := 
	Module[{len,len1,k,zset,zero,zero1,signs,stick,dots,pointers},
	zset = Solve[fcn==0,var];
	zero = If[Length[zset]==0,{},var/.zset];
	zero = Sort[zero];
	zero = Select[zero,((# >= a)&&(# <= b))&];
	zero1 = Sort[Union[zero,{a,b}]];
	len = Length[zero];
	len1 = Length[zero1];
	signs = Table[Sign[fcn/.var->((zero1[[k+1]] + zero1[[k]])/2)],
		{k,1,len1-1}];
	stick = {Thickness[0.007],Line[{{pos,a},{pos,b}}]};
	dots = Point[{pos,#}]&/@zero;
	dots = Join[{PointSize[0.05],tint},dots];
	heads = Table[MakeHead[zero1[[k]],zero1[[k+1]],pos,
		signs[[k]],b-a,tint],{k,1,len1-1}];
	Return[{Graphics[Join[{tint},stick,dots]],heads}]
		]
		
MakeHead[a_,b_,c_,s_,slen_,tint_] := Module[{u,v,w},
	u = Min[2(b-a),3/4 slen];
	Return[ArrowHead[{c,a(.5-s/5)+b(.5+s/5)},
		{0,s u},VectorColor->tint]]]
		
PhaseLine3D[fcn_,{var_,a_,b_},tint_,pos_:{0,0}] := 
	Module[{len,len1,k,zset,zero,zero1,signs,stick,dots,pointers},
	zset = Solve[fcn==0,var];
	zero = If[Length[zset]==0,{},var/.zset];
	zero = Sort[zero];
	zero = Select[zero,((# >= a)&&(# <= b))&];
	zero1 = Sort[Union[zero,{a,b}]];
	len = Length[zero];
	len1 = Length[zero1];
	signs = Table[Sign[fcn/.var->((zero1[[k+1]] + zero1[[k]])/2)],
		{k,1,len1-1}];
	stick = {Thickness[0.007],Line[{{pos[[1]],pos[[2]],a},
		{pos[[1]],pos[[2]],b}}]};
	dots = Point[{pos[[1]],pos[[2]],#}]&/@zero;
	dots = Join[{PointSize[0.03],tint},dots];
	heads = Table[MakeHead3D[zero1[[k]],zero1[[k+1]],pos,
		signs[[k]],b-a,tint],{k,1,len1-1}];
	Return[{Graphics3D[Join[{tint},stick,dots]],heads}]
		]
		
MakeHead3D[a_,b_,c_,s_,slen_,tint_] := Module[{u,v,w},
	u = Min[2(b-a),1/2 slen];
	Return[ArrowHead[{c[[1]],c[[2]],a(.5-s/5)+b(.5+s/5)},
		{0,0,s u},VectorColor->tint]]]
		
		
VectorField[function_List,{var1_,a_,b_,sp1_:1},{var2_,c_,d_,sp2_:1}] := 
	Module[{i,j,U,V,UU,VV,ulow,uhigh,vlow,vhigh,maxval,minval,
		lengths,directions,locations,mlen},
	mlen = Min[sp1,sp2];
	normf[uu_,vv_] = Sqrt[function[[1]]^2+function[[2]]^2]/.
		{var1->uu,var2->vv};
	lengths = Table[N[normf[U,V]],{U,a,b,sp1},{V,c,d,sp2}];
	maxval = Max[lengths]; minval = Min[lengths];
	If[minval == maxval,maxval += 1];
	locations = Table[{uu,vv},{uu,a,b,sp1},
		{vv,c,d,sp2}];
	directions = Table[If[N[normf[U,V]]==0,{0,0},
		mlen (function/.{var1->U,var2->V})/(1.3 N[normf[U,V]])],
			{U,a,b,sp1},{V,c,d,sp2}];
	{UU,VV} = Dimensions[directions][[{1,2}]];
	Return[Table[Arrow[directions[[i,j]],
			Tail->locations[[i,j]],Aperture->1,
			HeadRatio->.4,ShaftWidth->0.008, VectorColor->
			RGBColor[(lengths[[i,j]] - minval)/(maxval-minval),0,
				(maxval -lengths[[i,j]])/(maxval-minval)]],{i,UU},{j,VV}]]
		]
		
VectorField[function_,{var1_,a_,b_,sp1_:1},{var2_,c_,d_,sp2_:1}] :=
	VectorField[{1,function},{var1,a,b,sp1},{var2,c,d,sp2}]
	
	
Needs["Utilities`FilterOptions`"]

FixOptions[a_] := Module[{picture = a, opt3},
If[Options[picture] != {}, 
	opt3 = FilterOptions[Graphics3D,#]&/@Options[picture];
	(* Fix things that might carry 2D characteristics. *)
	opt3 = opt3//. {(AxesLabel -> _) ->(AxesLabel -> None),
			(PlotRange->_) -> (PlotRange->Automatic),
			(PlotRegion -> _) -> (PlotRegion -> Automatic),
			(Ticks -> _) -> (Ticks -> Automatic)};
	picture = Apply[List,picture];
	picture[[-1]] = opt3;
	picture = Apply[Graphics3D,picture]];
	Return[picture]
	]

StikPikXZ[picture_,a_:0] := Module[{PIK3 = picture},
	PIK3 = PIK3//.{Graphics->Graphics3D,
		{u_?NumberQ,v_?NumberQ}:>{u,a,v}};
	PIK3 = FixOptions[PIK3];
	Return[PIK3]
		]


StikPikYZ[picture_,a_:0] := Module[{PIK3 = picture},
	PIK3 = PIK3//.{Graphics->Graphics3D,
		{u_?NumberQ,v_?NumberQ}:>{a,u,v}};
	PIK3 = FixOptions[PIK3];
	Return[PIK3]
		]


StikPikXY[picture_,a_:0] := Module[{PIK3 = picture},
	PIK3 = PIK3//.{Graphics->Graphics3D,
		{u_?NumberQ,v_?NumberQ}:>{u,v,a}};
	PIK3 = FixOptions[PIK3];
	Return[PIK3]
		]
		
End[];

EndPackage[];
Null

ThreeAxes[u,v]

ThreeAxes[u_,v_] := 
      Graphics3D[{
            {Blue,Line[{{-u,0,0},{u,0,0}}]},
                    Text["x",{u + v,0,0}],
            {Blue,Line[{{0,-u,0},{0,u,0}}]},
                    Text["y",{0, u + v,0}],
            {Blue,Line[{{0,0,0},{0,0,u}}]},
                    Text["z",{0,0,u + v}]}]; 
ThreeAxes[u_] := ThreeAxes[u,u/8];
ThreeAxes::usage = "ThreeAxes[a,b] makes a standard cartesian axis graphics object
	with x, y, and z running from -a to a, and with axis
	labels b units beyond the tips of the axes.  ThreeAxes[a]
	is ThreeAxes[a,a/8].";

Crisscross

Clear[x];
crisscross = Plot[{Cos[x],Sin[x]},{x,Pi/8,3 Pi/8},
    PlotStyle->{{RGBColor[1,0,0],Thickness[0.02]}},
    Axes->None,AspectRatio->1/3,
    DisplayFunction->Identity];

L.1)

When you start a car trip, you go to where the car is parked, start the car, and drive off. Your trip is completely determined by your steering wheel, gas pedal and brake pedal actions during your trip.

Comment on this:
When you are given function f[t, y] and make a diffeq
      y'[t]=f[t, y[t]]
with y[0] given, then the plot of the corresponding solution is determined in much the same way that a car trip is determined.

L.2)

Here's an attempt to use Euler's faker (= Euler's method) to approximate 
       f[x] = (1/2) x Sin[3 x]
using only information about f'[x] and the value of f[0].

\(Clear[x, f, t]; 
a = 0; 
\(b = 4; \)\)f[x_] = (1/2) x Sin[3 x]; curveplot = 
      Plot[f[x], {x, a, b}, PlotStyle -> Thickness[0.01], 
        DisplayFunction -> Identity]; starter = f[0]; y[a] = starter; beginner = {a, y[a]}; Clear[x, y, next, jump, iterations, point, k];
jump[iterations_] := ((b - a)/iterations);
next[{x_, y_}, iterations_]:={x, y}+jump[iterations] {1,f'[x]};point[0, iterations_] = beginner; point[k_, iterations_] := 
      point[k, iterations] = 
        N[next[point[k - 1, iterations], iterations]]; \(Clear[Euler]; 

    Euler[iterations_] := 
      Show[Graphics[{Thickness[0.01], 
            Line[Table[point[k, iterations], {k, 0, iterations}]]}], 
        PlotRange -> All, Axes -> True, 
        AxesOrigin -> beginner, 
        AxesLabel -> {"x", "Euler fake"}, 
        PlotLabel -> iterations\ " iterations", 
        DisplayFunction -> Identity]; 

    \(Show[curveplot, Euler[6], DisplayFunction -> $DisplayFunction, 
      PlotRange -> All, AxesLabel -> {"x", ""}, 
      PlotLabel -> "6 iterations"]; \)\)

What you see above is what you get when you go with 6 iterations.
Here's what you get when you go with 24 iterations:

Show[curveplot, Euler[24], DisplayFunction -> $DisplayFunction, 
      PlotRange -> All, AxesLabel -> {"x", ""}, 
      PlotLabel -> "24 iterations"];

48 iterations:

Show[curveplot, Euler[48], DisplayFunction -> $DisplayFunction, 
      PlotRange -> All, AxesLabel -> {"x", ""}, 
      PlotLabel -> "48 iterations"];

What is it about Euler's method (= Euler's faker) that makes it so that you can always expect to get better results when you increase the number of iterations?

L.3)

You are looking at the diffeq
              y'[t]=y[t] - t  with  y[0] = 1.
When you go with Euler's method starting at {0, 1} and a
              jump size = 1, 
then the first three Euler points you get are 
             {0, 1}, {1, a} and {2, b}.
Give the precise values of a and b.

L.4)

You are given a function f[x] but not given the formula for f[x]. In place of the formula, you are given that 
             f[0] = 1 
and you are given a formula for f'[x].
You calculate f''[x] and find that f''[x]>0 no matter what x is.
When you use Euler's faker to give a fake plot of f[x] for x > 0, you know in advance that the Euler fake plot must run under the true plot of f[x]. 
How do you know this in advance?

L.5)

Look at the differential equation
      y'[x]=y[x] (2 + Cos[x]^( 2) - y[x]) with  y[0] = 1. 
How do you know before you do any plotting that as x advances from 0, the plot of the solution y[x] initially must go up?

L.6)

Look at the differential equation
      y'[x]=y[x] (2 + Sin[x]^( 2) - y[x]) with  y[0] = 3. 
How do you know before you do any plotting that as x advances from 0, the plot of the solution y[x] initially must go down?

L.7)

Look at the differential equation
        y'[x]=y[x] (2 + Sin[x]^( 2) - y[x]) with  y[0] = 1. 
How do you know before you do any plotting that as x advances from 0, the plot of the solution y[x] goes up near x's for which 
        2 + Sin[x]^( 2) > y[x]
and the plot of the solution y[x] goes down near x's for which
        2 + Sin[x]^( 2) < y[x]?
Why do you expect that the crests and dips of the plot of y[x] are located at places where the y[x] plot crosses the plot of 
        2 + Sin[x]^( 2)?

L.8)

The guts of the predator-prey model involve the simultaneous  differential equations
       prey'[t]=  a prey[t] - b prey[t] pred[t],
       pred'[t]=-c pred[t] + d pred[t] prey[t]
where a, b, c, and d are given positive constants.
Why do you expect the crests and dips of the plot of prey[t] to happen when pred[t] = (a/b)?
Why do you expect the crests and dips of the plot of pred[t] to happen when prey[t] = (c/d)?
When prey[t] < (c/d), do you expect the plot of pred[t] to go up or down?
When pred[t] > (a/b), do you expect the plot of preyt[t] to go up or down?

L.9)

What happens when you go with the predator-prey model
      prey'[t]=  a prey[t] - b prey[t] pred[t],
      pred'[t]=-c pred[t] + d pred[t] prey[t]
and start with
      prey[0] = (c/d) and pred[0] = (a/b)?

L.10)

The given diffeq is 
             y'[t]=y[t] (t - Sin[y[t]]).
Write down the formula for the function f[t, y] that expresses this diffeq in the form
             y'[t]=f[t, y[t]].

L.11)

Here's a new diffeq:

\(Clear[diffeq, y, t, f, starter]; 

    f[t_, y_] = \((1 - y\/2)\)\ \((1 - y\/8)\) + 0.4\ t; 

    ColumnForm[{\(y'\)[t]\  == \ f[t, y[t]], \ y[0]\  == \ starter}]\)

And its flow plot:

scalefactor = 1.0; {ylow, yhigh} = {0, 10}; {tlow, thigh} = {0, 9}; \(flowplot = 
      Table[Arrow[scalefactor\ {1, f[t, y]}, Tail -> {t, y}, 
          VectorColor -> Blue], {t, tlow, thigh, \(thigh - tlow\)\/12}, {y, 
          ylow, yhigh, \(yhigh - ylow\)\/8}]; 

    \(Show[flowplot, Axes -> True, AxesLabel -> {"t", "y"}, 
      AspectRatio -> 1\/GoldenRatio]; \)\)

The plotted vectors are of the form 
         {1, f[t, y]} with tail at {t, y}.
How are the plotted vectors related to solutions of the diffeq
         y'[t]=f[t, y[t]] 
that pass through the point {t, y}?

L.12)

Here's a differential equation:

\(Clear[diffeq, y, t, f, starter]; 

    f[t_, y_] = y - 0.5\ E\^\(\(-0.4\)\ t\) + 1; 

    ColumnForm[{\(y'\)[t]\  == \ f[t, y[t]], \ y[0]\  == \ starter}]\)

And its flow plot:

scalefactor = 0.4; {ylow, yhigh} = {-2, 2}; {tlow, thigh} = {0, 5}; \(flowplot = 
      Table[Arrow[scalefactor\ {1, f[t, y]}, Tail -> {t, y}, 
          VectorColor -> Blue], {t, tlow, thigh, \(thigh - tlow\)\/12}, {y, 
          ylow, yhigh, \(yhigh - ylow\)\/8}]; 

    \(Show[flowplot, Axes -> True, AxesLabel -> {"t", "y"}, 
      AspectRatio -> 1\/GoldenRatio]; \)\)

Visible in this flow plot are two distinct families of solutions. Pencil in plots of a sample of each type. 

Discuss where you see extreme sensitivity to errors in the starter value on y[0].
 
The flow plot seems to allow for one solution of the form 
      y[t] = constant.
Is there such a solution?

L.13)

The logistic harvesting model is based on the differential equation
      y'[t]=a y[t] (1 - y[t]/b) - r
with 0 < a and 0 < b and start with 0 < y[0] < b. 
Here is a plot of f[y] = a y (1 - (y/b)) - r for the indicated values of a, b, and r:

a = 0.33; b = 600; r = 45; \(Clear[y, f]; 
f[y_] = a\ y\ \((1 - y\/b)\) - r; 

    \(phaseplot = 
      Plot[f[y], {y, 0, b}, AspectRatio -> 1\/2, 
        AxesLabel -> {"y", "f[y]"}]; \)\)

Use this plot to discuss what happens to solutions of
       y'[t]=0.33 y[t] (1 - y[t]/600) - 45
when: 
a) You go with y[0] < 200

b) You go with y[0] > 400.

c) You go with 250 < y[0] < 400.

L.14)

Most folks call the populations 
      prey = (c/d) and predators = (a/b) 
for the predator-prey model
      prey'[t]=   a prey[t] - b prey[t] pred[t]
      pred'[t]= -c pred[t] + d pred[t] prey[t]
 by the name "equilibrium populations."
Imagine that the prey are insects and that the predators are birds or fish. The government goes into action, spreading an insecticide such as DDT all over the place.  The insecticide kills both predator and prey in proportion to their current population, so the new model becomes
      prey'[t]=  a prey[t] - b prey[t] pred[t] - u prey[t]
      pred'[t]=-c pred[t] + d pred[t] prey[t] - v pred[t]
where a, b, c, d, u, and v are all positive constants.
This is the same as
     prey'[t]=  (a - u) prey[t] - b prey[t] pred[t]
     pred'[t]=-(c + v) pred[t] + d pred[t] prey[t]
What are the new equilibrium populations?

How do these new equilibrium populations tell you that the net effect of the government action was to raise the equilbrium population of the prey (insects) but to lower the equilibrium population of the predators?

How does this tell you that the insecticide had exactly the opposite of the government's intended outcome?