Mathematica Tool 4

This Mathematica notebook is designed to be used with Checkpoint 2 in Section 3.2

Needs["VectorFieldPlots`"]

k:=0.5

Plot y=9(e^(-k t))on its slope field.

Slopefield=VectorFieldPlot[#/Norm[#]&[{1,-k y}],{t,-3,7},{y,-20,20},Axes->True,ColorFunction->Hue,AspectRatio-> 1];
SolutionCurve=Plot[9 (E^(-k t)),{t,-3,7},PlotRange->{{-3,7},{-20,20}},PlotStyle->Thickness[0.015]];
Show[Slopefield,SolutionCurve]

Now plot T=21+9(e^(-k t))on its slope field.

Slopefield=VectorFieldPlot[#/Norm[#]&[{1,-k(T-21)}],{t,-3,7},{T,0,40},Axes->True,AxesLabel->{"t","T(t)"},ColorFunction->Hue,AspectRatio-> 1];
SolutionCurve=Plot[21+9 (E^(-k t)),{t,-3,7},PlotRange->{{-3,7},{0,40}},PlotStyle->{Blue,Thickness[0.01]}];
Show[Slopefield,SolutionCurve]