Answered step by step
Verified Expert Solution
Question
1 Approved Answer
python code must be used for this problem. please show all code thanks Exercise 2* Let (20, f(20)), (x1, f(x1)),..., (in, f(n)) be given points
python code must be used for this problem. please show all code thanks
Exercise 2* Let (20, f(20)), (x1, f(x1)),..., (in, f(n)) be given points in the (x,y) plane with X0, 11, ..., In distinct, and let n k-1 Pn(2) = f(20) + f(:20,21,..., Ik] (:1 - Ij) k=1 j=0 be the polynomial of degree at most n (in Newton's Divided Difference form) that interpolates the data. a) Write a computer program for computing the divided-difference coefficients f [co] and f[20, 21, ... , Ik] for k= 1,..., n (see Algorithm 3.2 in Section 3.3 of the textbook). b) Write a separate subroutine for computing the value of Pn(3) at any given I. c) Test your program on the following problem: a census of the population of the United States is taken every 10 years. The population from 1950 to 2010, in thousands on people, is given in the following table year (c) 1950 1960 1970 1980 1990 | 2000 | 2010 population (y) 150,697 179,323 203,302 226,542 249,633 281,422 308,746 Approximate the population in 1965, 1975 and 2008 from the polynomial interpolating the data given in the table. Exercise 2* Let (20, f(20)), (x1, f(x1)),..., (in, f(n)) be given points in the (x,y) plane with X0, 11, ..., In distinct, and let n k-1 Pn(2) = f(20) + f(:20,21,..., Ik] (:1 - Ij) k=1 j=0 be the polynomial of degree at most n (in Newton's Divided Difference form) that interpolates the data. a) Write a computer program for computing the divided-difference coefficients f [co] and f[20, 21, ... , Ik] for k= 1,..., n (see Algorithm 3.2 in Section 3.3 of the textbook). b) Write a separate subroutine for computing the value of Pn(3) at any given I. c) Test your program on the following problem: a census of the population of the United States is taken every 10 years. The population from 1950 to 2010, in thousands on people, is given in the following table year (c) 1950 1960 1970 1980 1990 | 2000 | 2010 population (y) 150,697 179,323 203,302 226,542 249,633 281,422 308,746 Approximate the population in 1965, 1975 and 2008 from the polynomial interpolating the data given in the tableStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started