DE.05 First Order Differential Equations
 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)

You are given this diffeq to analyze:

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

    f[t_, y_]\  = \ 0.2 \((y - 1)\) \((y - 3)\); 

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

Then you look at:

f[t, y]

And you say to yourself, "One single phase line is enough."

{ylow, yhigh} = {0, 4}; phaseline = PhaseLine[f[t, y], {y, ylow, yhigh}, Red, -1]; {tlow, thigh} = {0, 6}; jump = 0.5; scalefactor = 0.5; \(flowplot = 
      Table[Arrow[scalefactor\ {1, f[t, y]}, Tail -> {t, y}, 
          VectorColor -> Blue], {t, tlow, thigh, jump}, {y, ylow, yhigh, 
          jump}]; 

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

Look again at the formula for f[t, y]:

f[t, y]

What is it about the formula for f[t, y] that made you know you could get by with just one phase line?
What information does the phase line give?

L.2)

Here's an autonomous diffeq:

\(Clear[diffeq, a, b, c, y, t, f, starter]; 
a\  = \ 2; 
b\  = \ 4; 

    c\  = \ 7; 
f[t_, y_]\  = \((a - y)\) \((y - b)\) \((y - c)\); 

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

And the phase line for it:

{ylow, yhigh} = {-1, 8}; {tlow, thigh} = {0, 5}; setup = 
      Show[PhaseLine[f[t, y], {y, ylow, yhigh}, Blue, -(1/2)], 
        Axes -> True, AxesLabel -> {"t", "y"}, 
        PlotRange -> {{tlow - 1, thigh}, {ylow, yhigh}}, 
        AspectRatio -> 1, DisplayFunction -> $DisplayFunction];

The phase line indicates four different types of solutions. Pencil in a sample of each.
For what starting values do you expect constant solutions?
Which dot on the phase line signals the place where you expect extreme sensitivity to errors in starter data on y[0]?

L.3)

Here's a new autonomous diffeq containing some partially random coefficients:

\(Clear[diffeq, a, b, c, d, y, t, f, starter]; 

    a\  = \ Random[Real, {1, 2}]; 
b\  = \ Random[Real, {1, 3}]; 

    c\  = \ Random[Real, {5, 7}]; 
d\  = \ Random[Real, {9, 11}]; 

    f[t_, y_] = a\ \((1 - y\/b)\)\ \((1 - y\/c)\)\ \((1 - y\/d)\); 

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

Look at this plot:

{ylow, yhigh} = {0, 13}; fcurve = 
      ParametricPlot[{f[t, y], y}, {y, ylow, yhigh}, 
        PlotStyle -> {{Thickness[0.01], Red}}, 
        DisplayFunction -> Identity]; phaseline = PhaseLine[f[t, y], {y, ylow, yhigh}, Blue, 0]; setup = 
      Show[fcurve, phaseline, AxesLabel -> {"f[t,y]", "y"}, 
        AspectRatio -> (1/GoldenRatio), 
        DisplayFunction -> $DisplayFunction];

Points on the curve are of the form:

{f[t, y], y}

But the real issues here are:
-> How are the arrowheads on the phase line related to the plot of {f[t, y], y}?
-> How are the dots on the phase line related to the plot of {f[t, y], y}?
-> Remembering that y'=f[t, y], explain why it had to turn out this way.

L.4)

You are given this diffeq to analyze:

\(Clear[diffeq, y, t, f, starter]; 
f[t_, y_] = y - Sin[t] - 2; 

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

The first thing you do is look at:

f[t, y]

And you say to yourself: "One single phase line is not enough. If I want to use phase lines, I'll want several."

\(Clear[phaseline, t, y]; 

    phaseline[t_] := PhaseLine[f[t, y], {y, ylow, yhigh}, Red, t]\){ylow, yhigh} = {-0.5, 4.0}; {tlow, thigh} = {0, 6}; jump = 0.5; scalefactor = 0.4; phaselines = 
      Table[phaseline[t], {t, tlow + jump, thigh - jump, jump}]; flowplot = 
      Table[Arrow[scalefactor {1, f[t, y]}, Tail -> {t, y}], {t, tlow, 
          thigh, jump}, {y, ylow, yhigh, jump}]; Show[flowplot, phaselines, Axes -> True, 
      AxesLabel -> {"t", "y"}, 
      AspectRatio -> (1/GoldenRatio)];

Look again at the formula for f[t, y]:

f[t, y]

What is it about the formula for f[t, y] that made you want to use more than one phase line?
Is this diffeq autonomous?
Use the formula for f[t, y] to write down a formula for the curve on which all those dots all lie.

L.5)

Here's a new diffeq:

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

    f[t_, y_] = Cos[t]\ \((y - Sin[t])\)\ \((y - 0.85)\); 

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

Look at this plot of the phase line that corresponds to t = 4.0:

