Example 13.1.1. Average temperature.
Suppose you have modelled the outdoor temperature in some location over a twenty-four hour period as
\begin{align*}
T(t) \amp = \frac{t^4 - 48 t^3 + 576 t^2 + 14000}{1400} \amp 0 \amp \le t \le 24 \text{,}
\end{align*}
where \(T(t)\) is expressed in degrees Celsius, \(t\) is time in hours.
What was the average temperature over that period? We could answer this by imagining that \(T(t)\) is not a quantity function but a rate function. Instead of being expressed in degrees, we could think of \(T(t)\) as being expressed in degree-hours per hour. (With unit analysis, we see that this made-up unit is really just degrees, as hours per hour “cancels” out.) Then we could calculate how many degree-hours accumulated over this period, using Pattern 7.4.4 to assist with the calculation.
\begin{align*}
\ccmint{0}{24}{T(t)}{t}
\amp = \ccmint{0}{24}{\frac{t^4 - 48 t^3 + 576 t^2 + 14000}{1400}}{t}\\
\amp = \ccmint{0}{24}{\frac{t^4}{1400} - \frac{6 t^3}{175} + \frac{72 t^2}{175} + 10}{t} \\
\amp = \frac{{24}^5}{5 \cdot 1400} - \frac{6 \cdot {24}^4}{4 \cdot 175} + \frac{72 {24}^3}{3 \cdot 175} + 10 \cdot 24 \\
\amp = \frac{375888}{875}
\end{align*}
To get the average “rate”, we divide by the duration:
\begin{align*}
\avg{T} \amp = \frac{\text{accumulation}}{\text{duration}} \\
\amp = \frac{375888/875}{24} \\
\amp = 15662/875 \\
\amp \approx 17.9 \text{.}
\end{align*}
But this isn’t really a rate, we were only pretending it was a rate in the made-up units of degree-hours per hour. Ignoring the hours-per-hour, it seems that the average temperature over that twenty-four hour period was approximately 17.9 °C.