This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / Built-in Functions / Numerical Computation / Equation Solving /

Solve

FilledSmallSquare Solve[eqns, vars] attempts to solve an equation or set of equations for the variables vars.

FilledSmallSquare Solve[eqns, vars, elims] attempts to solve the equations for vars, eliminating the variables elims.

FilledSmallSquare Equations are given in the form lhs == rhs.

FilledSmallSquare Simultaneous equations can be combined either in a list or with &&.

FilledSmallSquare A single variable or a list of variables can be specified.

FilledSmallSquare Solve[eqns] tries to solve for all variables in eqns.

FilledSmallSquare Example: Solve[3 x + 9 == 0, x].

FilledSmallSquare Solve gives solutions in terms of rules of the form x -> sol.

FilledSmallSquare When there are several variables, the solution is given in terms of lists of rules: x -> , y -> , ... .

FilledSmallSquare When there are several solutions, Solve gives a list of them.

FilledSmallSquare When a particular root has multiplicity greater than one, Solve gives several copies of the corresponding solution.

FilledSmallSquare Solve deals primarily with linear and polynomial equations.

FilledSmallSquare The option InverseFunctions specifies whether Solve should use inverse functions to try and find solutions to more general equations. The default is InverseFunctions->Automatic. In this case, Solve can use inverse functions, but prints a warning message. See notes on InverseFunctions.

FilledSmallSquare Solve gives generic solutions only. It discards solutions that are valid only when the parameters satisfy special conditions. Reduce gives the complete set of solutions.

FilledSmallSquare Solve will not always be able to get explicit solutions to equations. It will give the explicit solutions it can, then give a symbolic representation of the remaining solutions in terms of Root objects. If there are sufficiently few symbolic parameters, you can then use N to get numerical approximations to the solutions.

FilledSmallSquare Solve gives {} if there are no possible solutions to the equations.

FilledSmallSquare Solve gives {{}} if all variables can have all possible values.

FilledSmallSquare Solve[eqns, ... , Mode->Modular] solves equations with equality required only modulo an integer. You can specify a particular modulus to use by including the equation Modulus==p. If you do not include such an equation, Solve will attempt to solve for the possible moduli.

FilledSmallSquare Solve uses special efficient techniques for handling sparse systems of linear equations with approximate numerical coefficients.

FilledSmallSquare See Section 1.5.7 and Section 3.4.4.

FilledSmallSquare Implementation Notes: see Section A.9.5.

FilledSmallSquare See also: Reduce, FindInstance, Eliminate, SolveAlways, Roots, NSolve, FindRoot, LinearSolve, RowReduce, GroebnerBasis, DSolve, Root, RSolve.

FilledSmallSquare Related packages: Algebra`RootIsolation`, Graphics`ImplicitPlot`, Algebra`AlgebraicInequalities`.

FilledSmallSquare New in Version 1; modified in 3.

Further Examples