# [Maxima] solving system of equations

Stavros Macrakis macrakis at alum.mit.edu
Wed Mar 26 13:25:00 CDT 2008

```On Wed, Mar 26, 2008 at 12:32 PM, Adam Majewski <adammaj1 at o2.pl> wrote:
>  algsys([2*z=1, z*z+c=z], [c]);
>  does not work

The meaning of algsys( <equations>, <variables> ) is:

find the constraints on the variables which make the equations true
for all values of parameters in the equations. So:

algsys([a*x+y=3,x+b*y=1],[x,y]) =>
[[x = (3*b-1)/(a*b-1),y = (a-3)/(a*b-1)]]
but
algsys([a*x+y=3,x+b*y=1],[a,b]) =>
[[a = -(y-3)/x,b = -(x-1)/y]]
and
algsys([a*x+y=3,x+b*y=1],[a,b,x,y]) =>
[[a = (3*%r1-%r1*%r2)/(%r1*(1-%r1*%r2)),b = %r1,x =
1-%r1*%r2,y = %r2]]
and even
algsys([a*x+y=3,x+b*y=1],[x,b]) =>
[[x = -(y-3)/a,b = (y+a-3)/(a*y)]]
algsys([a*x+y=3,x+b*y=1],[y,a]) =>
[[y = -(x-1)/b,a = (x+3*b-1)/(b*x)]]
etc.

In your equations, if you treat z as a parameter (that is, don't
include it in the variable list), algsys will find no solutions,
because there is no value of c which will make 2*z=1 true for all
values of z.

-s
```