Solve
Solve[expr,vars]
attempts to solve the system expr of equations or inequalities for the variables vars.
Details and Options
- The system expr can be any logical combination of:
-
lhs==rhs equations lhs!=rhs inequations lhs>rhs or lhs>=rhs inequalities expr∈dom domain specifications {x,y,…}∈reg region specification ForAll[x,cond,expr] universal quantifiers Exists[x,cond,expr] existential quantifiers - Solve[{expr1,expr2,…},vars] is equivalent to Solve[expr1&&expr2&&…,vars].
- A single variable or a list of variables can be specified.
- Solve gives solutions in terms of rules of the form:
-
{} no solutions {{x->solx,y->soly,…},…} several solutions {{}} solution set is full dimensional - When a single variable is specified and a particular root of an equation has multiplicity greater than one, Solve gives several copies of the corresponding solution.
- Solve[expr,vars] assumes by default that quantities appearing algebraically in inequalities are real, while all other quantities are complex.
- Solve[expr,vars,dom] restricts all variables and parameters to belong to the domain dom.
- If dom is Reals, or a subset such as Integers or Rationals, then all constants and function values are also restricted to be real.
- Solve[expr&&vars∈Reals,vars,Complexes] solves for real values of variables, but function values are allowed to be complex.
- Solve[expr,vars,Integers] solves Diophantine equations over the integers.
- Solve[…,x∈reg,Reals] constrains x to be in the region reg. The different coordinates for x can be referred to using Indexed[x,i].
- Algebraic variables in expr free of the
and of each other are treated as independent parameters. - Solve deals primarily with linear and polynomial equations.
- When expr involves only polynomial equations and inequalities over real or complex domains, then Solve can always in principle solve directly for all the
. - When expr involves transcendental conditions or integer domains, Solve will often introduce additional parameters in its results.
- Solve can give explicit representations for solutions to all linear equations and inequalities over the integers and can solve a large fraction of Diophantine equations described in the literature.
- When expr involves only polynomial conditions over real or complex domains, Solve[expr,vars] will always be able to eliminate quantifiers.
- Solve gives generic solutions only. Solutions that are valid only when continuous parameters satisfy equations are removed. Other solutions that are only conditionally valid are expressed as ConditionalExpression objects.
- Conditions included in ConditionalExpression solutions may involve inequalities, Element statements, equations and inequations on non-continuous parameters, and equations with full-dimensional solutions. Inequations and NotElement conditions on continuous parameters and variables are dropped.
- Solve uses non-equivalent transformations to find solutions of transcendental equations and hence it may not find some solutions and may not establish exact conditions on the validity of the solutions found.
- Solve uses special efficient techniques for handling sparse systems of linear equations with approximate numerical coefficients.
- The following options can be given:
-
Cubics False whether to use explicit radicals to solve all cubics GeneratedParameters C how to name parameters that are generated InverseFunctions Automatic whether to use symbolic inverse functions MaxExtraConditions 0 how many extra equational conditions on continuous parameters to allow Method Automatic what method should be used Modulus 0 modulus to assume for integers Quartics False whether to use explicit radicals to solve all quartics VerifySolutions Automatic whether to verify solutions obtained using non-equivalent transformations WorkingPrecision Infinity precision to be used in computations - With MaxExtraConditions->Automatic, only solutions that require the minimal number of equational conditions on continuous parameters are included.
- With MaxExtraConditions->All, solutions that require arbitrary conditions on parameters are given and all conditions are included.
- With MaxExtraConditions->k, only solutions that require at most k equational conditions on continuous parameters are included.
- With Method->Reduce, Solve uses only equivalent transformations and finds all solutions.
- Solve[eqns,…,Modulus->m] solves equations over the integers modulo m. With Modulus->Automatic, Solve will attempt to find the largest modulus for which the equations have solutions.
Examples
open allclose allBasic Examples (5)
Scope (73)
Generalizations & Extensions (1)
Options (15)
Applications (6)
Properties & Relations (13)
Possible Issues (4)
See Also
Root Reduce FindInstance NSolve FindRoot Eliminate SolveAlways LinearSolve RowReduce ToRadicals GroebnerBasis CylindricalDecomposition DSolve RSolve ContourPlot ContourPlot3D RegionPlot RegionPlot3D
Tutorials
Related Guides
Related Links
Introduced in 1988
(1.0)
| Updated in 2014 (10.0)