SOLUTIONS

BUILTIN MATHEMATICA SYMBOL
Solve
Solve[expr, vars]
attempts to solve the system expr of equations or inequalities for the variables vars.
Details and OptionsDetails and Options
 The system expr can be any logical combination of:

lhs==rhs equations lhs!=rhs inequations or inequalities exprdom domain specifications ForAll[x,cond,expr] universal quantifiers Exists[x,cond,expr] existential quantifiers  Solve[{expr_{1}, expr_{2}, ...}, vars] is equivalent to Solve[expr_{1}&&expr_{2}&&..., vars].
 A single variable or a list of variables can be specified.
 Solve gives solutions in terms of rules of the form .
 When there are several variables, the solution is given in terms of lists of rules: .
 When there are several solutions, Solve gives a list of them.
 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&&varsReals, 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.
 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.
 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 nonequivalent transformations WorkingPrecision Infinity precision to be used in computations  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 noncontinuous parameters, and equations with fulldimensional solutions. Inequations and NotElement conditions on continuous parameters and variables are dropped.
 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.
 Solve uses nonequivalent 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.
 With Method>Reduce, Solve uses only equivalent transformations and finds all solutions.
 Solve gives if there are no possible solutions to the equations.
 Solve gives if the set of solutions is fulldimensional.
 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.
 Solve uses special efficient techniques for handling sparse systems of linear equations with approximate numerical coefficients.
ExamplesExamplesopen allclose all
Basic Examples (6)Basic Examples (6)
In[1]:= 
Out[1]= 
Solve simultaneous equations in and :
In[1]:= 
Out[1]= 
Solutions are given as lists of replacements:
In[1]:= 
Out[1]= 
In[2]:= 
Out[2]= 
Replace combinations of and by solutions, and simplify the results:
In[3]:= 
Out[3]= 
Plot the real parts of the solutions for as a function of the parameter :
In[4]:= 
Out[4]= 
In[1]:= 
Out[1]= 
In[2]:= 
Out[2]= 
Solve an equation over the reals:
In[1]:= 
Out[1]= 
Replace by solutions and simplify the results:
In[2]:= 
Out[2]= 
Solve an equation over the positive integers:
In[1]:= 
Out[1]= 
In[2]:= 
Out[2]= 
New in 1  Last modified in 8
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »