Question C.2.4: Consider again Example 1.4.1. Water in a glass measuring cup......

Consider again Example 1.4.1. Water in a glass measuring cup was allowed to cool after being heated to 204°F. The ambient air temperature was 70°F. The measured water temperature at various times is given in the following table.

Obtain a functional description of the water temperature versus time.

600 480 360 240 120 0 Time (sec)
153 160 169 178 191 204 Temperature (°F)
1200 1080 960 840 720 Time (sec)
127 132 137 141 147 Temperature (°F)
Step-by-Step
The 'Blue Check Mark' means that this solution was answered by an expert.
Learn more on how do we answer questions.

From Example 1.4.1, we learned that the relative temperature, ΔT = T − 70 has the exponential form

ΔT = be^{mt}                     (1)

We can find values of m and b by using \boxed{p = polyfit(x,log(y),1)}. The first element p_1 of the vector \boxed{p} will be m, and the second element p_2 will be ln b. We can find b from b = e^{p_2} .

The 'Blue Check Mark' means that either the MATLAB code/script/answer provided in the answer section has been tested by our team of experts; or the answer in general has be fact checked.

Learn more on how do we answer questions.

Script File

The following MATLAB program performs the calculations.

% Enter the data.
time = (0:120:1200);
temp = [204,191,178,169,160,153,147,141,137,132,127];
% Compute the relative temperature and its logarithm.
rel_temp = temp - 70;
log_rel_temp = log(rel_temp);
% Fit a first-degree polynomial.

p = polyfit(time,log_rel_temp,1);
% Compute m and b from the polynomial coefficients.
m = p(1),b = exp(p(2))
% Compute DT (delta T) from (1).
DT = b*exp(m*time);
% Compute J, S, and r squared.
J = sum((DT-rel_temp).^2)
S = sum((rel_temp - mean(rel_temp)).^2)
r2 = 1 - J/S

The results are m = −6.9710 × 10^{−4} and b = 1.2916 × 10^2, and the corresponding function is

\Delta T=b e^{m t} \quad \text { or } \quad T=\Delta T+70=b e^{m t}+70

The quality-of-fit values are J = 47.4850, S = 6.2429 × 10³, and r² = 0.9924, which indicates a very good fit.

Related Answered Questions

Question: C.2.6

Verified Answer:

First obtain the flow rate data in ml/s by dividin...
Question: C.2.2

Verified Answer:

Note that here X is the dependent variable and f i...
Question: C.1.3

Verified Answer:

The least-squares criterion is J=\sum\limit...
Question: C.1.1

Verified Answer:

These data do not lie close to a straight line whe...
Question: C.1.2

Verified Answer:

Subtracting 10 from all the x values and 11 from a...