File r36/xlog/SOLVE.LOG artifact df23184c55 part of check-in ab67b20f90


REDUCE 3.6, 15-Jul-95, patched to 6 Mar 96 ...


% Demonstration of the REDUCE SOLVE package.

on fullroots;

   % To get complete solutions.

% Simultaneous linear fractional equations.

solve({(a*x+y)/(z-1)-3,y+b+z,x-y},{x,y,z});


      - 3*(b + 1)
{{x=--------------,
        a + 4

      - 3*(b + 1)
  y=--------------,
        a + 4

      - a*b - b + 3
  z=----------------}}
         a + 4



% Use of square-free factorization together with recursive use of
% quadratic and binomial solutions.

solve((x**6-x**3-1)*(x**5-1)**2*x**2);


Unknown: x

    2*sqrt( - sqrt(5) - 5) + sqrt(10) - sqrt(2)
{x=---------------------------------------------,
                     4*sqrt(2)

     - 2*sqrt( - sqrt(5) - 5) + sqrt(10) - sqrt(2)
 x=------------------------------------------------,
                      4*sqrt(2)

    2*sqrt(sqrt(5) - 5) - sqrt(10) - sqrt(2)
 x=------------------------------------------,
                   4*sqrt(2)

     - 2*sqrt(sqrt(5) - 5) - sqrt(10) - sqrt(2)
 x=---------------------------------------------,
                     4*sqrt(2)

 x=1,

 x=0,

                    1/3
    ( - sqrt(5) + 1)   *(sqrt(3)*i - 1)
 x=-------------------------------------,
                     1/3
                  2*2

                       1/3
     - ( - sqrt(5) + 1)   *(sqrt(3)*i + 1)
 x=----------------------------------------,
                       1/3
                    2*2

                    1/3
    ( - sqrt(5) + 1)
 x=---------------------,
            1/3
           2

                 1/3
    (sqrt(5) + 1)   *(sqrt(3)*i - 1)
 x=----------------------------------,
                    1/3
                 2*2

                    1/3
     - (sqrt(5) + 1)   *(sqrt(3)*i + 1)
 x=-------------------------------------,
                     1/3
                  2*2

                 1/3
    (sqrt(5) + 1)
 x=------------------}
           1/3
          2


multiplicities!*;


{2,2,2,2,2,2,1,1,1,1,1,1}



% A singular equation without and with a consistent inhomogeneous term.

solve(a,x);


{}


solve(0,x);


{x=arbcomplex(1)}


off solvesingular;



solve(0,x);


{}



% Use of DECOMPOSE to solve high degree polynomials.

solve(x**8-8*x**7+34*x**6-92*x**5+175*x**4-236*x**3+226*x**2-140*x+46);


Unknown: x

    sqrt( - sqrt( - 4*sqrt(3) - 3) - 3)*sqrt(2) + 2
{x=-------------------------------------------------,
                           2

     - sqrt( - sqrt( - 4*sqrt(3) - 3) - 3)*sqrt(2) + 2
 x=----------------------------------------------------,
                            2

    sqrt( - sqrt(4*sqrt(3) - 3) - 3)*sqrt(2) + 2
 x=----------------------------------------------,
                         2

     - sqrt( - sqrt(4*sqrt(3) - 3) - 3)*sqrt(2) + 2
 x=-------------------------------------------------,
                           2

    sqrt(sqrt( - 4*sqrt(3) - 3) - 3)*sqrt(2) + 2
 x=----------------------------------------------,
                         2

     - sqrt(sqrt( - 4*sqrt(3) - 3) - 3)*sqrt(2) + 2
 x=-------------------------------------------------,
                           2

    sqrt(sqrt(4*sqrt(3) - 3) - 3)*sqrt(2) + 2
 x=-------------------------------------------,
                        2

     - sqrt(sqrt(4*sqrt(3) - 3) - 3)*sqrt(2) + 2
 x=----------------------------------------------}
                         2


solve(x**8-88*x**7+2924*x**6-43912*x**5+263431*x**4-218900*x**3+
           65690*x**2-7700*x+234,x);


{x=sqrt( - i + 116) + 11,

 x= - sqrt( - i + 116) + 11,

 x=sqrt(i + 116) + 11,

 x= - sqrt(i + 116) + 11,

 x=4*sqrt(7) + 11,

 x= - 4*sqrt(7) + 11,

 x=2*sqrt(30) + 11,

 x= - 2*sqrt(30) + 11}



% Recursive use of inverses, including multiple branches of rational
% fractional powers.

solve(log(acos(asin(x**(2/3)-b)-1))+2,x);


                 1                        1
{x=sqrt(sin(cos(----) + 1) + b)*(sin(cos(----) + 1) + b),
                  2                        2
                 e                        e

                    1                        1
 x= - sqrt(sin(cos(----) + 1) + b)*(sin(cos(----) + 1) + b)}
                     2                        2
                    e                        e



% Square-free factors that are unsolvable, being of fifth degree,
% transcendental, or without a defined inverse.

operator f;



solve((x-1)*(x+1)*(x-2)*(x+2)*(x-3)*(x*log(x)-1)*(f(x)-1),x);


{f(x) - 1=0,

 x=root_of(log(x_)*x_ - 1,x_,tag_2),

 x=3,

 x=2,

 x=1,

 x=-1,

 x=-2}


multiplicities!*;


{1,1,1,1,1,1,1}



% Factors with more than one distinct top-level kernel, the first factor
% a cubic. (Cubic solution suppressed since it is too messy to be of
% much use).

off fullroots;



solve((x**(1/2)-(x-a)**(1/3))*(acos x-acos(2*x-b))* (2*log x
          -log(x**2+x-c)-4),x);


     2            4          4     2
    e *(sqrt(4*c*e  - 4*c + e ) - e )
{x=-----------------------------------,
                   4
               2*(e  - 1)

        2            4          4     2
     - e *(sqrt(4*c*e  - 4*c + e ) + e )
 x=--------------------------------------,
                     4
                 2*(e  - 1)

            2              3     2
 x=root_of(a  - 2*a*x_ - x_  + x_ ,x_,tag_7),

 x=b}


on fullroots;



% Treatment of multiple-argument exponentials as polynomials.

solve(a**(2*x)-3*a**x+2,x);


    2*arbint(3)*i*pi + log(2)
{x=---------------------------,
             log(a)

    2*arbint(2)*i*pi
 x=------------------}
         log(a)



% A 12th degree reciprocal polynomial that is irreductible over the
% integers, having a reduced polynomial that is also reciprocal.
% (Reciprocal polynomials are those that have symmetric or antisymmetric
% coefficient patterns.) We also demonstrate suppression of automatic
% integer root extraction.

solve(x**12-4*x**11+12*x**10-28*x**9+45*x**8-68*x**7+69*x**6-68*x**5+
45*x**4-28*x**3+12*x**2-4*x+1);


Unknown: x

    sqrt( - sqrt(5) - 3)
{x=----------------------,
          sqrt(2)

     - sqrt( - sqrt(5) - 3)
 x=-------------------------,
            sqrt(2)

    2*sqrt( - sqrt(3)*i - 9) - sqrt(6)*i + sqrt(2)
 x=------------------------------------------------,
                      4*sqrt(2)

     - 2*sqrt( - sqrt(3)*i - 9) - sqrt(6)*i + sqrt(2)
 x=---------------------------------------------------,
                        4*sqrt(2)

    2*sqrt( - 3*sqrt(5) - 1) - sqrt(10) + 3*sqrt(2)
 x=-------------------------------------------------,
                       4*sqrt(2)

     - 2*sqrt( - 3*sqrt(5) - 1) - sqrt(10) + 3*sqrt(2)
 x=----------------------------------------------------,
                        4*sqrt(2)

    2*sqrt(sqrt(3)*i - 9) + sqrt(6)*i + sqrt(2)
 x=---------------------------------------------,
                     4*sqrt(2)

     - 2*sqrt(sqrt(3)*i - 9) + sqrt(6)*i + sqrt(2)
 x=------------------------------------------------,
                      4*sqrt(2)

    2*sqrt(3*sqrt(5) - 1) + sqrt(10) + 3*sqrt(2)
 x=----------------------------------------------,
                     4*sqrt(2)

     - 2*sqrt(3*sqrt(5) - 1) + sqrt(10) + 3*sqrt(2)
 x=-------------------------------------------------,
                       4*sqrt(2)

    i*(sqrt(5) - 1)
 x=-----------------,
           2

    i*( - sqrt(5) + 1)
 x=--------------------}
            2



% The treatment of factors with non-unique inverses by introducing
% unique new real or integer indeterminant kernels.

solve((sin x-a)*(2**x-b)*(x**c-3),x);


{x=2*arbint(6)*pi + asin(a),

 x=2*arbint(6)*pi - asin(a) + pi,

    2*arbint(5)*i*pi + log(b)
 x=---------------------------,
             log(2)

    1/c       2*arbint(4)*pi          2*arbint(4)*pi
 x=3   *(cos(----------------) + sin(----------------)*i)}
                    c                       c



% Automatic restriction to principal branches.

off allbranch;



solve((sin x-a)*(2**x-b)*(x**c-3),x);


{x=asin(a),

    1/c
 x=3   ,

    log(b)
 x=--------}
    log(2)



% Regular system of linear equations.

solve({2*x1+x2+3*x3-9,x1-2*x2+x3+2,3*x1+2*x2+2*x3-7}, {x1,x2,x3});


{{x1=-1,x2=2,x3=3}}



% Underdetermined system of linear equations.

on solvesingular;



solve({x1-4*x2+2*x3+1,2*x1-3*x2-x3-5*x4+7,3*x1-7*x2+x3-5*x4+8},
      {x1,x2,x3,x4});


{{x1=4*arbcomplex(8) + 2*arbcomplex(7) - 5,

  x2=arbcomplex(8) + arbcomplex(7) - 1,

  x3=arbcomplex(7),

  x4=arbcomplex(8)}}



% Inconsistent system of linear equations.

solve({2*x1+3*x2-x3-2,7*x1+4*x2+2*x3-8,3*x1-2*x2+4*x3-5},
      {x1,x2,x3});


{}



% Overdetermined system of linear equations.

solve({x1-x2+x3-12,2*x1+3*x2-x3-13,3*x2+4*x3-5,-3*x1+x2+4*x3+20},
      {x1,x2,x3});


{{x1=9,x2=-1,x3=2}}



% Degenerate system of linear equations.

operator xx,yy;



yy(1) := -a**2*b**3-3*a**2*b**2-3*a**2*b+a**2*(xx(3)-2)-a*b-a*c+a*(xx(2)
         -xx(5))-xx(4)-xx(5)+xx(1)-1;


                                             2                      2  3
yy(1) :=  - xx(5)*a - xx(5) - xx(4) + xx(3)*a  + xx(2)*a + xx(1) - a *b

               2  2      2        2
          - 3*a *b  - 3*a *b - 2*a  - a*b - a*c - 1


yy(2) := -a*b**3-b**5+b**4*(-xx(4)-xx(5)+xx(1)-5)-b**3*c+b**3*(xx(2)
         -xx(5)-3)+b**2*(xx(3)-1);


          2            2                    2                            2
yy(2) := b *( - xx(5)*b  - xx(5)*b - xx(4)*b  + xx(3) + xx(2)*b + xx(1)*b  - a*b

                 3      2
              - b  - 5*b  - b*c - 3*b - 1)


yy(3) := -a*b**3*c-3*a*b**2*c-4*a*b*c+a*b*(-xx(4)-xx(5)+xx(1)-1)
         +a*c*(xx(3)-1)-b**2*c-b*c**2+b*c*(xx(2)-xx(5));


yy(3) :=  - xx(5)*a*b - xx(5)*b*c - xx(4)*a*b + xx(3)*a*c + xx(2)*b*c

                           3          2                            2        2
          + xx(1)*a*b - a*b *c - 3*a*b *c - 4*a*b*c - a*b - a*c - b *c - b*c


