
solve - general solver

Calling sequence:
solve(eq, x)
solve(sys, unks)
solve(object)

Parameter:
eq       --  equation or expression
x        --  indeterminate
sys      --  set of equations
unks     --  set of indeterminates
object   --  domain element

Overloading:

1

Summary:

solve(eq, x) solves the equation eq with respect to the variable x, and
returns a list of solutions.  The output [] means that there is no solution;
the output [1,1,2] means that 1 is solution with multiplicity 2, and 2 is a
single solution; the output [x] means that any value of x is solution.

The call solve(sys, unks) solves the system sys with respect to the variables
in unks. It returns a list of solutions. Each solution is a list of assignments
of the indeterminates that solves the system.  These assignments have to
be done in the same order as they appear in the list, which represents a

triangular system.

The notation RootOf(...) is used in the output for irreducible polynomial
equations of degree 5 or higher, and in systems for equations of degree 2 or
higher.

>>  solve(x^4-5*x^2+6*x=2,x);

                 --  1/2        1/2           --
                 -  3    - 1, - 3    - 1 , 1, 1  -
                 --                         --

>>  solve(a*x^2+b*x+c,x);

      --                 2 1/2                 2 1/2 --
      -  - b + (- 4 a c + b )     - b - (- 4 a c + b )     -
      -  -----------------------, -----------------------  -
      --          2 a                   2 a          --

>>  op(solve({u+v+w=1, 3*u+v=3, u^2-2*v-w=0},{u,v,w}));

      --                                         2     --
      -  v = - 3 u + 3, w = 2 u - 2, u = RootOf(4 u + u  - 4)  -
      --                                               --

See also:  decompose , factor , linsolve

