Dear Forum, Jan Schneider asked:
> can anybody tell me how to solve multiple equations with GAP? > I know, it's a pretty easy question, but I just started working with GAP. > For example, what do I have to do to let GAP calculate 5*x+y = 17, x*y=18? You can proceed as follows: First define the variables you need: gap> x := Indeterminate(Rationals,1);; SetName(x,"x"); gap> y := Indeterminate(Rationals,2);; SetName(y,"y"); Then compute a reduced Groebner basis for the ideal of C[x,y] defined by your equations, for lex order: gap> ReducedGroebnerBasis([5*x+y-17,x*y-18],MonomialLexOrdering()); [ y^2-17*y+90, x+1/5*y-17/5 ] Then solve the first equation y^2-17*y+90 = 0 for y (note that it is an equation in y, only). Finally, insert the solutions into the second equation x+1/5*y-17/5 = 0 to compute the possible values of x. This process works in a similar way general. -- You can find details in standard textbooks like Cox, Little, O'Shea: Ideals, Varieties, and Algorithms: An Introduction to Computational Algebraic Geometry and Commutative Algebra. If you encounter a univariate polynomial whose Galois group is solvable, you can use the GAP Package RadiRoot ( see http://www.gap-system.org/Packages/radiroot.html ) by Andreas Distler to compute representations of its roots in terms of radicals. There is presently no code in GAP to compute solutions numerically. Hope this helps, Stefan Kohl _______________________________________________ Forum mailing list Forum@mail.gap-system.org http://mail.gap-system.org/mailman/listinfo/forum