yy(4) := -a**2-a*c+a*(xx(2)-xx(4)-2*xx(5)+xx(1)-1)-b**4-b**3*c-3*b**3
         -3*b**2*c-2*b**2-2*b*c+b*(xx(3)-xx(2)-xx(4)+xx(1)-2)
         +c*(xx(3)-1);


yy(4) :=  - 2*xx(5)*a - xx(4)*a - xx(4)*b + xx(3)*b + xx(3)*c + xx(2)*a

                                           2              4    3        3
          - xx(2)*b + xx(1)*a + xx(1)*b - a  - a*c - a - b  - b *c - 3*b

               2        2
          - 3*b *c - 2*b  - 2*b*c - 2*b - c


yy(5) := -2*a-3*b**3-9*b**2-11*b-2*c+3*xx(3)+2*xx(2)-xx(4)-3*xx(5)+xx(1)
         -4;


                                                                   3      2
yy(5) :=  - 3*xx(5) - xx(4) + 3*xx(3) + 2*xx(2) + xx(1) - 2*a - 3*b  - 9*b

          - 11*b - 2*c - 4


soln  :=  solve({yy(1),yy(2),yy(3),yy(4),yy(5)},
                {xx(1),xx(2),xx(3),xx(4),xx(5)});


soln := {{xx(1)=arbcomplex(10) + arbcomplex(9) + 1,

          xx(2)=arbcomplex(10) + a + b + c,

                 3      2
          xx(3)=b  + 3*b  + 3*b + 1,

          xx(4)=arbcomplex(9),

          xx(5)=arbcomplex(10)}}


for i  :=  1:5 do xx(i) := part(soln,1,i,2);



for i  :=  1:5 do write yy(i);


0

0

0

0

0



%  Single equations liftable to polynomial systems.

solve ({a*sin x + b*cos x},{x});


                    2    2
              sqrt(a  + b ) - a
{x= - 2*atan(-------------------),
                      b

                 2    2
           sqrt(a  + b ) + a
 x=2*atan(-------------------)}
                   b


solve ({a*sin(x+1) + b*cos(x+1)},{x});


                    2    2
              sqrt(a  + b ) - a
{x= - 2*atan(-------------------) - 1,
                      b

                 2    2
           sqrt(a  + b ) + a
 x=2*atan(-------------------) - 1}
                   b

 
% Intersection of 2 curves: system with a free parameter.

solve ({sqrt(x^2 + y^2)=r,0=sqrt(x)+ y**3-1},{x,y,r});


{{y=arbcomplex(12),

     6      3
  x=y  - 2*y  + 1,

          12      9      6      3    2
  r=sqrt(y   - 4*y  + 6*y  - 4*y  + y  + 1)},

 {y=arbcomplex(11),

     6      3
  x=y  - 2*y  + 1,

             12      9      6      3    2
  r= - sqrt(y   - 4*y  + 6*y  - 4*y  + y  + 1)}}


solve ({e^x - e^(1/2 * x) - 7},{x});


           - sqrt(29) + 1
{x=2*log(-----------------),
                 2

          sqrt(29) + 1
 x=2*log(--------------)}
               2


% Generally not liftable.
  
   % variable inside and outside of sin.

   solve({sin x + x - 1/2},{x});


{x=root_of(2*sin(x_) + 2*x_ - 1,x_,tag_12)}

 
   % Variable inside and outside of exponential.

   solve({e^x - x**2},{x});


                    - 1
{x= - 2*lambert_w(------)}
                    2


   % Variable inside trigonometrical functions with different forms.

   solve ({a*sin(x+1) + b*cos(x+2)},{x});


                                                                        2    2
{x=2*atan((cos(1)*a - sqrt(2*cos(2)*sin(1)*a*b - 2*cos(1)*sin(2)*a*b + a  + b )

            - sin(2)*b)/(cos(2)*b + sin(1)*a)),

                                                                        2    2
 x=2*atan((cos(1)*a + sqrt(2*cos(2)*sin(1)*a*b - 2*cos(1)*sin(2)*a*b + a  + b )

            - sin(2)*b)/(cos(2)*b + sin(1)*a))}

 
   % Undetermined exponents.

   solve({x^a - 2},{x});


    1/a
{x=2   }

 

% Example taken from M.L. Griss, ACM Trans. Math. Softw. 2 (1976) 1.

e1 := x1 - l/(3*k)$



e2 := x2 - 1$



e3 := x3 - 35*b6/(6*l)*x4 + 33*b11/(2*l)*x6 - 715*b15/(14*l)*x8$



e4 := 14*k/(3*l)*x1 - 7*b4/(2*l)*x3 + x4$



e5 := x5 - 891*b11/(40*l)*x6 +3861*b15/(56*l)*x8$



e6 := -88*k/(15*l)*x1 + 22*b4/(5*l)*x3 - 99*b9/(8*l)*x5 +x6$



e7 := -768*k/(5005*b13)*x1 + 576*b4/(5005*b13)*x3 -
      324*b9/(1001*b13)*x5 + x7 - 16*l/(715*b13)*x8$



e8 := 7*l/(143*b15)*x1 + 49*b6/(429*b15)*x4 - 21*b11/(65*b15)*x6 +
      x8 - 7*b2/(143*b15)$



solve({e1,e2,e3,e4,e5,e6,e7,e8},{x1,x2,x3,x4,x5,x6,x7,x8});


       l
{{x1=-----,
      3*k

  x2=1,

                   2
      5*(3*b2*k - l )
  x3=-----------------,
           6*k*l

                             2        2
      7*(45*b2*b4*k - 15*b4*l  - 8*k*l )
  x4=------------------------------------,
                         2
                   36*k*l

                                  2              2             2       4
      2205*b2*b4*b6*k - 108*b2*k*l  - 735*b4*b6*l  - 392*b6*k*l  + 36*l
  x5=--------------------------------------------------------------------,
                                         3
                                   32*k*l

                                                2                  2
  x6=(11*(893025*b2*b4*b6*b9*k - 11520*b2*b4*k*l  - 43740*b2*b9*k*l

                              2            4                   2             4
           - 297675*b4*b6*b9*l  + 3840*b4*l  - 158760*b6*b9*k*l  + 14580*b9*l

                     4             4
           + 2048*k*l ))/(11520*k*l ),

                                                             2
  x7=(47652707025*b11*b2*b4*b6*b9*k - 614718720*b11*b2*b4*k*l

                                 2                             2
       - 2334010140*b11*b2*b9*k*l  - 15884235675*b11*b4*b6*b9*l

                           4                           2                     4
       + 204906240*b11*b4*l  - 8471592360*b11*b6*b9*k*l  + 778003380*b11*b9*l

                          4
       + 109283328*b11*k*l  + 172398476250*b15*b2*b4*b6*b9*k

                                 2                           2
       - 2223936000*b15*b2*b4*k*l  - 8444007000*b15*b2*b9*k*l

                                   2                     4
       - 57466158750*b15*b4*b6*b9*l  + 741312000*b15*b4*l

                                  2                      4                    4
       - 30648618000*b15*b6*b9*k*l  + 2814669000*b15*b9*l  + 395366400*b15*k*l

                               2                 4                   4
       - 172872000*b2*b4*b6*k*l  + 8467200*b2*k*l  + 57624000*b4*b6*l

                        4            6                         3
       + 30732800*b6*k*l  - 2822400*l )/(7729722000*b13*b15*k*l ),

                                                             2
  x8=(7*(972504225*b11*b2*b4*b6*b9*k - 12545280*b11*b2*b4*k*l

                                  2                           2
          - 47632860*b11*b2*b9*k*l  - 324168075*b11*b4*b6*b9*l

                            4                          2                    4
          + 4181760*b11*b4*l  - 172889640*b11*b6*b9*k*l  + 15877620*b11*b9*l

                           4                       2                4
          + 2230272*b11*k*l  - 3528000*b2*b4*b6*k*l  + 172800*b2*k*l

                           4                4          6                    4
          + 1176000*b4*b6*l  + 627200*b6*k*l  - 57600*l ))/(24710400*b15*k*l )}}



f1 := x1 - x*x2 - y*x3 + 1/2*x**2*x4 + x*y*x5 + 1/2*y**2*x6 +
      1/6*x**3*x7 + 1/2*x*y*(x - y)*x8 - 1/6*y**3*x9$



f2 := x1 - y*x3 + 1/2*y**2*x6 - 1/6*y**3*x9$



f3 := x1 + y*x2 - y*x3 + 1/2*y**2*x4 - y**2*x5 + 1/2*y**2*x6 +
      1/6*y**3*x7 + 1/2*y**3*x8 - 1/6*y**3*x9$



f4 := x1 + (1 - x)*x2 - x*x3 + 1/2*(1 - x)**2*x4 - y*(1 - x)*x5 +
      1/2*y**2*x6 + 1/6*(1 - x)**3*x7 + 1/2*y*(1 - x - y)*(1 - x)*x8
      - 1/6*y**3*x9$



f5 := x1 + (1 - x - y)*x2 + 1/2*(1 - x - y)**2*x4 +
      1/6*(1 - x - y)**3*x7$



f6 := x1 + (1 - x - y)*x3 + 1/2*(1 - x - y)*x6 +
      1/6*(1 - x - y)**3*x9$



f7 := x1 - x*x2 + (1 - y)*x3 + 1/2*x*x4 - x*(1 - y)*x5 +
      1/2*(1 - y)**2*x6 - 1/6*x**3*x7 + 1/2*x*(1 - y)*(1 - y + x)*x8
      + 1/6*(1-y)**3*x9$



f8 := x1 - x*x2 + x*x3 + 1/2*x**2*x4 - x**2*x5 + 1/2*x**2*x6 +
      1/6*x**3*x7 - 1/2*x**3*x8 + 1/6*x**3*x9$



f9 := x1 - x*x2 + 1/2*x**2*x4 + 1/6*x**3*x7$



solve({f1,f2,f3,f4,f5,f6,f7,f8,f9},{x1,x2,x3,x4,x5,x6,x7,x8,x9});


{{x1=0,x2=0,x3=0,x4=0,x5=0,x6=0,x7=0,x8=0,x9=0}}


