Programming
La grange interpolation polynomial

Question Description

DESCRIPTION

Application to chemical engineering

The density of the potassium carbonate aqueous solution varies with temperature and concentration. In an experiment to determine the density of carbonate was considered constant temperature and concentration was varied , giving the table:

x        y

4     1.0276

12    1.1013

20    1.1801

28    1.2652

38    1.3480

45    1.4120

Write Scilab function is to use the Lagrange interpolation polynomial of the first degree to interpolate the value given by the user using the values ​​of the vectors " x " and "y" passed as parameter.

To improve the approximation , the function must find the two values ​​of X closest and use them in the polynomial . For example , if the user indicates that he wants to interpolate the value 25 , the program must use X0 = X1 = 20 and 28.

Example of program execution :

à  x = [4 , 12, 20 , 28, 38 , 45] à  y = [1.0276, 1.1013 , 1.1801 , 1.2652 , 1.3480 , 1.4120 ] à  lagrange (25, x , y)

X values ​​that were used to interpolate are 20 and 28 The estimate of 25 is 1.2332875

à  lagrange (15, x , y) X values ​​that were used to interpolate are: 12 and 20

The estimate of 15 is 1.13085

à  lagrange (50, x , y) can not get an estimated 50 .

à  lagrange (2, x , y) can not get an estimated 2


Final Answer

Thank you for the opportunity to help you with your question!

in general, do not need to be licensed or pass any standardized (or governmentally regulated) certification tests in order to call themselves "programmers" or even "software engineers.

Please let me know if you need any clarification. I'm always happy to answer your questions.

fitting k (56)
UIUC

Anonymous
I was on a very tight deadline but thanks to Studypool I was able to deliver my assignment on time.

Anonymous
The tutor was pretty knowledgeable, efficient and polite. Great service!

Anonymous
I did not know how to approach this question, Studypool helped me a lot.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors