### The Maxima on-line user's manual

Algebra Calculator

#### Algsys

Function: algsys ([<expr_1>, ..., <expr_m>], [<x_1>, ..., <x_n>])

Function: algsys ([<eqn_1>, ..., <eqn_m>], [<x_1>, ..., <x_n>]) Solves the simultaneous polynomials <expr_1>, ..., <expr_m> or polynomial equations <eqn_1>, ..., <eqn_m> for the variables <x_1>, ..., <x_n>. An expression <expr> is equivalent to an equation `<expr> = 0`. There may be more equations than variables or vice versa.

`algsys` returns a list of solutions, with each solution given as a list of equations stating values of the variables <x_1>, ..., <x_n> which satisfy the system of equations. If `algsys` cannot find a solution, an empty list `[]` is returned.

The symbols `%r1`, `%r2`, ..., are introduced as needed to represent arbitrary parameters in the solution; these variables are also appended to the list `%rnum_list`.

The method is as follows:

(1) First the equations are factored and split into subsystems.

(2) For each subsystem <S_i>, an equation <E> and a variable <x> are selected. The variable is chosen to have lowest nonzero degree. Then the resultant of <E> and <E_j> with respect to <x> is computed for each of the remaining equations <E_j> in the subsystem <S_i>. This yields a new subsystem <S_i> in one fewer variables, as <x> has been eliminated. The process now returns to (1).

(3) Eventually, a subsystem consisting of a single equation is obtained. If the equation is multivariate and no approximations in the form of floating point numbers have been introduced, then `solve` is called to find an exact solution.

In some cases, `solve` is not be able to find a solution, or if it does the solution may be a very large expression.

If the equation is univariate and is either linear, quadratic, or biquadratic, then again `solve` is called if no approximations have been introduced. If approximations have been introduced or the equation is not univariate and neither linear, quadratic, or biquadratic, then if the switch `realonly` is `true`, the function `realroots` is called to find the real-valued solutions. If `realonly` is `false`, then `allroots` is called which looks for real and complex-valued solutions.

If `algsys` produces a solution which has fewer significant digits than required, the user can change the value of `algepsilon` to a higher value.

If `algexact` is set to `true`, `solve` will always be called.

(4) Finally, the solutions obtained in step (3) are substituted into previous levels and the solution process returns to (1).

When `algsys` encounters a multivariate equation which contains floating point approximations (usually due to its failing to find exact solutions at an earlier stage), then it does not attempt to apply exact methods to such equations and instead prints the message: "`algsys` cannot solve - system too complicated."

Interactions with `radcan` can produce large or complicated expressions. In that case, it may be possible to isolate parts of the result with `pickapart` or `reveal`.

Occasionally, `radcan` may introduce an imaginary unit `%i` into a solution which is actually real-valued.

Examples:

```          (%i1) e1: 2*x*(1 - a1) - 2*(x - 1)*a2;
(%o1)              2 (1 - a1) x - 2 a2 (x - 1)
(%i2) e2: a2 - a1;
(%o2)                        a2 - a1
(%i3) e3: a1*(-y - x^2 + 1);
2
(%o3)                   a1 (- y - x  + 1)
(%i4) e4: a2*(y - (x - 1)^2);
2
(%o4)                   a2 (y - (x - 1) )
(%i5) algsys ([e1, e2, e3, e4], [x, y, a1, a2]);
(%o5) [[x = 0, y = %r1, a1 = 0, a2 = 0],```

```                                            [x = 1, y = 0, a1 = 1, a2 = 1]]
(%i6) e1: x^2 - y^2;
2    2
(%o6)                        x  - y
(%i7) e2: -1 - y + 2*y^2 - x + x^2;
2        2
(%o7)                 2 y  - y + x  - x - 1
(%i8) algsys ([e1, e2], [x, y]);
1            1
(%o8) [[x = - -------, y = -------],
sqrt(3)      sqrt(3)```

1 1 1 1 [x = -------, y = - -------], [x = - -, y = - -], [x = 1, y = 1]] sqrt(3) sqrt(3) 3 3

```(%o1)                                true
(%i2) ```

### Related Examples

##### algsys-display-ev-sqrt

"*"/*Rechtecksberechn...

"*"/*----------------...

"*"/*EINGABE*/;

Calculate

realonly:true;

algsys([log(2*x/-7*x)...

Calculate

w1:4;

l1:0.3;

l2:0.7;

Calculate

##### algsys-diff-obase-plot2d-realonly-true

obase:10;

K(x):= 0.0003*x^3-0.0...

K_s(x):=K(x)/x;

Calculate

##### algsys-jacobian-subst

algsys([-k_c*x+0.002*...

f1:-kc*x+0.002*y ;

f2:-0.001*z+0.1*(y*z+...

Calculate

realonly:true;

a4:81;

a7:2187;

Calculate

##### algsys-diff-log

L:delta*log(1-v)+(1-d...

algsys([diff(L,v),dif...

Calculate

##### algsys

algsys([3*x+2*y+5*z=0...

Calculate

##### algsys

eq1:(3/2)*x*x+2*y*y=4...

eq2:3*x+4*y=7;

algsys([eq1,eq2],[x,y]);

Calculate

##### algsys-diff-realonly-true

realonly:true;

f:x^3+y^3-(3*x)-(12*y...

fx:diff(f,x);

Calculate