solve({f1 - 1,f2,f3,f4,f5,f6,f7,f8,f9},{x1,x2,x3,x4,x5,x6,x7,x8,x9});


               8         8      7  3       7  2       7         7       6  4
{{x1=(y*( - 8*x *y + 10*x  + 9*x *y  - 49*x *y  + 85*x *y - 43*x  + 23*x *y

                 6  3        6  2        6         6       5  5        5  4
          - 128*x *y  + 266*x *y  - 246*x *y + 77*x  + 20*x *y  - 145*x *y

                 5  3        5  2        5         5      4  6       4  5
          + 383*x *y  - 512*x *y  + 329*x *y - 75*x  + 9*x *y  - 84*x *y

                 4  4        4  3        4  2        4         4      3  7
          + 276*x *y  - 469*x *y  + 464*x *y  - 233*x *y + 43*x  + 3*x *y

                3  6       3  5        3  4        3  3        3  2       3
          - 23*x *y  + 97*x *y  - 196*x *y  + 245*x *y  - 201*x *y  + 87*x *y

                3      2  8       2  7       2  6       2  5       2  4
          - 14*x  - 2*x *y  + 13*x *y  - 25*x *y  + 23*x *y  - 10*x *y

                2  3       2  2       2        2        9         8         7
          - 17*x *y  + 31*x *y  - 15*x *y + 2*x  - 2*x*y  + 10*x*y  - 24*x*y

                  6         5         4         3        2            6      5
          + 41*x*y  - 57*x*y  + 53*x*y  - 24*x*y  + 2*x*y  + x*y - 2*y  + 7*y

               4      3    2       10        10      9  2       9         9
          - 9*y  + 5*y  - y ))/(2*x  *y - 4*x   + 8*x *y  - 24*x *y + 20*x

            8  3       8  2       8         8       7  4       7  3        7  2
         + x *y  - 17*x *y  + 47*x *y - 31*x  - 24*x *y  + 92*x *y  - 105*x *y

               7         7       6  5        6  4        6  3        6  2
         + 18*x *y + 15*x  - 28*x *y  + 172*x *y  - 350*x *y  + 308*x *y

                6        6       5  6        5  5        5  4        5  3
         - 104*x *y + 4*x  - 14*x *y  + 103*x *y  - 290*x *y  + 401*x *y

                5  2       5        5      4  7       4  6       4  5       4  4
         - 278*x *y  + 83*x *y - 5*x  + 6*x *y  - 35*x *y  + 14*x *y  + 90*x *y

                4  3       4  2       4      4       3  8        3  7
         - 149*x *y  + 97*x *y  - 24*x *y + x  + 20*x *y  - 118*x *y

                3  6        3  5        3  4       3  3      3  2      3
         + 244*x *y  - 237*x *y  + 117*x *y  - 21*x *y  - 7*x *y  + 2*x *y

               2  9       2  8        2  7        2  6        2  5       2  4
         + 13*x *y  - 86*x *y  + 228*x *y  - 294*x *y  + 204*x *y  - 86*x *y

               2  3      2  2        10         9         8          7
         + 23*x *y  - 2*x *y  + 4*x*y   - 31*x*y  + 84*x*y  - 121*x*y

                  6         5         4        3      9       8       7      6
         + 100*x*y  - 48*x*y  + 15*x*y  - 3*x*y  + 4*y  - 12*y  + 15*y  - 9*y

              5
         + 2*y ),

         10        10      9  2       9        9      8  3      8  2      8
  x2=(2*x  *y - 2*x   + 5*x *y  - 12*x *y + 7*x  - 8*x *y  + 9*x *y  + 2*x *y

          8       7  4       7  3       7  2       7         7      6  5
       - x  - 15*x *y  + 65*x *y  - 83*x *y  + 52*x *y - 17*x  + 5*x *y

            6  4       6  3       6  2       6         6       5  6        5  5
       - 5*x *y  - 20*x *y  + 46*x *y  - 54*x *y + 20*x  + 23*x *y  - 151*x *y

              5  4        5  3        5  2       5        5       4  7
       + 321*x *y  - 338*x *y  + 166*x *y  - 13*x *y - 8*x  + 29*x *y

              4  6        4  5        4  4        4  3        4  2       4
       - 207*x *y  + 523*x *y  - 676*x *y  + 522*x *y  - 222*x *y  + 36*x *y

          4       3  8        3  7        3  6        3  5        3  4
       + x  + 16*x *y  - 103*x *y  + 300*x *y  - 463*x *y  + 433*x *y

              3  3       3  2       3      2  9       2  7       2  6       2  5
       - 268*x *y  + 98*x *y  - 15*x *y - x *y  + 22*x *y  - 54*x *y  + 60*x *y

             2  4       2  3       2  2      2          10         9         8
       - 56*x *y  + 44*x *y  - 17*x *y  + 2*x *y - 2*x*y   + 10*x*y  - 22*x*y

               7         6         5         4        3      2      7      6
       + 34*x*y  - 48*x*y  + 48*x*y  - 23*x*y  + 2*x*y  + x*y  - 2*y  + 7*y

            5      4    3         10        10      9  2       9         9
       - 9*y  + 5*y  - y )/(x*(2*x  *y - 4*x   + 8*x *y  - 24*x *y + 20*x

               8  3       8  2       8         8       7  4       7  3
            + x *y  - 17*x *y  + 47*x *y - 31*x  - 24*x *y  + 92*x *y

                   7  2       7         7       6  5        6  4        6  3
            - 105*x *y  + 18*x *y + 15*x  - 28*x *y  + 172*x *y  - 350*x *y

                   6  2        6        6       5  6        5  5        5  4
            + 308*x *y  - 104*x *y + 4*x  - 14*x *y  + 103*x *y  - 290*x *y

                   5  3        5  2       5        5      4  7       4  6
            + 401*x *y  - 278*x *y  + 83*x *y - 5*x  + 6*x *y  - 35*x *y

                  4  5       4  4        4  3       4  2       4      4
            + 14*x *y  + 90*x *y  - 149*x *y  + 97*x *y  - 24*x *y + x

                  3  8        3  7        3  6        3  5        3  4
            + 20*x *y  - 118*x *y  + 244*x *y  - 237*x *y  + 117*x *y

                  3  3      3  2      3         2  9       2  8        2  7
            - 21*x *y  - 7*x *y  + 2*x *y + 13*x *y  - 86*x *y  + 228*x *y

                   2  6        2  5       2  4       2  3      2  2        10
            - 294*x *y  + 204*x *y  - 86*x *y  + 23*x *y  - 2*x *y  + 4*x*y

                    9         8          7          6         5         4
            - 31*x*y  + 84*x*y  - 121*x*y  + 100*x*y  - 48*x*y  + 15*x*y

                   3      9       8       7      6      5
            - 3*x*y  + 4*y  - 12*y  + 15*y  - 9*y  + 2*y )),

         9        9      8  2       8         8      7  3       7  2        7
  x3=(2*x *y - 4*x  + 8*x *y  - 32*x *y + 26*x  + 9*x *y  - 70*x *y  + 131*x *y

             7      6  4       6  3        6  2        6         6       5  5
       - 66*x  + 7*x *y  - 73*x *y  + 226*x *y  - 253*x *y + 89*x  + 11*x *y

             5  4        5  3        5  2        5         5       4  6
       - 81*x *y  + 244*x *y  - 383*x *y  + 280*x *y - 73*x  + 13*x *y

             4  5        4  4        4  3        4  2        4         4
       - 89*x *y  + 235*x *y  - 367*x *y  + 360*x *y  - 189*x *y + 39*x

            3  7       3  6        3  5        3  4        3  3        3  2
       + 9*x *y  - 59*x *y  + 156*x *y  - 227*x *y  + 231*x *y  - 171*x *y

             3         3      2  8       2  7       2  6       2  5       2  4
       + 74*x *y - 13*x  + 3*x *y  - 21*x *y  + 62*x *y  - 78*x *y  + 51*x *y

             2  3       2  2       2        2        8         7         6
       - 35*x *y  + 30*x *y  - 14*x *y + 2*x  - 5*x*y  + 18*x*y  - 22*x*y

            5         4         3      2            8      7      6    5      4
       - x*y  + 21*x*y  - 13*x*y  + x*y  + x*y + 2*y  - 6*y  + 6*y  + y  - 6*y

            3    2      10        10      9  2       9         9    8  3
       + 4*y  - y )/(2*x  *y - 4*x   + 8*x *y  - 24*x *y + 20*x  + x *y

               8  2       8         8       7  4       7  3        7  2
         - 17*x *y  + 47*x *y - 31*x  - 24*x *y  + 92*x *y  - 105*x *y

               7         7       6  5        6  4        6  3        6  2
         + 18*x *y + 15*x  - 28*x *y  + 172*x *y  - 350*x *y  + 308*x *y

                6        6       5  6        5  5        5  4        5  3
         - 104*x *y + 4*x  - 14*x *y  + 103*x *y  - 290*x *y  + 401*x *y

                5  2       5        5      4  7       4  6       4  5       4  4
         - 278*x *y  + 83*x *y - 5*x  + 6*x *y  - 35*x *y  + 14*x *y  + 90*x *y

                4  3       4  2       4      4       3  8        3  7
         - 149*x *y  + 97*x *y  - 24*x *y + x  + 20*x *y  - 118*x *y

                3  6        3  5        3  4       3  3      3  2      3
         + 244*x *y  - 237*x *y  + 117*x *y  - 21*x *y  - 7*x *y  + 2*x *y

               2  9       2  8        2  7        2  6        2  5       2  4
         + 13*x *y  - 86*x *y  + 228*x *y  - 294*x *y  + 204*x *y  - 86*x *y

               2  3      2  2        10         9         8          7
         + 23*x *y  - 2*x *y  + 4*x*y   - 31*x*y  + 84*x*y  - 121*x*y

                  6         5         4        3      9       8       7      6
         + 100*x*y  - 48*x*y  + 15*x*y  - 3*x*y  + 4*y  - 12*y  + 15*y  - 9*y

              5
         + 2*y ),

            9        9      8  2       8        8      7  3       7  2       7
  x4=(2*(2*x *y - 2*x  + 4*x *y  - 10*x *y + 6*x  - 9*x *y  + 21*x *y  - 13*x *y

             7       6  4       6  3        6  2       6         6       5  5
          + x  - 18*x *y  + 88*x *y  - 130*x *y  + 74*x *y - 14*x  - 10*x *y

                5  4        5  3        5  2       5         5      4  6
          + 74*x *y  - 180*x *y  + 191*x *y  - 90*x *y + 15*x  + 4*x *y

                4  5       4  4        4  3        4  2       4        4
          - 18*x *y  - 20*x *y  + 105*x *y  - 111*x *y  + 47*x *y - 7*x

                3  7       3  6        3  5        3  4       3  3      3  2
          + 16*x *y  - 96*x *y  + 188*x *y  - 155*x *y  + 44*x *y  + 8*x *y

               3      3       2  8       2  7        2  6        2  5
          - 6*x *y + x  + 10*x *y  - 62*x *y  + 164*x *y  - 219*x *y

                 2  4       2  3       2  2    2        9         8         7
          + 154*x *y  - 56*x *y  + 10*x *y  - x *y + x*y  - 13*x*y  + 45*x*y

                  6         5         4         3        2      8      7      6
          - 72*x*y  + 64*x*y  - 35*x*y  + 12*x*y  - 2*x*y  + 2*y  - 7*y  + 9*y

               5    4          10        10      9  2       9         9    8  3
          - 5*y  + y ))/(x*(2*x  *y - 4*x   + 8*x *y  - 24*x *y + 20*x  + x *y

                  8  2       8         8       7  4       7  3        7  2
            - 17*x *y  + 47*x *y - 31*x  - 24*x *y  + 92*x *y  - 105*x *y

                  7         7       6  5        6  4        6  3        6  2
            + 18*x *y + 15*x  - 28*x *y  + 172*x *y  - 350*x *y  + 308*x *y

                   6        6       5  6        5  5        5  4        5  3
            - 104*x *y + 4*x  - 14*x *y  + 103*x *y  - 290*x *y  + 401*x *y

                   5  2       5        5      4  7       4  6       4  5
            - 278*x *y  + 83*x *y - 5*x  + 6*x *y  - 35*x *y  + 14*x *y

                  4  4        4  3       4  2       4      4       3  8
            + 90*x *y  - 149*x *y  + 97*x *y  - 24*x *y + x  + 20*x *y

                   3  7        3  6        3  5        3  4       3  3      3  2
            - 118*x *y  + 244*x *y  - 237*x *y  + 117*x *y  - 21*x *y  - 7*x *y

                 3         2  9       2  8        2  7        2  6        2  5
            + 2*x *y + 13*x *y  - 86*x *y  + 228*x *y  - 294*x *y  + 204*x *y

                  2  4       2  3      2  2        10         9         8
            - 86*x *y  + 23*x *y  - 2*x *y  + 4*x*y   - 31*x*y  + 84*x*y

                     7          6         5         4        3      9       8
            - 121*x*y  + 100*x*y  - 48*x*y  + 15*x*y  - 3*x*y  + 4*y  - 12*y

                  7      6      5
            + 15*y  - 9*y  + 2*y )),

         10        10      9  2       9        9      8  3       8  2       8
  x5=(2*x  *y - 2*x   + 7*x *y  - 16*x *y + 7*x  - 3*x *y  - 11*x *y  + 21*x *y

          8       7  4       7  3       7  2       7         7      6  5
       - x  - 18*x *y  + 60*x *y  - 46*x *y  + 23*x *y - 17*x  - 4*x *y

             6  4       6  3       6  2       6         6       5  6       5  5
       + 38*x *y  - 70*x *y  + 40*x *y  - 36*x *y + 20*x  + 14*x *y  - 86*x *y

              5  4        5  3        5  2       5        5       4  7
       + 164*x *y  - 182*x *y  + 114*x *y  - 14*x *y - 8*x  + 24*x *y

              4  6        4  5        4  4        4  3        4  2       4
       - 167*x *y  + 387*x *y  - 455*x *y  + 348*x *y  - 164*x *y  + 32*x *y

          4       3  8        3  7        3  6        3  5        3  4
       + x  + 21*x *y  - 130*x *y  + 339*x *y  - 458*x *y  + 370*x *y

              3  3       3  2       3        2  9       2  8        2  7
       - 211*x *y  + 81*x *y  - 14*x *y + 5*x *y  - 43*x *y  + 140*x *y

              2  6        2  5       2  4       2  3       2  2      2
       - 209*x *y  + 165*x *y  - 86*x *y  + 42*x *y  - 16*x *y  + 2*x *y

              9         8         7         6        5        4      3      2
       - 5*x*y  + 20*x*y  - 32*x*y  + 16*x*y  + 8*x*y  - 9*x*y  + x*y  + x*y

            9      8      7    6      5      4    3           10        10
       + 2*y  - 6*y  + 6*y  + y  - 6*y  + 4*y  - y )/(x*y*(2*x  *y - 4*x

                 9  2       9         9    8  3       8  2       8         8
            + 8*x *y  - 24*x *y + 20*x  + x *y  - 17*x *y  + 47*x *y - 31*x

                  7  4       7  3        7  2       7         7       6  5
            - 24*x *y  + 92*x *y  - 105*x *y  + 18*x *y + 15*x  - 28*x *y

                   6  4        6  3        6  2        6        6       5  6
            + 172*x *y  - 350*x *y  + 308*x *y  - 104*x *y + 4*x  - 14*x *y

                   5  5        5  4        5  3        5  2       5        5
            + 103*x *y  - 290*x *y  + 401*x *y  - 278*x *y  + 83*x *y - 5*x

                 4  7       4  6       4  5       4  4        4  3       4  2
            + 6*x *y  - 35*x *y  + 14*x *y  + 90*x *y  - 149*x *y  + 97*x *y

                  4      4       3  8        3  7        3  6        3  5
            - 24*x *y + x  + 20*x *y  - 118*x *y  + 244*x *y  - 237*x *y

                   3  4       3  3      3  2      3         2  9       2  8
            + 117*x *y  - 21*x *y  - 7*x *y  + 2*x *y + 13*x *y  - 86*x *y

                   2  7        2  6        2  5       2  4       2  3      2  2
            + 228*x *y  - 294*x *y  + 204*x *y  - 86*x *y  + 23*x *y  - 2*x *y

                   10         9         8          7          6         5
            + 4*x*y   - 31*x*y  + 84*x*y  - 121*x*y  + 100*x*y  - 48*x*y

                    4        3      9       8       7      6      5
            + 15*x*y  - 3*x*y  + 4*y  - 12*y  + 15*y  - 9*y  + 2*y )),

            9        9      8  2       8         8      7  3       7  2
  x6=(2*(2*x *y - 4*x  + 8*x *y  - 24*x *y + 16*x  - 2*x *y  - 19*x *y

                7         7       6  4       6  3       6  2       6         6
          + 50*x *y - 23*x  - 20*x *y  + 71*x *y  - 46*x *y  - 15*x *y + 12*x

               5  5       5  4        5  3        5  2       5        5
          - 8*x *y  + 82*x *y  - 195*x *y  + 155*x *y  - 46*x *y + 2*x

               4  6       4  5       4  4        4  3        4  2       4
          + 8*x *y  - 11*x *y  - 81*x *y  + 184*x *y  - 142*x *y  + 46*x *y

               4       3  6       3  5    3  4       3  3       3  2       3
          - 4*x  - 21*x *y  + 50*x *y  + x *y  - 60*x *y  + 49*x *y  - 14*x *y

             3      2  8       2  7       2  6       2  5       2  4      2  3
          + x  + 6*x *y  - 34*x *y  + 82*x *y  - 99*x *y  + 54*x *y  - 8*x *y

               2  2    2          8         7         6         5         4
          - 4*x *y  + x *y - 6*x*y  + 38*x*y  - 79*x*y  + 78*x*y  - 41*x*y

                  3      2      7       6       5      4    3          10
          + 11*x*y  - x*y  - 4*y  + 10*y  - 10*y  + 5*y  - y ))/(y*(2*x  *y

                 10      9  2       9         9    8  3       8  2       8
            - 4*x   + 8*x *y  - 24*x *y + 20*x  + x *y  - 17*x *y  + 47*x *y

                  8       7  4       7  3        7  2       7         7
            - 31*x  - 24*x *y  + 92*x *y  - 105*x *y  + 18*x *y + 15*x

                  6  5        6  4        6  3        6  2        6        6
            - 28*x *y  + 172*x *y  - 350*x *y  + 308*x *y  - 104*x *y + 4*x

                  5  6        5  5        5  4        5  3        5  2       5
            - 14*x *y  + 103*x *y  - 290*x *y  + 401*x *y  - 278*x *y  + 83*x *y

                 5      4  7       4  6       4  5       4  4        4  3
            - 5*x  + 6*x *y  - 35*x *y  + 14*x *y  + 90*x *y  - 149*x *y

                  4  2       4      4       3  8        3  7        3  6
            + 97*x *y  - 24*x *y + x  + 20*x *y  - 118*x *y  + 244*x *y

                   3  5        3  4       3  3      3  2      3         2  9
            - 237*x *y  + 117*x *y  - 21*x *y  - 7*x *y  + 2*x *y + 13*x *y

                  2  8        2  7        2  6        2  5       2  4       2  3
            - 86*x *y  + 228*x *y  - 294*x *y  + 204*x *y  - 86*x *y  + 23*x *y

                 2  2        10         9         8          7          6
            - 2*x *y  + 4*x*y   - 31*x*y  + 84*x*y  - 121*x*y  + 100*x*y

                    5         4        3      9       8       7      6      5
            - 48*x*y  + 15*x*y  - 3*x*y  + 4*y  - 12*y  + 15*y  - 9*y  + 2*y )),

          7  2      7      7    6  3      6  2      6        6      5  4
  x7=(6*(x *y  - 2*x *y + x  + x *y  - 4*x *y  + 5*x *y - 2*x  - 6*x *y

                5  3       5  2       5        5      4  5       4  4
          + 26*x *y  - 38*x *y  + 21*x *y - 3*x  - 8*x *y  + 49*x *y

                 4  3        4  2       4        4    3  6       3  5       3  4
          - 106*x *y  + 101*x *y  - 41*x *y + 5*x  - x *y  + 12*x *y  - 42*x *y

                3  3       3  2       3      3      2  7       2  6       2  5
          + 69*x *y  - 52*x *y  + 15*x *y - x  + 4*x *y  - 27*x *y  + 59*x *y

                2  4       2  3      2  2    2          8         7         6
          - 52*x *y  + 14*x *y  + 3*x *y  - x *y + 3*x*y  - 18*x*y  + 39*x*y

                  5         4         3      2      7      6      5      4    3
          - 48*x*y  + 34*x*y  - 11*x*y  + x*y  + 2*y  - 5*y  + 6*y  - 4*y  + y )

               10        10      9  2       9         9    8  3       8  2
      )/(x*(2*x  *y - 4*x   + 8*x *y  - 24*x *y + 20*x  + x *y  - 17*x *y

                   8         8       7  4       7  3        7  2       7
             + 47*x *y - 31*x  - 24*x *y  + 92*x *y  - 105*x *y  + 18*x *y

                   7       6  5        6  4        6  3        6  2        6
             + 15*x  - 28*x *y  + 172*x *y  - 350*x *y  + 308*x *y  - 104*x *y

                  6       5  6        5  5        5  4        5  3        5  2
             + 4*x  - 14*x *y  + 103*x *y  - 290*x *y  + 401*x *y  - 278*x *y

                   5        5      4  7       4  6       4  5       4  4
             + 83*x *y - 5*x  + 6*x *y  - 35*x *y  + 14*x *y  + 90*x *y

                    4  3       4  2       4      4       3  8        3  7
             - 149*x *y  + 97*x *y  - 24*x *y + x  + 20*x *y  - 118*x *y

                    3  6        3  5        3  4       3  3      3  2      3
             + 244*x *y  - 237*x *y  + 117*x *y  - 21*x *y  - 7*x *y  + 2*x *y

                   2  9       2  8        2  7        2  6        2  5
             + 13*x *y  - 86*x *y  + 228*x *y  - 294*x *y  + 204*x *y

                   2  4       2  3      2  2        10         9         8
             - 86*x *y  + 23*x *y  - 2*x *y  + 4*x*y   - 31*x*y  + 84*x*y

                      7          6         5         4        3      9       8
             - 121*x*y  + 100*x*y  - 48*x*y  + 15*x*y  - 3*x*y  + 4*y  - 12*y

                   7      6      5
             + 15*y  - 9*y  + 2*y )),

               9    8  2       8         8      7  3       7  2       7
  x8=(2*( - 2*x  + x *y  - 10*x *y + 13*x  + 5*x *y  - 24*x *y  + 49*x *y

                7      6  4       6  3       6  2       6         6      5  5
          - 30*x  + 8*x *y  - 41*x *y  + 75*x *y  - 78*x *y + 32*x  + 7*x *y

                5  4       5  3       5  2       5         5    4  6      4  5
          - 35*x *y  + 61*x *y  - 56*x *y  + 41*x *y - 16*x  - x *y  + 9*x *y

                4  4       4  3       4  2      4        4       3  7       3  6
          - 10*x *y  + 15*x *y  - 22*x *y  + 6*x *y + 3*x  - 10*x *y  + 57*x *y

                 3  5       3  4       3  3       3  2       3        2  8
          - 107*x *y  + 91*x *y  - 55*x *y  + 34*x *y  - 10*x *y - 8*x *y

                2  7        2  6        2  5       2  4       2  3       2  2
          + 46*x *y  - 105*x *y  + 116*x *y  - 63*x *y  + 23*x *y  - 11*x *y

               2          9         8         7         6         5        4
          + 2*x *y - 2*x*y  + 16*x*y  - 42*x*y  + 54*x*y  - 34*x*y  + 6*x*y

               3      2      8      7      6      5    4    3            10
          + x*y  + x*y  - 2*y  + 6*y  - 7*y  + 3*y  + y  - y ))/(x*y*(2*x  *y

                 10      9  2       9         9    8  3       8  2       8
            - 4*x   + 8*x *y  - 24*x *y + 20*x  + x *y  - 17*x *y  + 47*x *y

                  8       7  4       7  3        7  2       7         7
            - 31*x  - 24*x *y  + 92*x *y  - 105*x *y  + 18*x *y + 15*x

                  6  5        6  4        6  3        6  2        6        6
            - 28*x *y  + 172*x *y  - 350*x *y  + 308*x *y  - 104*x *y + 4*x

                  5  6        5  5        5  4        5  3        5  2       5
            - 14*x *y  + 103*x *y  - 290*x *y  + 401*x *y  - 278*x *y  + 83*x *y

                 5      4  7       4  6       4  5       4  4        4  3
            - 5*x  + 6*x *y  - 35*x *y  + 14*x *y  + 90*x *y  - 149*x *y

                  4  2       4      4       3  8        3  7        3  6
            + 97*x *y  - 24*x *y + x  + 20*x *y  - 118*x *y  + 244*x *y

                   3  5        3  4       3  3      3  2      3         2  9
            - 237*x *y  + 117*x *y  - 21*x *y  - 7*x *y  + 2*x *y + 13*x *y

                  2  8        2  7        2  6        2  5       2  4       2  3
            - 86*x *y  + 228*x *y  - 294*x *y  + 204*x *y  - 86*x *y  + 23*x *y

                 2  2        10         9         8          7          6
            - 2*x *y  + 4*x*y   - 31*x*y  + 84*x*y  - 121*x*y  + 100*x*y

                    5         4        3      9       8       7      6      5
            - 48*x*y  + 15*x*y  - 3*x*y  + 4*y  - 12*y  + 15*y  - 9*y  + 2*y )),

               7  2      7        7      6  3       6  2      6        6    5  4
  x9=(6*( - 2*x *y  + 2*x *y + 4*x  - 4*x *y  + 16*x *y  - 6*x *y - 8*x  + x *y

                5  3       5  2       5        5      4  5      4  4       4  3
          + 18*x *y  - 56*x *y  + 26*x *y + 3*x  + 4*x *y  - 6*x *y  - 40*x *y

                4  2       4        4      3  6       3  5      3  4       3  3
          + 82*x *y  - 38*x *y + 2*x  - 6*x *y  + 15*x *y  - 9*x *y  + 32*x *y

                3  2       3      3    2  7      2  5      2  4      2  3
          - 46*x *y  + 19*x *y - x  + x *y  - 5*x *y  + 2*x *y  - 7*x *y

                2  2      2          8        7        6         5         4
          + 10*x *y  - 3*x *y - 2*x*y  + 9*x*y  - 4*x*y  - 16*x*y  + 22*x*y

                 3      7      6      5      4      3          10        10
          - 9*x*y  - 2*y  + 2*y  + 2*y  - 4*y  + 2*y ))/(y*(2*x  *y - 4*x

                 9  2       9         9    8  3       8  2       8         8
            + 8*x *y  - 24*x *y + 20*x  + x *y  - 17*x *y  + 47*x *y - 31*x

                  7  4       7  3        7  2       7         7       6  5
            - 24*x *y  + 92*x *y  - 105*x *y  + 18*x *y + 15*x  - 28*x *y

                   6  4        6  3        6  2        6        6       5  6
            + 172*x *y  - 350*x *y  + 308*x *y  - 104*x *y + 4*x  - 14*x *y

                   5  5        5  4        5  3        5  2       5        5
            + 103*x *y  - 290*x *y  + 401*x *y  - 278*x *y  + 83*x *y - 5*x

                 4  7       4  6       4  5       4  4        4  3       4  2
            + 6*x *y  - 35*x *y  + 14*x *y  + 90*x *y  - 149*x *y  + 97*x *y

                  4      4       3  8        3  7        3  6        3  5
            - 24*x *y + x  + 20*x *y  - 118*x *y  + 244*x *y  - 237*x *y

                   3  4       3  3      3  2      3         2  9       2  8
            + 117*x *y  - 21*x *y  - 7*x *y  + 2*x *y + 13*x *y  - 86*x *y

                   2  7        2  6        2  5       2  4       2  3      2  2
            + 228*x *y  - 294*x *y  + 204*x *y  - 86*x *y  + 23*x *y  - 2*x *y

                   10         9         8          7          6         5
            + 4*x*y   - 31*x*y  + 84*x*y  - 121*x*y  + 100*x*y  - 48*x*y

                    4        3      9       8       7      6      5
            + 15*x*y  - 3*x*y  + 4*y  - 12*y  + 15*y  - 9*y  + 2*y ))}}



