Рейтинг@Mail.ru

 

 

Robert M. Corless
Department of Applied Mathematics
University of Western Ontario
London, Canada

Copyright 2001 by Robert M. Corless
All rights reserved

Useful one-word commands 

Использование монокоманд

Solving equations 

Решение уравнений

Systems of polynomial equations 

Системы рациональных уравнений

> restart;
> eq1 := x^2 - y^2 - 1;

eq1 := x^2-y^2-1

> eq2 := x^3 - 3*x*y^2 + 3*x^2*y - y^3 + 1;

eq2 := x^3-3*x*y^2+3*x^2*y-y^3+1

> alias( alpha=RootOf( 6*y+3+6*y^3+2*y^2, y ) );

alpha

> solve( {eq1, eq2}, {x,y} );

{x = -1, y = 0}, {y = alpha, x = -3/7*alpha+6/7*alp...

> with(Groebner);

> gb := gbasis( {eq1,eq2}, plex(x,y) );

gb := [6*y^2+3*y+6*y^4+2*y^3, 7*x+24*y^3+7+27*y+2*y...

> factor(gb[1]);

y*(6*y+3+6*y^3+2*y^2)

> restart;
> LSY[1] := x^3*y^2 + c1*x^3*y + y^2 + c2*x + c3;

LSY[1] := x^3*y^2+c1*x^3*y+y^2+c2*x+c3

> LSY[2] := c4*x^4*y^2 - x^2*y + y + c5;

LSY[2] := c4*x^4*y^2-x^2*y+y+c5

> with(Groebner):

> gb := gbasis({LSY[1],LSY[2]},tdeg(x,y)):

> ( ns, rv ) := SetBasis(gb, tdeg(x,y)):
> ns;

[1, y, x, y^2, x*y, x^2, y^3, x*y^2, x^2*y, x^3]

> nops( ns );

10

> Mx := MulMatrix(x, ns, rv, gb, tdeg(x,y)):

> My := MulMatrix(y, ns, rv, gb, tdeg(x,y)):
> factor( Mx[10,3] );

> ( c1, c2, c3, c4, c5 ) := seq( rand()/1.0e12, i=1..5 ):
> Digits := trunc(evalhf(Digits));

Digits := 14

> with( LinearAlgebra ):

> ( xvals, V ) := Eigenvectors( evalf( map(eval,Mx) ) ):
> yvals := [ seq(V[2,i]/V[1,i],i=1..10) ]:
> LSY[1], LSY[2];

> residuals := [ seq( eval([LSY[1],LSY[2]], {x=xvals[i],y=yvals[i]} ), i=1..10 ) ];

> restart;
> with(Groebner):
> f[1] := c*x[1]^2*x[2] + 9*x[1]^2+2*x[1]*x[2] + 5*x[1] + x[2] - 3;

f[1] := c*x[1]^2*x[2]+9*x[1]^2+2*x[1]*x[2]+5*x[1]+x...

> f[2] := 2*x[1]^3*x[2] + 6*x[1]^3 - 2*x[1]^2 - x[1]*x[2] - 3*x[1] - x[2] + 3;

f[2] := 2*x[1]^3*x[2]+6*x[1]^3-2*x[1]^2-x[1]*x[2]-3...

> f[3] := x[1]^3*x[2] + 3*x[1]^3 + x[1]^2*x[2] + 2*x[1]^2;

f[3] := x[1]^3*x[2]+3*x[1]^3+x[1]^2*x[2]+2*x[1]^2

> infolevel[primpart] := 3;

infolevel[primpart] := 3

> gb := gbasis( [f[1], f[2], f[3] ], tdeg(x[1],x[2]) ):
Groebner/primpartscale:   remove content   1
Groebner/primpartscale:   total degree drops from   4    to    4
Groebner/primpartscale:   remove content   1
Groebner/primpartscale:   total degree drops from   4    to    4
Groebner/primpartscale:   remove content   1
Groebner/primpartscale:   total degree drops from   4    to    4
Groebner/primpartscale:   remove content   1
Groebner/primpartscale:   total degree drops from   2    to    2
Groebner/primpartscale:   remove content   1
Groebner/primpartscale:   total degree drops from   3    to    3
Groebner/primpartscale:   remove content   321110693270
Groebner/primpartscale:   total degree drops from   3    to    3
Groebner/primpartscale:   remove content   c
Groebner/primpartscale:   total degree drops from   5    to    4
Groebner/primpartscale:   remove content   2061798442164
Groebner/primpartscale:   total degree drops from   2    to    2
Groebner/primpartscale:   remove content   6*c-18
Groebner/primpartscale:   total degree drops from   5    to    4
Groebner/primpartscale:   remove content   474256143559
Groebner/primpartscale:   total degree drops from   3    to    3
Groebner/primpartscale:   remove content   c-4
Groebner/primpartscale:   total degree drops from   8    to    7
Groebner/primpartscale:   remove content

   1582056871276788296912783061320160

Groebner/primpartscale:   total degree drops from   2    to    2
Groebner/primpartscale:   remove content   3*c^3-20*c^2+31*c
Groebner/primpartscale:   total degree drops from   8    to    5
Groebner/primpartscale:   remove content

154226949894435825640717196641350131221990926097388518814729208486400323000

Groebner/primpartscale:   total degree drops from   1    to    1
Groebner/primpartscale:   remove content

207576-406224*c+328200*c^2-140064*c^3+33288*c^4-4176*c^5+216*c^6

Groebner/primpartscale:   total degree drops from   8    to    2
Groebner/primpartscale:   remove content

477965563672601999255685915977443710701485806515705561188280393887770174970065226500

Groebner/primpartscale:   total degree drops from   1    to    1
Groebner/primpartscale:   remove content 
-497925750*c^2+276112900*c^3+18748450*c^5-92580600*c^4
-2119250*c^6+102900*c^7+502892950*c-219343600
Groebner/primpartscale:   total degree drops from   8    to    1
Groebner/primpartscale:   remove content   97*c-301
Groebner/primpartscale:   total degree drops from   2    to    1
Groebner/primpartscale:   remove content   1
Groebner/primpartscale:   total degree drops from   1    to    1
Groebner/primpartscale:   remove content   1
Groebner/primpartscale:   total degree drops from   1    to    1
Groebner/primpartscale:   remove content   1
Groebner/primpartscale:   total degree drops from   1    to    1
> 54-36*c+6*c^2;

54-36*c+6*c^2

> factor( % );

6*(c-3)^2

> infolevel[primpart] := 0;

infolevel[primpart] := 0

> gb3 := gbasis( [ eval(f[1],c=3), f[2], f[3] ], tdeg(x[1],x[2]) );

gb3 := [-8*x[1]-5*x[2]-3+2*x[2]^2, x[1]*x[2]+x[1]-x...

С официального разрешения                    © 2002 Waterloo Maple, Inc

 
Hosted by uCoz