Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
A cup of tea is degrees hotter than the room at time 0. The excess temperature (above the room) at 0, 5, 10, ..., 30 minutes is degrees. Draw the excess temperature against time in two panels: one with a linear scale and one with a log scale. On the log panel, the points should lie on a straight line. Use np.polyfit(t, np.log(excess), 1), which gives the slope and the intercept of the best straight line through the points of , to find the time constant, which is .
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.
Plan. If the excess is , then , which is a straight line in with the slope . So the log graph is a straight line, and the slope gives the rate.
Check. The slope is , so the time constant is 12 minutes. In every 12 minutes the excess falls to (about 37 percent) of its value.
Answer: the points lie on a straight line on the log panel. The slope is per minute and the time constant is 12 minutes.
Log in to join the discussion.
Loading…