% The following examples were discussed in Char, B.W., Fee, G.J.,
% Geddes, K.O., Gonnet, G.H., Monagan, M.B., Watt, S.M., "On the
% Design and Performance of the Maple System", Proc. 1984 Macsyma
% Users' Conference, G.E., Schenectady, NY, 1984, 199-219.

% Problem 1.

solve({ -22319*x0+25032*x1-83247*x2+67973*x3+54189*x4
       -67793*x5+81135*x6+22293*x7+27327*x8+96599*x9-15144,
       79815*x0+37299*x1-28495*x2-52463*x3+25708*x4 -55333*x5-
       2742*x6+83127*x7-29417*x8-43202*x9+93314, -29065*x0-77803*x1-
       49717*x2-64748*x3-68324*x4 -50162*x5-64222*x6-
       4716*x7+30737*x8+22971*x9+90348, 62470*x0+59658*x1-
       46120*x2+58376*x3-28208*x4 -74506*x5+28491*x6+21099*x7+29149*x8-
       20387*x9+36254, -98233*x0-26263*x1-63227*x2+34307*x3+92294*x4
       +10148*x5+3192*x6+24044*x7-83764*x8-1121*x9+13871,
       -20427*x0+62666*x1+27330*x2-78670*x3+9036*x4 +56024*x5-4525*x6-
       50589*x7-62127*x8-32846*x9+38466,
       -85609*x0+5424*x1+86992*x2+59651*x3-60859*x4 -55984*x5-
       6061*x6+44417*x7+92421*x8+6701*x9-9459,
       -68255*x0+19652*x1+92650*x2-93032*x3-30191*x4 -31075*x5-
       89060*x6+12150*x7-78089*x8-12462*x9+1027, 55526*x0-
       91202*x1+91329*x2-25919*x3-98215*x4 +30554*x5+913*x6-
       35751*x7+17948*x8-58850*x9+66583, 40612*x0+84364*x1-
       83317*x2+10658*x3+37213*x4 +50489*x5+72040*x6-
       21227*x7+60772*x8+95114*x9-68533});


