Mathematica Tool 2

This Mathematica notebook is designed for  use with Activity 2 in Section 5.4

We plot the sunrise and sunset data for the first reference.

Months={1,2,3,4,5,6,7,8,9,10,11,12};
RiseTime={446.3,421.8,379.5,332.4,296.2,283.2,296.7,323.2,351.3,380.9,414.0,442.2};
SetTime={1031.9,1065.7,1097.6,1127.7,1157.2,1177.6,1174.0,1143.4,1097.4,1049.9,1015.5,1008.7};
RisePlot=ListPlot[Partition[Riffle[Months,RiseTime],2],PlotRange->{{0,13}, {0,1200}}, PlotStyle->{Blue,PointSize[0.02]}];
SetPlot =ListPlot[Partition[Riffle[Months,SetTime],2],PlotRange->{{0,13}, {0,1200}}, PlotStyle->{Red,PointSize[0.02]}];
Show[RisePlot,SetPlot]

We calculate the monthly averages of time of daylight and plot that data.

Daylight = SetTime-RiseTime;
DaylightPlot=ListPlot[Partition[Riffle[Months,Daylight],2],PlotRange->{{0,13}, {400,1000}}, PlotStyle->PointSize[0.02]]

Now enter values for A, B ,(Subscript[C, 1])and δ  ((Subscript[C, 1])and δ standing in for C and D) , and compare the graph of the model function to the daylight data.

A="???";
B="???";
(Subscript[C, 1])="???";
δ="???";
f[t_]:=A+B Sin[(Subscript[C, 1])(t-δ)]
ModelPlot=Plot[f[t],{t,0,12},PlotRange->{{0,13}, {400,1000}}, PlotStyle->Red];
Show[ModelPlot,DaylightPlot]