– Congratulations on your new job!
– Oh, you mean the weather man thing?! That’s nothing! Anyone can do it.
– Really? I thought it was kind of hard.
– Not at all. Look at me!
– But what about all those averages you have to calculate?
– What do you mean? What averages?
– “The average temperature yesterday was 18°C.” How do you do that?
– We have a guy who adds the max and min temperature of the day and divides by two.
– How does he know the max and min temperatures? Does he stick around all day looking at the thermometer?
– He did that until recently. Now we have bought him a special thermometer so he doesn’t have to.
– I see.
– Do you know what kind of weather we will have tomorrow? The show starts in thirty minutes and I could need some help.
– One question. I have one question that just popped into my head. Do you have time?
– How many people work on the set?
– Ten in all, I think.
– Do you know their heights?
– Their heights?
– No, but I could find out if you are interested.
– I want to calculate the average height.
– Oh, that?! You don’t need the height of all of them for that. I will find out the tallest guy and the shortest and just add their heights and divide by two.
– Will that give me the average height?
– You are talking to the weather man! If I don’t know, who does?
– Have you met our new neighbour?
– I saw him the other day, but I did not talk to him. He looks a bit strange.
– What do you mean?
– I don’t know. Just strange.
– Stranger than me?
– Sometimes you are strange too!
– Like when?
– You remember when you wrote down the temperatures outside every minute for an entire day?
– You find that strange? I just wanted to find the average temperature for the day.
– How would you do that?
– Add up all my readings and divide by 1440.
– Why 1440?
– That’s how many readings I would have had.
– “Would have had”! Sounds like the story of your life, doesn’t it?
– I had to stop at reading 1334 as my fingers cramped.
– Is that what you call it when you give up?
– By the way, I talked to the new neighbour yesterday!
– Really?! What did you talk about. Don’t tell me you talked about your average temperature project?
– We did, actually. He was very interested.
– I told you he was weird!
– He asked me if I could give him the temperatures I measured at 4, 8, 16, and 22 hours.
– Is he a military man?
– I don’t think so. Anyway, I told him the temperatures were 5, 12, 24, and 15°C. Do you know what he did then?
– Hit you on the fingers?
– Don’t be silly! He invited me inside and showed me this graph on his computer.
– And why one earth did he do that?
– Can’t you see what it is?
– It is obviously the graph of
f(x) = -65/6048*x^3+121/432*x^2-11/27*x+536/189,
but I don’t see how that relates to anything.
– Look carefully at the values for x = 4, 8, 16, and 22!
– I see, the graph shows the temperatures for the day you were measuring. But, how come?! You said you only gave him four values.
– I did! He told me that if one assumes the temperature follows the graph of a third degree polynomial, four points is enough to draw it.
– And does the rest of the graph match your data?
– I haven’t had time to check that part yet, but there is more!
– He showed you another graph?
– He told me how to find the average temperature exactly.
– Anyone can do that, just integrate the function from 0 to 24 and divide by 24. It comes to 14.582, if I am not very much mistaken.
– Your number crunching skills do not stop to amaze me! However, he did something simpler.
– Like what?
– He added f(5.071667) and f(18.928333) and divided by two.
– What did he get?
– Get out of here!
Will the neighbour’s method always work? How did he pick his two points? Will other point pairs work? What is the neighbour’s name? Does the temperature during a day really follow a third degree polynomial?
Problem kindly suggested by John Shonder.
To research the problem I used MapleV Student Edition.
interp([4,8,16, 22], [5,12,24, 15], x) ;
gave me the third degree polynomial called f(x) in the story using Lagrange interpolation formula.
gave me the graph.
evalf((int(-65/6048*x^3+121/432*x^2-11/27*x+536/189, x=0..24))/24, 5);
gave me the definite integral divided by 24, i.e. 14.582.
By the way, I had to delete the file Opengl32.dll in the folder BIN.wnt to get Maple to read my key punches.