Unknowns: {x0,x1,x2,x3,x4,x5,x6,x7,x8,x9}

      4352444991703786550093529782474564455970663240687
{{x0=---------------------------------------------------,
      8420785423059099972039395927798127489505890997055

      459141297061698284317621371232198410031030658042
  x1=---------------------------------------------------,
      1684157084611819994407879185559625497901178199411

      1068462443128238131632235196977352568525519548284
  x2=---------------------------------------------------,
      1684157084611819994407879185559625497901178199411

      1645748379263608982132912334741766606871657041427
  x3=---------------------------------------------------,
      1684157084611819994407879185559625497901178199411

      25308331428404990886292916036626876985377936966579
  x4=----------------------------------------------------,
      42103927115295499860196979638990637447529454985275

      17958909252564152456194678743404876001526265937527
  x5=----------------------------------------------------,
      42103927115295499860196979638990637447529454985275

       - 50670056205024448621117426699348037457452368820774
  x6=-------------------------------------------------------,
       42103927115295499860196979638990637447529454985275

       - 11882862555847887107599498171234654114612212813799
  x7=-------------------------------------------------------,
       42103927115295499860196979638990637447529454985275

       - 273286267131634194631661772113331181980867938658
  x8=-----------------------------------------------------,
       8420785423059099972039395927798127489505890997055

      46816360472823082478331070276129336252954604132203
  x9=----------------------------------------------------}}
      42103927115295499860196979638990637447529454985275


solve({ -22319*x0+25032*x1-83247*x2+67973*x3+54189*x4
        -67793*x5+81135*x6+22293*x7+27327*x8+96599*x9-15144,
        79815*x0+37299*x1-28495*x2-52463*x3+25708*x4 -55333*x5-
        2742*x6+83127*x7-29417*x8-43202*x9+93314, -29065*x0-77803*x1-
        49717*x2-64748*x3-68324*x4 -50162*x5-64222*x6-
        4716*x7+30737*x8+22971*x9+90348, 62470*x0+59658*x1-
        46120*x2+58376*x3-28208*x4-74506*x5+28491*x6+21099*x7+29149*x8-
        20387*x9+36254,-98233*x0-26263*x1-63227*x2+34307*x3+92294*x4
        +10148*x5+3192*x6+24044*x7-83764*x8-1121*x9+13871,
        -20427*x0+62666*x1+27330*x2-78670*x3+9036*x4 +56024*x5-4525*x6-
        50589*x7-62127*x8-32846*x9+38466,
        -85609*x0+5424*x1+86992*x2+59651*x3-60859*x4 -55984*x5-
        6061*x6+44417*x7+92421*x8+6701*x9-9459,
        -68255*x0+19652*x1+92650*x2-93032*x3-30191*x4 -31075*x5-
        89060*x6+12150*x7-78089*x8-12462*x9+1027, 55526*x0-
        91202*x1+91329*x2-25919*x3-98215*x4 +30554*x5+913*x6-
        35751*x7+17948*x8-58850*x9+66583, 40612*x0+84364*x1-
        83317*x2+10658*x3+37213*x4 +50489*x5+72040*x6-
        21227*x7+60772*x8+95114*x9-68533});


Unknowns: {x0,x1,x2,x3,x4,x5,x6,x7,x8,x9}

      4352444991703786550093529782474564455970663240687
{{x0=---------------------------------------------------,
      8420785423059099972039395927798127489505890997055

      459141297061698284317621371232198410031030658042
  x1=---------------------------------------------------,
      1684157084611819994407879185559625497901178199411

      1068462443128238131632235196977352568525519548284
  x2=---------------------------------------------------,
      1684157084611819994407879185559625497901178199411

      1645748379263608982132912334741766606871657041427
  x3=---------------------------------------------------,
      1684157084611819994407879185559625497901178199411

      25308331428404990886292916036626876985377936966579
  x4=----------------------------------------------------,
      42103927115295499860196979638990637447529454985275

      17958909252564152456194678743404876001526265937527
  x5=----------------------------------------------------,
      42103927115295499860196979638990637447529454985275

       - 50670056205024448621117426699348037457452368820774
  x6=-------------------------------------------------------,
       42103927115295499860196979638990637447529454985275

       - 11882862555847887107599498171234654114612212813799
  x7=-------------------------------------------------------,
       42103927115295499860196979638990637447529454985275

       - 273286267131634194631661772113331181980867938658
  x8=-----------------------------------------------------,
       8420785423059099972039395927798127489505890997055

      46816360472823082478331070276129336252954604132203
  x9=----------------------------------------------------}}
      42103927115295499860196979638990637447529454985275



% The next two problems give the current routines some trouble and
% have therefore been commented out.

% Problem 2.

comment
solve({ 81*x30-96*x21-45, -36*x4+59*x29+26,
       -59*x26+5*x3-33, -81*x19-92*x23-21*x17-9, -46*x29-
       13*x22+22*x24+83, 47*x4-47*x14-15*x26-40, 83*x30+70*x17+56*x10-
       31, 10*x27-90*x9+52*x21+52, -33*x20-97*x26+20*x6-76,
       97*x16+41*x8-13*x12+66, 16*x16-52*x10-73*x28+49, -28*x1-53*x24-
       x27-67, -22*x26-29*x24+73*x10+8, 88*x18+61*x19-98*x9-55, 99*x28-
       91*x26+26*x21-95, -6*x18+25*x7-77*x2+99, 28*x13-50*x17-52*x14-64,
       -50*x20+26*x11+93*x2+77, -70*x8+74*x19-94*x26+86, -18*x18-2*x16-
       79*x23+91, 36*x26-13*x11-53*x25-5, 10*x7+57*x16-85*x10-14,
       -3*x27+44*x4+52*x22-1, 21*x11+20*x25-30*x4-83, 70*x2-97*x19-
       41*x26-50, -51*x8+95*x12-85*x26+45, 83*x30+41*x12+50*x2+53,
       -4*x26+69*x8-58*x5-95, 59*x27-78*x30-66*x23+16, -10*x20-36*x11-
       60*x1-59});