time = 4.0; {ylow, yhigh} = {-3, 5}; \(Clear[phaseline]; 

    phaseline[t_] := PhaseLine[f[t, y], {y, ylow, yhigh}, Blue, t]; 

    \(setup = 
      Show[phaseline[time], Axes -> True, 
        PlotRange -> {{0, time + 1}, {ylow, yhigh}}, 
        AxesLabel -> {"t", "y[t]"}, 
        AspectRatio -> 1\/GoldenRatio]; \)\)

Imagine that plots of solutions y[t] of this diffeq come in from the left and pass through the plotted phase line.
Some of them are going up as they cross over this line. Others are going down. 
Now look at this calculation:

f[4.0, y]

And give values for a and b so that
If 
        y[4.0] > b, 
then the plot of y[t] is going down as it crosses this line.
If  
        a < y[4.0] < b, 
then the plot of y[t] is going up as it crosses this line.
If   
        y[4.0] < a, 
then the plot of y[t] is going down as it crosses this line.

L.6)

You are given this diffeq to analyze:

\(Clear[diffeq, y, t, f, starter]; 
f[t_, y_] = Sin[t]\ \((y - t)\); 

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

Look at this plot which plots the point {t, y} = {5.0, 3.0}:

\({time, ytime} = {5.0, 3.0}; 

    pointplot = Graphics[{Red, PointSize[0.03], Point[{time, ytime}]}]; 

    setup = Show[pointplot, Axes -> True, 
        PlotRange -> {{0, time + 1}, {0, ytime + 1}}, 
        AxesLabel -> {"t", "y[t]"}, 
        AspectRatio -> 1\/GoldenRatio]; \)

Imagine that the plot of a solution y[t] of this diffeq comes in from the left and passes through the plotted point. 
Look at this quick calculation:

f[5.0, 3.0]

Use this quick calculation to determine whether: 
a)  The plot of y[t] comes in from the left and down to this point. Or: 
b)  The plot of y[t] comes in from the left and up to this point.

L.7)

Here's a non-autonomous diffeq:

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

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

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

Look at this plot

{ylow, yhigh} = {0, 3}; {tlow, thigh} = {0, 5}; ContourPlot[f[t, y], {t, tlow, thigh}, {y, ylow, yhigh}, 
      ContourSmoothing -> Automatic, PlotPoints -> 50, 
      Contours -> {0}, Axes -> True, 
      AxesLabel -> {"t", "y"}];

Is this a bifurcation plot?
Imagine that some solution curves are advancing from left to right through the plotted region. 
What do these solution curves do when they are in the white region?
What do these solution curves do when they are in the black region?
Where do you expect the tops of the crests and the bottoms of the dips of some of the solution curves to be?

L.8)

Here's single diffeq containing a parameter r:

\(Clear[diffeq, y, t, f, starter]; 
f[t_, y_] = y\ \((1 - y\/4)\) - r; 

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

And a bifurcation plot:

{ylow, yhigh} = {0, 5}; {rlow, rhigh} = {0, 1.5}; bifurcationplot = 
      ContourPlot[f[t, y], {r, rlow, rhigh}, {y, ylow, yhigh}, 
        ContourSmoothing -> Automatic, PlotPoints -> 50, 
        Contours -> {0}, Axes -> True, 
        AxesLabel -> {"r", "y"}, 
        Epilog -> {{Red, Text["A", {0.5, 2.5}]}, {Red, 
              Text["B", {1.2, 4.5}]}}];

Use this plot to estimate what happens to solutions y[t] of the diffeq that:
i)    correspond to 0 < y[0] < 5 and r > 1.
ii)   correspond to 1 < y[0] < 3  and r = 0.4.
iii)  correspond to 4 < y[0] < 5  and r = 0.4.

Estimate reasonable values for 
            r, a and b 
so that in the long term solutions get close to 3 
         provided a < y[0] < b.

L.9)

Here's a squirrelly first order diffeq containing a parameter r:

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

    f[t_, y_] = Sin[y]\ E\^\(-\(y\/5\)\) - r; 

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

And a bifuraction plot:

{ylow, yhigh} = {2, 9}; {rlow, rhigh} = {-1, 2.5}; bifurcationplot = 
      ContourPlot[f[t, y], {r, rlow, rhigh}, {y, ylow, yhigh}, 
        ContourSmoothing -> Automatic, PlotPoints -> 50, 
        Contours -> {0}, Axes -> True, 
        AxesLabel -> {"r", "y"}];

Two bifurcation points are visible in this plot. 
Mark them with your pencil.
Shade in combinations {r, y[0]} where you expect to find extreme sensitivity to slight errors in starter data.

L.10)

Here are five diffeqs:

