ratinterpol does not work with polynomial expressions
Subject: ratinterpol does not work with polynomial expressions
From: andre maute
Date: Sat, 28 Dec 2013 03:29:26 +0100
Hi list,
I have the following unexpected behavior with ratinterpol.
I would have had expected the first two ratinterpol commands
returning something containing the unknown b.
Andre
------ ratinterpol-20131227.mac ------
display2d : false;
load("interpol");
h :
[
[1,-(2*b+13)*1/12],
[2,-(2*b+15)*1/7],
[3,-(2*b+17)*3/16],
[4,-(2*b+19)*2/9],
[5,-(2*b+21)*1/4],
[6,-(2*b+23)*3/11]
];
ratinterpol(h,1);
ratinterpol(h,2);
h :
[
[1,-1/12],
[2,-1/7],
[3,-3/16],
[4,-2/9],
[5,-1/4],
[6,-3/11]
];
ratinterpol(h,1);
------ ratinterpol-20131227.mac ------
------ output ------
[user at localhost ~]$ maxima -b ratinterpol-20132712.mac
Maxima 5.31.3 http://maxima.sourceforge.net
using Lisp SBCL 1.1.8-2.fc19
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
STYLE-WARNING: redefining MAXIMA::$FILE_TYPE in DEFUN
(%i1) batch("ratinterpol-20132712.mac")
read and interpret file: /home/user/ratinterpol-20132712.mac
(%i2) display2d:false
(%o2) false
(%i3) load("interpol")
(%o3) "/home/user/opt/maxima/share/maxima/5.31.3/share/numeric/interpol.mac"
(%i4)
h:[[1,(-(13+2*b)*1)/12],[2,(-(15+2*b)*1)/7],[3,(-(17+2*b)*3)/16],[4,(-(19+2*b)*2)/9],[5,(-(21+2*b)*1)/4],[6,(-(23+2*b)*3)/11]]
(%o4)
[[1,(-2*b-13)/12],[2,(-2*b-15)/7],[3,3*(-2*b-17)/16],[4,2*(-2*b-19)/9],[5,(-2*b-21)/4],[6,3*(-2*b-23)/11]]
(%i5) ratinterpol(h,1)
(%o5) (1500441*x/16+144)/(x^4-55*x^3/2+1415*x^2/4-24275*x/8-579441/8)
(%i6) ratinterpol(h,2)
(%o6) (-x^2-13*x/2)/(x+5)
(%i7)
h:[[1,(-1)/12],[2,(-1)/7],[3,(-3)/16],[4,(-2)/9],[5,(-1)/4],[6,(-3)/11]]
(%o7) [[1,-1/12],[2,-1/7],[3,-3/16],[4,-2/9],[5,-1/4],[6,-3/11]]
(%i8) ratinterpol(h,1)
(%o8) -x/(2*(x+5))
(%o8) "/home/user/ratinterpol-20132712.mac"
------ output ------