% Problem 3.
comment
solve({ 115*x40+566*x41-378*x42+11401086415/6899901,
       560*x0-45*x1-506*x2-11143386403/8309444, -621*x1-
       328*x2+384*x3+1041841/64675, -856*x2+54*x3+869*x4-41430291/24700,
       596*x3-608*x4-560*x5-10773384/11075,
       -61*x4+444*x5+924*x6+4185100079/11278780, 67*x5-95*x6-
       682*x7+903866812/6618863, 196*x6+926*x7-930*x8-
       2051864151/2031976, -302*x7-311*x8-890*x9-14210414139/27719792,
       121*x8-781*x9-125*x10-4747129093/39901584, 10*x9+555*x10-
       912*x11+32476047/3471829, -151*x38+732*x39-
       397*x40+327281689/173242, 913*x10-259*x11-982*x12-
       18080663/5014020, 305*x11+9*x12-357*x13+1500752933/1780680,
       179*x12-588*x13+665*x14+8128189/51832, 406*x13+843*x14-
       833*x15+201925713/97774, 107*x14+372*x15+505*x16-
       5161192791/3486415, 720*x15-212*x16+607*x17-31529295571/7197760,
       951*x16-685*x17+148*x18+1034546543/711104, -654*x17-
       899*x18+543*x19+1942961717/1646560,
       -448*x18+673*x19+702*x20+856422818/1286375, 396*x19-
       196*x20+218*x21-4386267866/21303625, -233*x20-796*x21-373*x22-
       85246365829/57545250, 921*x21-368*x22+730*x23-
       93446707622/51330363, -424*x22+378*x23+727*x24-
       6673617931/3477462, -633*x23+565*x24-208*x25+8607636805/4092942,
       971*x24+170*x25-865*x26-25224505/18354, 937*x25+333*x26-463*x27-
       339307103/1025430, 494*x26-8*x27-50*x28+57395804/34695,
       530*x27+631*x28-193*x29-8424597157/680022,
       -435*x28+252*x29+916*x30+196828511/19593, 327*x29+403*x30-
       845*x31+8458823325/5927971, 246*x30+881*x31-
       394*x32+13624765321/156546826, 946*x31+169*x32-43*x33-
       53594199271/126093183, -146*x32+503*x33-
       363*x34+66802797635/15234909, -132*x33-
       686*x34+376*x35+8167530636/902635, -38*x34-188*x35-
       583*x36+1814153743/1124240, 389*x35+562*x36-688*x37-
       12251043951/5513560, -769*x37-474*x38-89*x39-2725415872/1235019,
       -625*x36-122*x37+468*x38+7725682775/4506736,
       839*x39+936*x40+703*x41+1912091857/1000749,
       -314*x41+102*x42+790*x43+7290073150/8132873, -905*x42-
       454*x43+524*x44-10110944527/4538233, 379*x43+518*x44-328*x45-
       2071620692/519645, 284*x44-979*x45+690*x46-915987532/16665,
       198*x45-650*x46-763*x47+548801657/11220, 974*x46+12*x47+410*x48-
       3831097561/51051, -498*x47-135*x48-230*x49-18920705/9282,
       665*x48+156*x49+34*x0-27714736/156585, -519*x49-366*x0-730*x1-
       2958446681/798985});



% Problem 4.

% This one needs the Cramer code --- it takes forever otherwise.

on cramer;



solve({ -b*k8/a+c*k8/a, -b*k11/a+c*k11/a,
       -b*k10/a+c*k10/a+k2,
        -k3-b*k9/a+c*k9/a, -b*k14/a+c*k14/a, -b*k15/a+c*k15/a,
        -b*k18/a+c*k18/a-k2, -b*k17/a+c*k17/a, -b*k16/a+c*k16/a+k4,
        -b*k13/a+c*k13/a-b*k21/a+c*k21/a+b*k5/a-c*k5/a,
        b*k44/a-c*k44/a, -b*k45/a+c*k45/a, -b*k20/a+c*k20/a,
        -b*k44/a+c*k44/a, b*k46/a-c*k46/a,
        b**2*k47/a**2-2*b*c*k47/a**2+c**2*k47/a**2,
        k3, -k4, -b*k12/a+c*k12/a-a*k6/b+c*k6/b,
        -b*k19/a+c*k19/a+a*k7/c-b*k7/c, b*k45/a-c*k45/a,
        -b*k46/a+c*k46/a, -k48+c*k48/a+c*k48/b-c**2*k48/(a*b),
        -k49+b*k49/a+b*k49/c-b**2*k49/(a*c), a*k1/b-c*k1/b,
        a*k4/b-c*k4/b, a*k3/b-c*k3/b+k9, -k10+a*k2/b-c*k2/b,
        a*k7/b-c*k7/b, -k9, k11, b*k12/a-c*k12/a+a*k6/b-c*k6/b,
        a*k15/b-c*k15/b, k10+a*k18/b-c*k18/b,
        -k11+a*k17/b-c*k17/b, a*k16/b-c*k16/b,
        -a*k13/b+c*k13/b+a*k21/b-c*k21/b+a*k5/b-c*k5/b,
        -a*k44/b+c*k44/b, a*k45/b-c*k45/b,
        a*k14/c-b*k14/c+a*k20/b-c*k20/b, a*k44/b-c*k44/b,
        -a*k46/b+c*k46/b, -k47+c*k47/a+c*k47/b-c**2*k47/(a*b),
        a*k19/b-c*k19/b, -a*k45/b+c*k45/b, a*k46/b-c*k46/b,
        a**2*k48/b**2-2*a*c*k48/b**2+c**2*k48/b**2,
        -k49+a*k49/b+a*k49/c-a**2*k49/(b*c), k16, -k17,
        -a*k1/c+b*k1/c, -k16-a*k4/c+b*k4/c, -a*k3/c+b*k3/c,
        k18-a*k2/c+b*k2/c, b*k19/a-c*k19/a-a*k7/c+b*k7/c,
        -a*k6/c+b*k6/c, -a*k8/c+b*k8/c, -a*k11/c+b*k11/c+k17,
        -a*k10/c+b*k10/c-k18, -a*k9/c+b*k9/c,
        -a*k14/c+b*k14/c-a*k20/b+c*k20/b,
        -a*k13/c+b*k13/c+a*k21/c-b*k21/c-a*k5/c+b*k5/c,
        a*k44/c-b*k44/c, -a*k45/c+b*k45/c, -a*k44/c+b*k44/c,
        a*k46/c-b*k46/c, -k47+b*k47/a+b*k47/c-b**2*k47/(a*c),
        -a*k12/c+b*k12/c, a*k45/c-b*k45/c, -a*k46/c+b*k46/c,
        -k48+a*k48/b+a*k48/c-a**2*k48/(b*c),
        a**2*k49/c**2-2*a*b*k49/c**2+b**2*k49/c**2, k8, k11, -k15,
        k10-k18, -k17, k9, -k16, -k29, k14-k32, -k21+k23-k31,
        -k24-k30, -k35, k44, -k45, k36, k13-k23+k39, -k20+k38,
        k25+k37, b*k26/a-c*k26/a-k34+k42, -2*k44, k45, k46,
        b*k47/a-c*k47/a, k41, k44, -k46, -b*k47/a+c*k47/a,
        k12+k24, -k19-k25, -a*k27/b+c*k27/b-k33, k45, -k46,
        -a*k48/b+c*k48/b, a*k28/c-b*k28/c+k40, -k45, k46,
        a*k48/b-c*k48/b, a*k49/c-b*k49/c, -a*k49/c+b*k49/c,
        -k1, -k4, -k3, k15, k18-k2, k17, k16, k22, k25-k7,
        k24+k30, k21+k23-k31, k28, -k44, k45, -k30-k6, k20+k32,
        k27+b*k33/a-c*k33/a, k44, -k46, -b*k47/a+c*k47/a, -k36,
        k31-k39-k5, -k32-k38, k19-k37, k26-a*k34/b+c*k34/b-k42,
        k44, -2*k45, k46, a*k48/b-c*k48/b, a*k35/c-b*k35/c-k41,
        -k44, k46, b*k47/a-c*k47/a, -a*k49/c+b*k49/c, -k40, k45,
        -k46, -a*k48/b+c*k48/b, a*k49/c-b*k49/c, k1, k4, k3, -k8,
        -k11, -k10+k2, -k9, k37+k7, -k14-k38, -k22, -k25-k37, -k24+k6,
        -k13-k23+k39, -k28+b*k40/a-c*k40/a, k44, -k45, -k27, -k44,
        k46, b*k47/a-c*k47/a, k29, k32+k38, k31-k39+k5, -k12+k30,
        k35-a*k41/b+c*k41/b, -k44, k45, -k26+k34+a*k42/c-b*k42/c,
        k44, k45, -2*k46, -b*k47/a+c*k47/a, -a*k48/b+c*k48/b,
        a*k49/c-b*k49/c, k33, -k45, k46, a*k48/b-c*k48/b,
        -a*k49/c+b*k49/c },
       {k1, k2, k3, k4, k5, k6, k7, k8, k9, k10, k11, k12, k13, k14,
        k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26,
        k27, k28, k29, k30, k31, k32, k33, k34, k35, k36, k37, k38,
        k39, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49});


{{k1=0,

  k2=0,

  k3=0,

  k4=0,

  k5=0,

  k6=0,

  k7=0,

  k8=0,

  k9=0,

  k10=0,

  k11=0,

  k12=0,

  k13=0,

  k14=0,

  k15=0,

  k16=0,

  k17=0,

  k18=0,

  k19=0,

  k20=0,

  k21=0,

  k22=0,

  k23=arbcomplex(14),

  k24=0,

  k25=0,

       arbcomplex(15)*a
  k26=------------------,
              c

  k27=0,

  k28=0,

  k29=0,

  k30=0,

  k31=arbcomplex(14),

  k32=0,

  k33=0,

       arbcomplex(15)*b
  k34=------------------,
              c

  k35=0,

  k36=0,

  k37=0,

  k38=0,

  k39=arbcomplex(14),

  k40=0,

  k41=0,

  k42=arbcomplex(15),

  k43=arbcomplex(16),

  k44=0,

  k45=0,

  k46=0,

  k47=0,

  k48=0,

  k49=0}}


off cramer;



% Problem 5.

solve ({2*a3*b3+a5*b3+a3*b5, a5*b3+2*a5*b5+a3*b5,
        a5*b5, a2*b2, a4*b4, a5*b1+b5+a4*b3+a3*b4,
        a5*b3+a5*b5+a3*b5+a3*b3, a0*b2+b2+a4*b2+a2*b4+c2+a2*b0+a2*b1,
        a0*b0+a0*b1+a0*b4+a3*b2+b0+b1+b4+a4*b0+a4*b1+a2*b5+a4*b4+c1+c4
        +a5*b2+a2*b3+c0,
        -1+a3*b0+a0*b3+a0*b5+a5*b0+b3+b5+a5*b4+a4*b3+a4*b5+a3*b4+a5*b1
        +a3*b1+c3+c5,
        b4+a4*b1, a5*b3+a3*b5, a2*b1+b2, a4*b5+a5*b4, a2*b4+a4*b2,
        a0*b5+a5*b0+a3*b4+2*a5*b4+a5*b1+b5+a4*b3+2*a4*b5+c5,
        a4*b0+2*a4*b4+a2*b5+b4+a4*b1+a5*b2+a0*b4+c4,
        c3+a0*b3+2*b3+b5+a4*b3+a3*b0+2*a3*b1+a5*b1+a3*b4,
        c1+a0*b1+2*b1+a4*b1+a2*b3+b0+a3*b2+b4});


Unknowns: {a0,a2,a3,a4,a5,b0,b1,b2,b3,b4,b5,c0,c1,c2,c3,c4,c5}

{{b5=0,

  b4=0,

  a5=0,

  a4=0,

  b3=0,

  b1=arbcomplex(23),

       - 1
  a3=------,
       b1

  b2=0,

  a2=0,

  c5=0,

  c4=0,

  b0=arbcomplex(24),

      b0 + 2*b1
  c3=-----------,
         b1

  a0=arbcomplex(25),

  c1= - a0*b1 - b0 - 2*b1,

  c2=0,

  c0= - a0*b0 + b1},

 {b5=0,

  b4=0,

  a5=0,

  a4=0,

  b3=-1,

  a3=0,

  b2=0,

  a2=0,

  c5=0,

  c4=0,

  a0=arbcomplex(17),

  c3=a0 + 2,

  b0=arbcomplex(18),

  b1=arbcomplex(19),

  c1= - a0*b1 - b0 - 2*b1,

  c2=0,

  c0= - a0*b0 + b1},

 {b5=0,

  b4=0,

  a5=0,

  a4=0,

  b3=-1,

  b1=0,

  a3=0,

  b2=0,

  c5=0,

  c4=0,

  a0=arbcomplex(20),

  c3=a0 + 2,

  a2=arbcomplex(21),

  b0=arbcomplex(22),

  c1=a2 - b0,

  c2= - a2*b0,

  c0= - a0*b0}}



