Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

For one-dimensional data, here is another possibility, using the lagrange_polynomial method:

sage: data6
[(-1/6, 512/693*sqrt(6)),
 (-1/3, 16/15*sqrt(3)),
 (-1/2, 1/3*(4*sqrt(2))),
 (-2/3, 1/4*sqrt(6)*pi),
 (-5/6, integrate(e^(-u)/sqrt(-6/5*e^(-5/6*u) + 6/5), u, 0, +Infinity)),
 (-1, 2)]
sage: anneau=RDF['x']
sage: anneau.lagrange_polynomial(data6)
0.0002415622388688374*x^5 + 0.0027759117124809404*x^4 + 0.011064333541062326*x^3 + 0.014644177822466752*x^2 - 0.22142334301181213*x + 1.7724624632331714