# Problem 1 (Chapter 4) – (25 points) The temperature of the atmosphere decreases with increasing elev

Problem 1 (Chapter 4) – (25 points) The temperature of the atmosphere decreases with increasing elevation. A temperature inversion may occur in some situations, so that the air temperature increases with elevation. A series of temperature measurements on a mountain show the elevation-temperature data as presented in the table below. We want to find a cubic polynomial for temperature variation as a function of elevation using the Newton interpolation method. We call the temperature, function f (2). 5500 6000 6500 7000 7500 8000 8500 9000 Elevation, z (ft) Temperature, T(°F) 55.2 60.3 63.1 66.8 68.7 69.1 68.5 67.1 (a) Using x = 6000, 7000, 8000, 9000, construct (by hand) tables for the divided difference coefficients. (b) Find the cubic polynomial p3(x); we saw an example of a quadratic case at the lecture. (c) How well does the polynomial predict the temperature (T) at 5500 and at 7000 ft? (d) Using Algorithms 4.1 and 4.2, write and run a program to confirm the results of Parts (a) and (b). Do not input the divided difference coefficients in the program! Your code must predict them. (e) On a single graph, plot the function f(x) from the table, and your polynomial p3(x) from Part (b).