% Problem 6.

solve({2*a3*b3+a5*b3+a3*b5, a5*b3+2*a5*b5+a3*b5,
       a4*b4, a5*b3+a5*b5+a3*b5+a3*b3, b1, a3*b3, a2*b2, a5*b5,
       a5*b1+b5+a4*b3+a3*b4, a0*b2+b2+a4*b2+a2*b4+c2+a2*b0+a2*b1,
       b4+a4*b1, b3+a3*b1, a5*b3+a3*b5, a2*b1+b2, a4*b5+a5*b4,
       a2*b4+a4*b2, a0*b0+a0*b1+a0*b4+a3*b2+b0+b1+b4+a4*b0+a4*b1
       +a2*b5+a4*b4+c1+c4+a5*b2+a2*b3+c0,-1+a3*b0+a0*b3+a0*b5+a5*b0
       +b3+b5+a5*b4+a4*b3+a4*b5+a3*b4+a5*b1+a3*b1+c3+c5,
       a0*b5+a5*b0+a3*b4+2*a5*b4+a5*b1+b5+a4*b3+2*a4*b5+c5,
       a4*b0+2*a4*b4+a2*b5+b4+a4*b1+a5*b2+a0*b4+c4,
       c3+a0*b3+2*b3+b5+a4*b3+a3*b0+2*a3*b1+a5*b1+a3*b4,
       c1+a0*b1+2*b1+a4*b1+a2*b3+b0+a3*b2+b4});


Unknowns: {a0,a2,a3,a4,a5,b0,b1,b2,b3,b4,b5,c0,c1,c2,c3,c4,c5}

{}


% Example cited by Bruno Buchberger
%        in R.Janssen: Trends in Computer Algebra,
%     Springer, 1987
% Geometry of a simple robot,
%   l1,l2   length of arms
%   ci,si   cos and sin of rotation angles


solve( { c1*c2 -cf*ct*cp + sf*sp,
         s1*c2 - sf*ct*cp - cf*sp,
         s2 + st*cp,
         -c1*s2 - cf*ct*sp + sf*cp,
         -s1*s2 + sf*ct*sp - cf*cp,
         c2 - st*sp,
         s1 - cf*st,
         -c1 - sf*st,
         ct,
         l2*c1*c2 - px,
         l2*s1*c2 - py,
         l2*s2 + l1 - pz,
         c1**2 + s1**2 -1,
         c2**2 + s2**2 -1,
         cf**2 + sf**2 -1,
         ct**2 + st**2 -1,
         cp**2 + sp**2 -1},
      {c1,c2,s1,s2,py,cf,ct,cp,sf,st,sp});


                2               2     2
      sqrt( - l1  + 2*l1*pz + l2  - pz )
{{sp=------------------------------------,
                      l2

  st=1,

                2               2     2
      sqrt( - l1  + 2*l1*pz + l2  - pz )*px
  sf=---------------------------------------,
              2               2     2
            l1  - 2*l1*pz - l2  + pz

      l1 - pz
  cp=---------,
        l2

             2               2     2     2
      sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  cf=---------------------------------------,
                2               2     2
         sqrt(l1  - 2*l1*pz - l2  + pz )

             2               2     2     2
      sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  s1=---------------------------------------,
                2               2     2
         sqrt(l1  - 2*l1*pz - l2  + pz )

                2               2     2
      sqrt( - l1  + 2*l1*pz + l2  - pz )
  c2=------------------------------------,
                      l2

                   2               2     2
       - sqrt( - l1  + 2*l1*pz + l2  - pz )*px
  c1=------------------------------------------,
               2               2     2
             l1  - 2*l1*pz - l2  + pz

                2               2     2         2               2     2     2
      sqrt( - l1  + 2*l1*pz + l2  - pz )*sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  py=--------------------------------------------------------------------------,
                                 2               2     2
                          sqrt(l1  - 2*l1*pz - l2  + pz )

       - l1 + pz
  s2=------------,
          l2

  ct=0},

                2               2     2
      sqrt( - l1  + 2*l1*pz + l2  - pz )
 {sp=------------------------------------,
                      l2

  st=1,

                2               2     2
      sqrt( - l1  + 2*l1*pz + l2  - pz )*px
  sf=---------------------------------------,
              2               2     2
            l1  - 2*l1*pz - l2  + pz

      l1 - pz
  cp=---------,
        l2

                2               2     2     2
       - sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  cf=------------------------------------------,
                 2               2     2
          sqrt(l1  - 2*l1*pz - l2  + pz )

                2               2     2     2
       - sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  s1=------------------------------------------,
                 2               2     2
          sqrt(l1  - 2*l1*pz - l2  + pz )

                2               2     2
      sqrt( - l1  + 2*l1*pz + l2  - pz )
  c2=------------------------------------,
                      l2

                   2               2     2
       - sqrt( - l1  + 2*l1*pz + l2  - pz )*px
  c1=------------------------------------------,
               2               2     2
             l1  - 2*l1*pz - l2  + pz

  py

                 2               2     2         2               2     2     2
     - sqrt( - l1  + 2*l1*pz + l2  - pz )*sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  =-----------------------------------------------------------------------------
                                 2               2     2
                          sqrt(l1  - 2*l1*pz - l2  + pz )

  ,

       - l1 + pz
  s2=------------,
          l2

  ct=0},

                2               2     2
      sqrt( - l1  + 2*l1*pz + l2  - pz )
 {sp=------------------------------------,
                      l2

  st=-1,

                2               2     2
      sqrt( - l1  + 2*l1*pz + l2  - pz )*px
  sf=---------------------------------------,
              2               2     2
            l1  - 2*l1*pz - l2  + pz

       - l1 + pz
  cp=------------,
          l2

             2               2     2     2
      sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  cf=---------------------------------------,
                2               2     2
         sqrt(l1  - 2*l1*pz - l2  + pz )

                2               2     2     2
       - sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  s1=------------------------------------------,
                 2               2     2
          sqrt(l1  - 2*l1*pz - l2  + pz )

                   2               2     2
       - sqrt( - l1  + 2*l1*pz + l2  - pz )
  c2=---------------------------------------,
                       l2

                2               2     2
      sqrt( - l1  + 2*l1*pz + l2  - pz )*px
  c1=---------------------------------------,
              2               2     2
            l1  - 2*l1*pz - l2  + pz

                2               2     2         2               2     2     2
      sqrt( - l1  + 2*l1*pz + l2  - pz )*sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  py=--------------------------------------------------------------------------,
                                 2               2     2
                          sqrt(l1  - 2*l1*pz - l2  + pz )

       - l1 + pz
  s2=------------,
          l2

  ct=0},

                2               2     2
      sqrt( - l1  + 2*l1*pz + l2  - pz )
 {sp=------------------------------------,
                      l2

  st=-1,

                2               2     2
      sqrt( - l1  + 2*l1*pz + l2  - pz )*px
  sf=---------------------------------------,
              2               2     2
            l1  - 2*l1*pz - l2  + pz

       - l1 + pz
  cp=------------,
          l2

                2               2     2     2
       - sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  cf=------------------------------------------,
                 2               2     2
          sqrt(l1  - 2*l1*pz - l2  + pz )

             2               2     2     2
      sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  s1=---------------------------------------,
                2               2     2
         sqrt(l1  - 2*l1*pz - l2  + pz )

                   2               2     2
       - sqrt( - l1  + 2*l1*pz + l2  - pz )
  c2=---------------------------------------,
                       l2

                2               2     2
      sqrt( - l1  + 2*l1*pz + l2  - pz )*px
  c1=---------------------------------------,
              2               2     2
            l1  - 2*l1*pz - l2  + pz

  py

                 2               2     2         2               2     2     2
     - sqrt( - l1  + 2*l1*pz + l2  - pz )*sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  =-----------------------------------------------------------------------------
                                 2               2     2
                          sqrt(l1  - 2*l1*pz - l2  + pz )

  ,

       - l1 + pz
  s2=------------,
          l2

  ct=0},

                   2               2     2
       - sqrt( - l1  + 2*l1*pz + l2  - pz )
 {sp=---------------------------------------,
                       l2

  st=1,

                   2               2     2
       - sqrt( - l1  + 2*l1*pz + l2  - pz )*px
  sf=------------------------------------------,
               2               2     2
             l1  - 2*l1*pz - l2  + pz

      l1 - pz
  cp=---------,
        l2

             2               2     2     2
      sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  cf=---------------------------------------,
                2               2     2
         sqrt(l1  - 2*l1*pz - l2  + pz )

             2               2     2     2
      sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  s1=---------------------------------------,
                2               2     2
         sqrt(l1  - 2*l1*pz - l2  + pz )

                   2               2     2
       - sqrt( - l1  + 2*l1*pz + l2  - pz )
  c2=---------------------------------------,
                       l2

                2               2     2
      sqrt( - l1  + 2*l1*pz + l2  - pz )*px
  c1=---------------------------------------,
              2               2     2
            l1  - 2*l1*pz - l2  + pz

  py

                 2               2     2         2               2     2     2
     - sqrt( - l1  + 2*l1*pz + l2  - pz )*sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  =-----------------------------------------------------------------------------
                                 2               2     2
                          sqrt(l1  - 2*l1*pz - l2  + pz )

  ,

       - l1 + pz
  s2=------------,
          l2

  ct=0},

                   2               2     2
       - sqrt( - l1  + 2*l1*pz + l2  - pz )
 {sp=---------------------------------------,
                       l2

  st=1,

                   2               2     2
       - sqrt( - l1  + 2*l1*pz + l2  - pz )*px
  sf=------------------------------------------,
               2               2     2
             l1  - 2*l1*pz - l2  + pz

      l1 - pz
  cp=---------,
        l2

                2               2     2     2
       - sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  cf=------------------------------------------,
                 2               2     2
          sqrt(l1  - 2*l1*pz - l2  + pz )

                2               2     2     2
       - sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  s1=------------------------------------------,
                 2               2     2
          sqrt(l1  - 2*l1*pz - l2  + pz )

                   2               2     2
       - sqrt( - l1  + 2*l1*pz + l2  - pz )
  c2=---------------------------------------,
                       l2

                2               2     2
      sqrt( - l1  + 2*l1*pz + l2  - pz )*px
  c1=---------------------------------------,
              2               2     2
            l1  - 2*l1*pz - l2  + pz

                2               2     2         2               2     2     2
      sqrt( - l1  + 2*l1*pz + l2  - pz )*sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  py=--------------------------------------------------------------------------,
                                 2               2     2
                          sqrt(l1  - 2*l1*pz - l2  + pz )

       - l1 + pz
  s2=------------,
          l2

  ct=0},

                   2               2     2
       - sqrt( - l1  + 2*l1*pz + l2  - pz )
 {sp=---------------------------------------,
                       l2

  st=-1,

                   2               2     2
       - sqrt( - l1  + 2*l1*pz + l2  - pz )*px
  sf=------------------------------------------,
               2               2     2
             l1  - 2*l1*pz - l2  + pz

       - l1 + pz
  cp=------------,
          l2

             2               2     2     2
      sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  cf=---------------------------------------,
                2               2     2
         sqrt(l1  - 2*l1*pz - l2  + pz )

                2               2     2     2
       - sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  s1=------------------------------------------,
                 2               2     2
          sqrt(l1  - 2*l1*pz - l2  + pz )

                2               2     2
      sqrt( - l1  + 2*l1*pz + l2  - pz )
  c2=------------------------------------,
                      l2

                   2               2     2
       - sqrt( - l1  + 2*l1*pz + l2  - pz )*px
  c1=------------------------------------------,
               2               2     2
             l1  - 2*l1*pz - l2  + pz

  py

                 2               2     2         2               2     2     2
     - sqrt( - l1  + 2*l1*pz + l2  - pz )*sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  =-----------------------------------------------------------------------------
                                 2               2     2
                          sqrt(l1  - 2*l1*pz - l2  + pz )

  ,

       - l1 + pz
  s2=------------,
          l2

  ct=0},

                   2               2     2
       - sqrt( - l1  + 2*l1*pz + l2  - pz )
 {sp=---------------------------------------,
                       l2

  st=-1,

                   2               2     2
       - sqrt( - l1  + 2*l1*pz + l2  - pz )*px
  sf=------------------------------------------,
               2               2     2
             l1  - 2*l1*pz - l2  + pz

       - l1 + pz
  cp=------------,
          l2

                2               2     2     2
       - sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  cf=------------------------------------------,
                 2               2     2
          sqrt(l1  - 2*l1*pz - l2  + pz )

             2               2     2     2
      sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  s1=---------------------------------------,
                2               2     2
         sqrt(l1  - 2*l1*pz - l2  + pz )

                2               2     2
      sqrt( - l1  + 2*l1*pz + l2  - pz )
  c2=------------------------------------,
                      l2

                   2               2     2
       - sqrt( - l1  + 2*l1*pz + l2  - pz )*px
  c1=------------------------------------------,
               2               2     2
             l1  - 2*l1*pz - l2  + pz

                2               2     2         2               2     2     2
      sqrt( - l1  + 2*l1*pz + l2  - pz )*sqrt(l1  - 2*l1*pz - l2  + px  + pz )
  py=--------------------------------------------------------------------------,
                                 2               2     2
                          sqrt(l1  - 2*l1*pz - l2  + pz )

       - l1 + pz
  s2=------------,
          l2

  ct=0}}


