10 - --- x + --- x - 3 x + 1
13 The computation uses the following recurrence relation.
19 n*L(x,n,k) = (2*(n-1)+1-x+k)*L(x,n-1,k) - (n-1+k)*L(x,n-2,k)
21 In the "for" loop i = n-1 so the recurrence relation becomes
23 (i+1)*L(x,n,k) = (2*i+1-x+k)*L(x,n-1,k) - (i+k)*L(x,n-2,k)
48 if (p2
== symbol(NIL
))
77 push_symbol(LAGUERRE
);
89 Y
= X
; // do this when X is an expr
93 push(symbol(SECRETX
));
112 for (i
= 0; i
< n
; i
++) {
118 push_integer(2 * i
+ 1);
152 "laguerre(x,1)-(-x+1)",
155 "laguerre(x,2)-1/2*(x^2-4*x+2)",
158 "laguerre(x,3)-1/6*(-x^3+9*x^2-18*x+6)",
164 "laguerre(x,1,k)-(-x+k+1)",
167 "laguerre(x,2,k)-1/2*(x^2-2*(k+2)*x+(k+1)*(k+2))",
170 "laguerre(x,3,k)-1/6*(-x^3+3*(k+3)*x^2-3*(k+2)*(k+3)*x+(k+1)*(k+2)*(k+3))",
173 "laguerre(a-b,10)-eval(subst(a-b,x,laguerre(x,10)))",
180 test(__FILE__
, s
, sizeof s
/ sizeof (char *));