Manual Maple 2.2.7.mws

Comandos Úteis e Simples

Seção 2.2: Resolvendo Equações

Session 2.2.7: Sistemas de equações polinomiais

>    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*alpha^2+5/7}

>    with(Groebner);

[MulMatrix, SetBasis, fglm, gbasis, gsolve, hilbertdim, hilbertpoly, hilbertseries, inter_reduce, is_finite, is_solvable, leadcoeff, leadmon, leadterm, normalf, pretend_gbasis, reduce, spoly, termorder...
[MulMatrix, SetBasis, fglm, gbasis, gsolve, hilbertdim, hilbertpoly, hilbertseries, inter_reduce, is_finite, is_solvable, leadcoeff, leadmon, leadterm, normalf, pretend_gbasis, reduce, spoly, termorder...

>    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^2]

>    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] );

(c3*c2^2+2*c1^2*c3*c5^2+c1^3*c5*c3+c4^2*c3^2*c2^2+c1^2*c3^2*c4*c5-c1^2*c4^2*c3^2*c2+2*c1^2*c4^2*c2^2*c3+2*c1^2*c4*c2^2*c5+c1*c4*c2^3+2*c3*c2*c1*c5+c4*c1^3*c2^2+c4*c1*c3^3+c1^3*c4^3*c3^3+c4^3*c3^4*c1+2*...
(c3*c2^2+2*c1^2*c3*c5^2+c1^3*c5*c3+c4^2*c3^2*c2^2+c1^2*c3^2*c4*c5-c1^2*c4^2*c3^2*c2+2*c1^2*c4^2*c2^2*c3+2*c1^2*c4*c2^2*c5+c1*c4*c2^3+2*c3*c2*c1*c5+c4*c1^3*c2^2+c4*c1*c3^3+c1^3*c4^3*c3^3+c4^3*c3^4*c1+2*...
(c3*c2^2+2*c1^2*c3*c5^2+c1^3*c5*c3+c4^2*c3^2*c2^2+c1^2*c3^2*c4*c5-c1^2*c4^2*c3^2*c2+2*c1^2*c4^2*c2^2*c3+2*c1^2*c4*c2^2*c5+c1*c4*c2^3+2*c3*c2*c1*c5+c4*c1^3*c2^2+c4*c1*c3^3+c1^3*c4^3*c3^3+c4^3*c3^4*c1+2*...

>    ( 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];

x^3*y^2+.2972255555*x^3*y+y^2+.3513506612e-1*x+.3238723014e-1, .4126163242e-1*x^4*y^2-x^2*y+y+.4648379030

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

residuals := [[.26093e-12-.168e-11*I, -.60e-12+.8241e-13*I], [.26093e-12+.168e-11*I, -.60e-12-.8241e-13*I], [-.1e-14+0.*I, .3e-13-.7e-14*I], [-.1e-14+0.*I, .3e-13+.7e-14*I], [.9e-14-.13e-13*I, .3e-13+....
residuals := [[.26093e-12-.168e-11*I, -.60e-12+.8241e-13*I], [.26093e-12+.168e-11*I, -.60e-12-.8241e-13*I], [-.1e-14+0.*I, .3e-13-.7e-14*I], [-.1e-14+0.*I, .3e-13+.7e-14*I], [.9e-14-.13e-13*I, .3e-13+....
residuals := [[.26093e-12-.168e-11*I, -.60e-12+.8241e-13*I], [.26093e-12+.168e-11*I, -.60e-12-.8241e-13*I], [-.1e-14+0.*I, .3e-13-.7e-14*I], [-.1e-14+0.*I, .3e-13+.7e-14*I], [.9e-14-.13e-13*I, .3e-13+....
residuals := [[.26093e-12-.168e-11*I, -.60e-12+.8241e-13*I], [.26093e-12+.168e-11*I, -.60e-12-.8241e-13*I], [-.1e-14+0.*I, .3e-13-.7e-14*I], [-.1e-14+0.*I, .3e-13+.7e-14*I], [.9e-14-.13e-13*I, .3e-13+....
residuals := [[.26093e-12-.168e-11*I, -.60e-12+.8241e-13*I], [.26093e-12+.168e-11*I, -.60e-12-.8241e-13*I], [-.1e-14+0.*I, .3e-13-.7e-14*I], [-.1e-14+0.*I, .3e-13+.7e-14*I], [.9e-14-.13e-13*I, .3e-13+....

>    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[2]-3

>    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*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[2]+3, 2*x[1]^2-3*x[1]+2*x[2]-6]

>   

>