Question: IN C LANGUAGE! Create a program that interpolate a polynomial using lagrange interpolation by satisfying all these requirement: a.Using function: double lagrange (double x_int[ ],

IN C LANGUAGE!

Create a program that interpolate a polynomial using lagrange interpolation by satisfying all these requirement:

a.Using function:

double lagrange(double x_int[ ], double y_int[ ], int n, double x) which calculates the value of the n-th order lagranges polynomial Pn(x) defined for the set of nodes IN C LANGUAGE! Create a program that interpolate , for a given value of x.

IN C LANGUAGE! Create a program that interpolate

b. Create an input file interpolation_data.ini on the disk containing :

5 // order of P n (x)

0.0 1.0 // x_int(0) , y_int(0)

1.0 3.0

3.0 -2.0

5.0 -5.0

8.0 -1.0

10.0 2.0 // x_int(n) , y_int(n)

c. In the main function, write the following actions:

? It opens and reads the file interpolation_data.ini

? It calculates the interpolation polynomial IN C LANGUAGE! Create a program that interpolate at 101 equally spaced points in the closed interval [x(0),x(n)].

? It opens and writes the output disk file interpolation_results.dat in the following manner:

IN C LANGUAGE! Create a program that interpolate IN C LANGUAGE! Create a program that interpolate

IN C LANGUAGE! Create a program that interpolate a polynomial using lagrange

interpolation by satisfying all these requirement: a.Using function: double lagrange(double x_int[ ],

......................................

IN C LANGUAGE! Create a program that interpolate IN C LANGUAGE! Create a program that interpolate

(0), y (0), n), y(n) (0), y (0), n), y(n)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!