1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
%mathpiper
Use("proposed.rep/xSolve.mpi");
%/mathpiper
%output,preserve="false"
Result: True
. %/output
%mathpiper,scope="private"
// a bunch of expressions for testing
expressions := {};
Push( expressions, 4 );
Push( expressions, -4 );
Push( expressions, 3*y^2 - Sin(Pi*y) );
Push( expressions, a*x+b*x^2 );
Push( expressions, -a*x+b*x^2 );
Push( expressions, -a*x-b*x^2 );
Push( expressions, +a*x+b*x^2 );
Push( expressions, a*x + b*x^2-c/x+d/x^2 );
Push( expressions, a1/(b1+c1*x^2) );
Push( expressions, x+Sin(x) );
Push( expressions, x-Sin(x) );
Push( expressions, a*x+Sin(x) );
Push( expressions, Sin(x)-x );
Push( expressions, Sqrt(x) );
Push( expressions, Sqrt(1/x) );
Push( expressions, Sqrt(1/(x^2+1)) );
Push( expressions, Sqrt((1-x)/(1+x)) );
Push( expressions, 1/x+1/x^2 );
Push( expressions, a/(x+1)+b/(x-1) );
Push( expressions, (1-x)^(3/2) );
Push( expressions, a*(x-3*x^2) );
Push( expressions, (x+2*x^3)/c );
nn := Length( expressions );
For( i:=1, i<=nn, i++ )
[
f := PopBack( expressions );
Echo("-------------------------------------------------------------------");
Echo(">>> new expression: ",f);
//r:=V(xTerms(f));
r:=xTerms2(f);
Echo({r});
];
%/mathpiper
|