Least-squares method : Approximation in 3rd order polynomial equation

Find the approximation in the 3rd order polynomial equation for the heat capacity of carbon dioxide shown in the literature data below.
/* Approximation in 3rd order polynomial (hear capacity
 of carbon dioxide) */

VAR  x(8)    "Temperature [K]"                ..
    ,y(8)    "Heat capacity (lit.) [J/mol.K]" ..
    ,ycal(8) "Heat capacity (calc.)[J/mol.K]" ..
    ,e(8)    "Marginal error"

x = ( 250,   300,   400,   500,   700,   1000, ..
     1200,  1500  )
y = ( 35.44, 37.52, 41.44, 44.68, 49.59, 54.32, ..
      56.34, 58.38 )

ycal = a + b*x + c*x^2 + d*x^3
e = y - ycal

FIND (a#1,b#1,c#1,d#1) LEAST e

OUTPUT a, b, c, d

Explanation


Enter equations and click on the [Solve] button.


Sample problem

The following sample problems will help you understand how EQUATRAN-G works.
Linear equations
Tsuru-Kame-Zan (Japanese traditional problem, means problem of cranes and tortoises)
Nutrients problem
Non-linear equations
Root of 3rd order polynomial equation
Loan calculation
Ordinary differential equations
2nd order ordinary differential equation
Optimization and least square problems
Approximation in 3rd order polynomial equation