]> gitweb.michael.orlitzky.com - sage.d.git/blobdiff - mjo/interpolation.py
Add a note about the nonstandard name "Motzkin decomposition."
[sage.d.git] / mjo / interpolation.py
index cbba68e03a4e2bd3ae5601ec51844aada3cf435d..4be95e2463b7d4b1592a5f4e6cf86ba54e36da7f 100644 (file)
@@ -48,7 +48,7 @@ def lagrange_coefficient(k, x, xs):
 
         sage: xs = [ -pi/2, -pi/6, 0, pi/6, pi/2 ]
         sage: lagrange_coefficient(0, x, xs)
-        1/8*(pi - 6*x)*(pi - 2*x)*(pi + 6*x)*x/pi^4
+        1/8*(pi + 6*x)*(pi - 2*x)*(pi - 6*x)*x/pi^4
 
     """
     numerator = lagrange_psi(x, xs)/(x - xs[k])
@@ -60,7 +60,7 @@ def lagrange_coefficient(k, x, xs):
 
 def lagrange_polynomial(x, xs, ys):
     """
-    Return the Lagrange form of the interpolation polynomial in `x` of
+    Return the Lagrange form of the interpolating polynomial in `x`
     at the points (xs[k], ys[k]).
 
     INPUT:
@@ -183,7 +183,7 @@ def divided_difference(xs, ys):
 
     We try something entirely symbolic::
 
-        sage: f = function('f'x)
+        sage: f = function('f')(x)
         sage: divided_difference([x], [f(x=x)])
         f(x)
         sage: x1,x2 = SR.var('x1,x2')