> # THIS IS THE SOLUTION OF PROBLEM 3 in Midterm 2 <<<<<<<<<<<<<<<<<<<<< > restart; > with(Groebner);F:=[x^2+2*y^2-y-2*z,x^2-8*y^2+10*z-1,x^2-7*y*z]; [GB_Internals, MulMatrix, SetBasis, fglm_algo, gbasis, gsolve, hilbertdim, hilbertpoly, hilbertseries, inter_reduce, is_finite, is_solvable, leadcoeff, leadmon, leadterm, normalf, pretend_gbasis, reduce, spoly, termorder, testorder, univpoly] [ 2 2 2 2 2 ] F := [x + 2 y - y - 2 z, x - 8 y + 10 z - 1, x - 7 y z] > G:=gbasis(F,plex(x,y,z)); [ 3 2 2 G := [37 z - 2 + 980 z - 313 z , -980 z + 201 z + 18 y - 13, 2 2 ] 9 x - 392 z + 84 z - 7] > _EnvExplicit:=true; ycoord:=solve(G[2],{y}); xcoord:=solve(G[3],{x}); _EnvExplicit := true / 490 2 67 13\ ycoord := { y = --- z - -- z + -- } \ 9 6 18/ / (1/2)\ | 1 / 2 \ | xcoord := < x = - \392 z - 84 z + 7/ >, | 3 | \ / / (1/2)\ | 1 / 2 \ | < x = - - \392 z - 84 z + 7/ > | 3 | \ / > rootlist:=[evalf(solve(G[1]))]; rootlist := [0.1660154538, 0.07668615060 + 0.08007598980 I, 0.07668615060 - 0.08007598980 I] > for z in rootlist do > print('z-coordinate',z, 'y-coordinate',ycoord, 'x-coordinate', > xcoord); > od: z - coordinate, 0.1660154538, y - coordinate, {y = 0.3689334482}, x - coordinate, {x = 0.6547828470}, {x = -.6547828470} z - coordinate, 0.07668615060 + 0.08007598980 I, y - coordinate, {y = -0.1630381531 - 0.2255257724 I}, x - coordinate, {x = 0.3569853566 - 0.2975626444 I}, {x = -0.3569853566 + 0.2975626444 I} z - coordinate, 0.07668615060 - 0.08007598980 I, y - coordinate, {y = -0.1630381531 + 0.2255257724 I}, x - coordinate, {x = 0.3569853566 + 0.2975626444 I}, {x = -0.3569853566 - 0.2975626444 I} > # Below is the SOLUTION FOR PROBLEM 2B in MIDTERM 2 > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< > restart; with(Groebner); F:=[x^3+x+1, y^3+y+1, z^3+z+1, w^3+w+1, > (x-y)*( y-z)*( x-z)*(x-w)*(y-w)*(z-w)]; [GB_Internals, MulMatrix, SetBasis, fglm_algo, gbasis, gsolve, hilbertdim, hilbertpoly, hilbertseries, inter_reduce, is_finite, is_solvable, leadcoeff, leadmon, leadterm, normalf, pretend_gbasis, reduce, spoly, termorder, testorder, univpoly] [ 3 3 3 3 F := [x + x + 1, y + y + 1, z + z + 1, w + w + 1, ] (x - y) (y - z) (x - z) (x - w) (y - w) (z - w)] > # We see below the number of solutions is eighty one because > solutions for x,y,z,w are independent of each other > gbasis(F,tdeg(x,y,z,w)); [ 3 3 3 3 ] [w + w + 1, z + z + 1, y + y + 1, x + x + 1] > # Now we do the solution of PROBLEM 2A in MIDTERM 2 > <<<<<<<<<<<<<<<<<<<< > restart; > with(Groebner); [GB_Internals, MulMatrix, SetBasis, fglm_algo, gbasis, gsolve, hilbertdim, hilbertpoly, hilbertseries, inter_reduce, is_finite, is_solvable, leadcoeff, leadmon, leadterm, normalf, pretend_gbasis, reduce, spoly, termorder, testorder, univpoly] > F:=[x^2+y^2-1,x^2+y^2+(z-1)^2-4]; [ 2 2 2 2 2 ] F := [x + y - 1, x + y + (z - 1) - 4] > p:=x^2+(1/2)*y^2*z-z-1; 2 1 2 p := x + - y z - z - 1 2 > normalf(p,gbasis(F,plex(x,y,z)),plex(x,y,z)); 1 2 2 - y z - z - y 2