Notebook to support Exercise 3.4.9, modeling a cooling potato.

The data, in time/temperature pairs:

data = {{0, 204}, {2, 193}, {4, 184}, {8, 169}, {10, 162}, {13, 156}, {17, 149}, {20, 143}, {24, 138}, {30, 130}}

A plot:

plt1=ListPlot[data,AxesLabel->{"time (minutes)","Temperature"},PlotStyle->{Red}]

The number of data points is

n = Length[data]

The temperature might be modeled by the function

u[t_] = 72+132*Exp[-k*t]

A least-squares function can be formed as

SS = Sum[(u[data[[j,1]]]-data[[j,2]])^2,{j,1,n}]

Now adjust k to minimize this.