/*************** -*- Mode: MACSYMA; Package: MAXIMA -*-  ******************/
/***************************************************************************
***                                                                    *****
***     Copyright (c) 1984 by William Schelter,University of Texas     *****
***     All rights reserved                                            *****
***************************************************************************/

/* PRODUCED USING TOPS 20 AS GUIDE AND CHECKED ON 3600 
This and the rtest*.mac files can be run using the command
Batch("cl-maxima-source:maxima;rtest1.mac",test);   and a
log file will be written recording the items which the testing
function does not find the same as those answers listed in this file.
The test is based on manual.demo, with the answers obtained from
tops 20 macsyma, and checked on the 3600 with cl-maxima.  
Although we have tried to put sufficient kills in, to eliminate
errors caused by previous definitions, you may get some additional
errors if you rerun the tests, or run some out of order. */

(?fmakunbound(f),kill(functions,values,arrays));
done;
f(x):=x^2+y;
f(x):=x^2+y$
f(2);
y+4$
ev(f(2),y:7);
11$
f(x):=sin(x)^2+1;
f(x):=sin(x)^2+1$
f(x+1);
sin(x+1)^2+1$
g(y,z):=f(z)+3*y;
g(y,z):=f(z)+3*y$
ev(g(2*y+z,-0.5),y:7);
3*(z+14)+1.22984884706593$
h(n):=sum(i*x^i,i,0,n);
h(n):=sum(i*x^i,i,0,n)$
functions;
[f(x),g(y,z),h(n)]$
t[n](x):=ratexpand(2*x*t[n-1](x)-t[n-2](x));
t[n](x):=ratexpand(2*x*t[n-1](x)-t[n-2](x))$
t[0](x):=1;
t[0](x):=1$
t[1](x):=x;
t[1](x):=x$
t[4](y);
8*y^4-8*y^2+1$
g[n](x):=sum(ev(x),i,n,n+2);
g[n](x):=sum(ev(x),i,n,n+2)$
h(n,x):=sum(ev(x),i,n,n+2);
h(n,x):=sum(ev(x),i,n,n+2)$
g[2](i^2);
3*i^2$
h(2,i^2);
29$
p[n](x):=ratsimp(1/(2^n*n!)*diff((x^2-1)^n,x,n));
p[n](x):=ratsimp(1/(2^n*n!)*diff((x^2-1)^n,x,n))$
q(n,x):=ratsimp(1/(2^n*n!)*diff((x^2-1)^n,x,n));
q(n,x):=ratsimp(1/(2^n*n!)*diff((x^2-1)^n,x,n))$
p[2];
lambda([x],(3*x^2-1)/2)$
p[2](y+1);
(3*(y+1)^2-1)/2$
q(2,y);
(3*y^2-1)/2$
p[2](5);
37$
f[i,j](x,y):=x^i+y^j;
f[i,j](x,y):=x^i+y^j$
g(fun,a,b):=print(fun," applied to ",a," and ",b," is ",fun(a,b));
g(fun,a,b):=print(fun," applied to ",a," and ",b," is ",fun(a,b))$
g(f[2,1],sin(%pi),2*c);
2*c$
