# [Maxima] solution of system of quadratic eqns

Richard Fateman fateman at eecs.berkeley.edu
Sat Jun 23 10:19:01 CDT 2012

```On 6/23/2012 8:08 AM, Krishna Myneni wrote:
>
>
> In solving the set, eq1 and (eq1-eq2), the quadratic terms, x^2 and
> y^2, drop out in the second equation. Hence, we are left with one
> quadratic equation and one linear one. Perhaps that simplification
> enables Maxima to solve the system. I would have thought Maxima to be
> capable of arriving at this point on its own though.
>
> Krishna
It should be entirely.

The resultant method works, e.g.

resultant  (lhs(e1)-1, lhs(e2)-1, x)  gives a quadratic equation in y only

To see what is going on, do this..

trace(algsys,resultant).

It is possible that someone is confusing sqrt(7)  as an extra unknown
variable.

For what it is worth, the commercial Macsyma does this without
difficulty. It seems to use
a grobner basis algorithm, but the default is a triangularization
method. The
documentation follows:

RIANGSYS([exp1, ..., expn], [var1, ..., varn])

TRIANGSYS accepts the same arguments as does ALGSYS, but instead
of solving the system of equations it just triangularizes them,
using pseudo-division based elimination techniques.  Such techniques
may be viewed as a nonlinear generalization of the triangularization
performed during Gaussian elimination.  TRIANGSYS is employed by
ALGSYS (and hence SOLVE) when ALGSYS_USES_TRIANGSYS is TRUE.
TRIANGSYS returns a list of solutions, each solution consisting
of a triangularized list of polynomials.  Such a list will be
of the following form, where say [var1,...,varn] = [u,v,...,y,z],

[   p1(u)
p2(u,v)
.
.
.
p[n-1](u,v,...,y)
p[n](u,v,...,y,z)  ]

Thus to solve such a system one need only solve the first equation,
back-substitute each root into the remaining equations, and iterate,
just as in the back-substitution process in Gaussian elimination.
This may be accomplished using the ROOT_VALUES command.  Note that
some of the polynomials p[i] may be identically zero if the system is
not zero-dimensional.  For further description of recent work on such
elimination techniques see, e.g. Dongming Wang, An Elimination Method
Based on Seidenberg's Theory and Its Applications, pp. 301-328 in:
Computational Algebraic Geometry, F. Eyssette, A. Galligo (eds.),
Birkhauser Publ. Comp., 1993.

```