% Steady state computation of a prototypical chemical
% reaction network (the "Edelstein" network)
 
solve(
 { alpha * c1 - beta * c1**2 - gamma*c1*c2 + epsilon*c3,
   -gamma*c1*c2 + (epsilon+theta)*c3 -eta *c2,
   gamma*c1*c2 + eta*c2 - (epsilon+theta) * c3},
  {c3,c2,c1});


{{c1=arbcomplex(26),

      c1*( - c1*beta*epsilon - c1*beta*theta + alpha*epsilon + alpha*theta)
  c2=-----------------------------------------------------------------------,
                          c1*gamma*theta - epsilon*eta

               2
      c1*( - c1 *beta*gamma + c1*alpha*gamma - c1*beta*eta + alpha*eta)
  c3=-------------------------------------------------------------------}}
                        c1*gamma*theta - epsilon*eta


solve(
{( - 81*y1**2*y2**2 + 594*y1**2*y2 - 225*y1**2 + 594*y1*y2**2 - 3492*
y1*y2 - 750*y1 - 225*y2**2 - 750*y2 + 14575)/81,
( - 81*y2**2*y3**2 + 594*y2**2*y3 - 225*y2**2 + 594*y2*y3**2 - 3492*
y2*y3 - 750*y2 - 225*y3**2 - 750*y3 + 14575)/81,
( - 81*y1**2*y3**2 + 594*y1**2*y3 - 225*y1**2 + 594*y1*y3**2 - 3492*
y1*y3 - 750*y1 - 225*y3**2 - 750*y3 + 14575)/81,
(2*(81*y1**2*y2**2*y3 + 81*y1**2*y2*y3**2 - 594*y1**2*y2*y3 - 225*y1
**2*y2 - 225*y1**2*y3 + 1650*y1**2 + 81*y1*y2**2*y3**2 - 594*y1*
y2**2*y3 - 225*y1*y2**2 - 594*y1*y2*y3**2 + 2592*y1*y2*y3 + 2550
*y1*y2 - 225*y1*y3**2 + 2550*y1*y3 - 3575*y1 - 225*y2**2*y3 +
1650*y2**2 - 225*y2*y3**2 + 2550*y2*y3 - 3575*y2 + 1650*y3**2 -
3575*y3 - 30250))/81}, {y1,y2,y3,y4});


{{y3=arbcomplex(28),

           2
  y2=(99*y3  - 582*y3

                      4          3           2
       + 4*sqrt(243*y3  - 3348*y3  + 15282*y3  - 26100*y3 + 11875)*sqrt(2) - 125

                2
      )/(3*(9*y3  - 66*y3 + 25)),

           2
  y1=(99*y3  - 582*y3

                      4          3           2
       - 4*sqrt(243*y3  - 3348*y3  + 15282*y3  - 26100*y3 + 11875)*sqrt(2) - 125

                2
      )/(3*(9*y3  - 66*y3 + 25))},

 {y3=arbcomplex(27),

           2
  y2=(99*y3  - 582*y3

                      4          3           2
       - 4*sqrt(243*y3  - 3348*y3  + 15282*y3  - 26100*y3 + 11875)*sqrt(2) - 125

                2
      )/(3*(9*y3  - 66*y3 + 25)),

           2
  y1=(99*y3  - 582*y3

                      4          3           2
       + 4*sqrt(243*y3  - 3348*y3  + 15282*y3  - 26100*y3 + 11875)*sqrt(2) - 125

                2
      )/(3*(9*y3  - 66*y3 + 25))},

      11      11      11
 {y3=----,y2=----,y1=----},
      3       3       3

       - 5       - 5       - 5
 {y3=------,y2=------,y1=------}}
       3         3         3


% Another nice nonlinear system.

solve({y=x+t^2,x=y+u^2},{x,y,u,t});


{{t=arbcomplex(31),

  u=t*i,

  y=arbcomplex(32),

         2
  x=y - t },

 {t=arbcomplex(29),

  u= - t*i,

  y=arbcomplex(30),

         2
  x=y - t }}


% Example from Stan Kameny (relation between Gamma function values)
%   containing surds in the coefficients.

solve({x54=x14/4,x54*x34=sqrt pi/sqrt 2*x32,x32=x12/2,
       x12=sqrt pi, x14*x34=pi*sqrt 2});


Unknowns: {x12,x14,x32,x34,x54}

{{x54=arbcomplex(33),

       sqrt(2)*pi
  x34=------------,
         4*x54

  x12=sqrt(pi),

  x14=4*arbcomplex(33),

       sqrt(pi)
  x32=----------}}
          2


% A system given by J. Hietarinta with complex coefficients.

on complex;



apu := {2*a - a6,2*b*c3 - 1,i - 2*x + 1,2*x**2 - 2*x + 1,n1 + 1}$



solve apu;


Unknowns: {a,a6,b,c3,n1,x}

{{c3=arbcomplex(34),

      1
  b=------,
     2*c3

     a6
  a=----,
     2

  n1=-1,

       1
  x=-------}}
     1 - i


clear apu;



off complex;



% More examples that can now be solved.

solve({e^(x+y)-1,x-y},{x,y});


{{y=log(-1),x=log(-1)},{y=0,x=0}}


solve({e^(x+y)+sin x,x-y},{x,y});


             2*y_
{{y=root_of(e     + sin(y_),y_,tag_14),x=y}}
 % no algebraic solution exists.

solve({e^(x+y)-1,x-y**2},{x,y});


         2           2
{{y=0,x=y },{y=-1,x=y }}


solve(e^(y^2) * e^y -1,y);


{y=0}


solve(e^(y^2 +y)-1,y);


{y=0}


solve(e^(y^2)-1,y);


{y=0}


solve(e^(y^2+1)-1,y);


             1
{y=sqrt(log(---)),
             e

                1
 y= - sqrt(log(---))}
                e


solve({e^(x+y+z)-1,x-y**2=1,x**2-z=2},{x,y,z});


            atanh(sqrt(5))
{{y=2*cosh(----------------)*i,
                  3

     4      2
  z=y  + 2*y  - 1,

     2
  x=y  + 1},

             atanh(sqrt(5))                     atanh(sqrt(5))
 {y= - cosh(----------------)*i + sqrt(3)*sinh(----------------),
                   3                                  3

     4      2
  z=y  + 2*y  - 1,

     2
  x=y  + 1},

              atanh(sqrt(5))                     atanh(sqrt(5))
 {y= - (cosh(----------------)*i + sqrt(3)*sinh(----------------)),
                    3                                  3

     4      2
  z=y  + 2*y  - 1,

     2
  x=y  + 1},

         4      2        2
 {y=0,z=y  + 2*y  - 1,x=y  + 1}}


solve(e^(y^4+3y^2+y)-1,y);


                           2/3                   1/3  1/3
{y=(sqrt( - 3*(sqrt(5) + 3)    - 12*(sqrt(5) + 3)   *2    + 2*sqrt(

                           2/3  2/3                1/3           1/3  1/6
            9*(sqrt(5) + 3)   *2    + (sqrt(5) + 3)   *sqrt(15)*3   *3

                              1/3          1/3  1/6                   1/3
             + 3*(sqrt(5) + 3)   *sqrt(3)*3   *3    + 12*(sqrt(5) + 3)

                  1/3           1/6      1/3          1/6      1/3   1/3  1/6
             + 2*6   *sqrt(15)*3    + 6*6   *sqrt(3)*3    + 6*2   )*3   *3

               2/3                 1/3            1/3
          - 3*2   ) + (sqrt(5) + 3)   *sqrt(3) - 2   *sqrt(3))/(2

                    1/6  1/6
      *(sqrt(5) + 3)   *2   *sqrt(3))}


% Transcendental equations proposed by Roger Germundsson
% <roger@isy.liu.se>

eq1 := 2*asin(x) + asin(2*x) - PI/2;


        2*asin(2*x) + 4*asin(x) - pi
eq1 := ------------------------------
                     2

eq2 := 2*asin(x) - acos(3*x);


eq2 :=  - acos(3*x) + 2*asin(x)

eq3 := acos(x) - atan(x);


eq3 := acos(x) - atan(x)

eq4 := acos(2*x**2 - 4*x -x) - 2*asin(x);


               2
eq4 := acos(2*x  - 5*x) - 2*asin(x)

eq5 := 2*atan(x) - atan( 2*x/(1-x**2) );


              2*x
eq5 := atan(--------) + 2*atan(x)
              2
             x  - 1


sol1 := solve(eq1,x);


            sqrt(3) - 1
sol1 := {x=-------------}
                 2

sol2 := solve(eq2,x);


            sqrt(17) - 3
sol2 := {x=--------------}
                 4

sol3 := solve(eq3,x);


            sqrt(sqrt(5) - 1)
sol3 := {x=-------------------}
                 sqrt(2)

sol4 := solve(eq4,x);


sol4 := {}

sol5 := solve(eq5,x);


sol5 := {x=arbcomplex(36)}
   % This solution should be the open interval
                        % (-1,1).

% Example 52 of M. Wester: the function has no real zero although
%  REDUCE 3.5 and Maple tend to return 3/4.

if solve(sqrt(x^2 +1) - x +2,x) neq {} then rederr "Illegal result";



% Using a root_of expression as an algebraic number.

solve(x^5 - x - 1,x);


             5
{x=root_of(x_  - x_ - 1,x_,tag_20)}


w:=rhs first ws;


               5
w := root_of(x_  - x_ - 1,x_,tag_20)


w^5;


          5
root_of(x_  - x_ - 1,x_,tag_20) + 1


w^5-w;


1


clear w;



end;
(TIME:  solve 66960 73789)


REDUCE Historical
REDUCE Sourceforge Project | Historical SVN Repository | GitHub Mirror | SourceHut Mirror | NotABug Mirror | Chisel Mirror | Chisel RSS ]