Question: Problem 1 : The following data was determined experimentally and represent discrete values of a function for which no formula is known: ( THE DATA
Problem : The following data was determined experimentally and represent discrete values of a function for which no formula is known:
THE DATA TABLE IS IN THE PICTURE PROVIDED
You can use linear interpolation to approximate the value of the function fx for any value of x that falls between the smallest and largest value available in the table. The procedure is as follows:
Find the two xs in the table between which the given x value falls. These are called xi and Xi
Identify the corresponding values of fx and fxi
Perform interpolation between these to find the value of the function using the following formula:
THE FORMULA IS ALSO IN THE PROVIDED PICTURE
Develop the program that calculates the approximation of the function for the following values of xs: and The program will be executed for each of these values, that is five times.If the value of x is outside the range of values in the table, the program should output a message. The IDE console can be used to get the outputs where the value of x and the corresponding result should appear.Solve the problem using two onedimensional arrays, one that holds the xs and another that holds the fxs The values must be read from an external file.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