\(Clear[diffeq1, y1, t, f1, starter, r, Derivative]; 

    f1[t_, y_] = 3.8\ \((y - 1)\)\ \((y - 2)\) - Sin[t]; 

    ColumnForm[
      diffeq\  = \ {\(y1'\)[t]\  == \ f1[t, y[t]], \ y1[0]\  == \ starter}]
      \)

\(Clear[diffeq2, y, t, f2, starter, r, y2, Derivative]; 

    f2[t_, y_] = 3.8\ E\^\(\(-0.9\)\ y\); 

    ColumnForm[
      diffeq\  = \ {\(y2'\)[t]\  == \ f2[t, y[t]], \ y2[0]\  == \ starter}]
      \)

\(Clear[diffeq3, y, t, f3, y3, starter, r, Derivative]; 

    f3[t_, y_] = 3.8\ \((y - 1)\)\ \((y - 2)\) - r; 

    ColumnForm[
      diffeq\  = \ {\(y3'\)[t]\  == \ f3[t, y[t]], \ y3[0]\  == \ starter}]
      \)

\(Clear[diffeq4, y, t, f4, y4, starter, r, Derivative]; 

    f4[t_, y_] = 3.8\ Sin[y] - t + r; 

    ColumnForm[
      diffeq\  = \ {\(y4'\)[t]\  == \ f4[t, y[t]], \ y4[0]\  == \ starter}]
      \)

\(Clear[diffeq5, y, t, f5, starter, r, y5, Derivative]; 

    f5[t_, y_] = 3.8\ \((y - 1)\)\ \((y - 2)\) - Sin[y]; 

    ColumnForm[
      diffeq\  = \ {\(y5'\)[t]\  == \ f5[t, y[t]], \ y5[0]\  == \ starter}]
      \)

Which of these diffeqs are autonomous?
Which of the autonomous diffeqs contains an extra parameter?
Which of the non-autonomous diffeqs contains an extra parameter?

L.11)

A body falling in a vacuum is subject only to the force of acceleration. This means that the velocity v[t] of a body falling in a vacuum solves the simple diffeq 
         v'[t]=9.8 (meters per second per second). 
When air resistance is incorporated, it is often assumed that the air resistance is proportional to the velocity itself.  This leads to the model:

\(Clear[diffeq5, y, t, f5, starter, r]; 
f[t_, v_] = 9.8\  - \ r\ v; 

    ColumnForm[diffeq\  = \ {\(v'\)[t]\  == \ f[t, v[t]], \ v[0]\  == \ 0}]
      \)model  =  diffeq;

Come up with the r that makes the terminal velocity equal to 19.6 meters per second.
(You are not asked to solve the diffeq.)

L.12)

Here's a little diffeq:

Clear[diffeq5, y, t, f5, starter, r];
f[t_, y_] = 1 + (y/5);
ColumnForm[diffeq = {y'[t]==f[t, y[t]],y[0] == 0.5}]

You separate the variables and integrate to get a formula for the solution:

N[DSolve[diffeq, y[t], t], 2]

Analyze the formula and determine whether the solution escapes to ∞ in finite time or in infinite time.

L.13)

Here's a little diffeq:

Clear[diffeq5, y, t, f5, starter, r];
f[t_, y_] = 1 + (y^2);
ColumnForm[diffeq = {y'[t]==f[t, y[t]],y[0] == 0}]

You separate the variables and integrate to get a formula for the solution:

DSolve[diffeq, y[t], t]

Analyze the formula and determine whether the solution escapes to ∞ in finite time or in infinite time.

L.14)

Here's the exponential diffeq:

Clear[diffeq5, y, t, f5, starter, r];
f[t_, y_] = 0.3 y;
ColumnForm[diffeq = {y'[t]==f[t, y[t]],y[0] == 2}]

You know in advance that the formula for the solution is
          y[t] = 2 (E^(0.3 t)).
Reproduce this formula through the technique of separating and integrating.

L.15)

Here's a linear diffeq:

Clear[diffeq5, y, t, f5, starter, r];
f[t_, y_] = -2 y + (E^(-t));
ColumnForm[diffeq = {y'[t]==f[t, y[t]],y[0] == 0}]

This is the same as
        y'[t]+2  y[t]=(E^(-t))  with  y[0] = 2. 
A formula for the solution is:

DSolve[diffeq, y[t], t]

Reproduce this formula by hitting with an integrating factor and then integrating out.

L.16)

Here is the diffeq of the leaking bucket:

Clear[diffeq5, y, t, f5, starter, r];
f[t_, y_] = -0.5 (Sqrt[y]);
ColumnForm[bucketdiffeq = {y'[t]==f[t, y[t]],y[0] == 4}]

You ask Mathematica for the formulas for the solution and you get:

N[DSolve[bucketdiffeq, y[t], t], 4]

You plot both results:

endtime = 8; Plot[{(((-2 - 0.25 t))^2), (((2 - 0.25 t))^2)}, {t, 0, 
        endtime}, PlotStyle -> {{Thickness[0.015]}}, 
      AxesLabel -> {"t", "y[t]"}, 
      AspectRatio -> (1/GoldenRatio)];

One of the plots is correct; one is bogus. Which plot is correct?

Then you plot for a longer time interval:

endtime = 16; Plot[{(((-2 - 0.25 t))^2), (((2 - 0.25 t))^2)}, {t, 0, 
        endtime}, PlotStyle -> {{Thickness[0.015]}}, 
      AxesLabel -> {"t", "y[t]"}, 
      AspectRatio -> (1/GoldenRatio)];

Is either plot entirely correct?  Why?
Pencil in the correct plot.
How does the danger zone begin to account for this madness?