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

Reduce

Reduce
reduces the statement expr by solving equations or inequalities for vars and eliminating quantifiers.
Reduce
does the reduction over the domain dom. Common choices of dom are Reals, Integers, and Complexes.
  • The statement expr can be any logical combination of:
lhs==rhsequations
lhs!=rhsinequations
or inequalities
exprdomdomain specifications
ForAll[x,cond,expr]universal quantifiers
Exists[x,cond,expr]existential quantifiers
  • The result of Reduce always describes exactly the same mathematical set as expr.
  • Reduce assumes by default that quantities appearing algebraically in inequalities are real, while all other quantities are complex.
  • Reduce 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.
  • Reduce[expr&&varsReals, vars, Complexes] performs reductions with variables assumed real, but function values allowed to be complex.
  • Reduce[expr, vars, Integers] reduces Diophantine equations over the integers.
  • Reduce effectively writes expr as a combination of conditions on , , ... where each condition involves only the earlier .
  • Algebraic variables in expr free of the and of each other are treated as independent parameters.
  • Applying LogicalExpand to the results of Reduce yields an expression of the form , where each of the can be thought of as representing a separate component in the set defined by expr.
  • The may not be disjoint, and may have different dimensions. After LogicalExpand, each of the has the form .
  • Without LogicalExpand, Reduce by default returns a nested collection of conditions on the , combined alternately by Or and And on successive levels.
  • When expr involves only polynomial equations and inequalities over real or complex domains then Reduce can always in principle solve directly for all the .
  • When expr involves transcendental conditions or integer domains, Reduce will often introduce additional parameters in its results.
  • When expr involves only polynomial conditions, Reduce[expr, vars, Reals] gives a cylindrical algebraic decomposition of expr.
  • Reduce 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, Reduce will always eliminate quantifiers, so that quantified variables do not appear in the result.
  • The following options can be given:
BacksubstitutionFalsewhether to give results unwound by backsubstitution  »
CubicsFalsewhether to use explicit radicals to solve all cubics  »
GeneratedParametersChow to name parameters that are generated  »
Modulus0modulus to assume for integers  »
QuarticsFalsewhether to use explicit radicals to solve all quartics  »
  • Reduce[expr, {x1, x2, ...}, Backsubstitution->True] yields a form in which values from equations generated for earlier are backsubstituted so that the conditions for a particular have only minimal dependence on earlier . »
Reduce equations and inequalities:
Use specific domains:
Reduce a quantified expression:
Reduce equations and inequalities:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
 
Use specific domains:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
 
Reduce a quantified expression:
In[1]:=
Click for copyable input
Out[1]=
A linear system:
A univariate polynomial equation:
A multivariate polynomial equation:
Systems of polynomial equations and inequations can always be reduced:
A quantified polynomial system:
An algebraic system:
Transcendental equations solvable in terms of inverse functions:
In this case there is no solution:
Equations solvable using special function zeros:
Solving this system does not require the Riemann hypothesis:
Elementary function equation in a bounded region:
Holomorphic function equation in a bounded region:
Here Reduce finds some solutions but is not able to prove there are no other solutions:
Equation with a purely imaginary period over a vertical stripe in the complex plane:
Doubly periodic transcendental equation:
A system of transcendental equations:
A linear system:
A univariate polynomial equation:
A univariate polynomial inequality:
A multivariate polynomial equation:
A multivariate polynomial inequality:
Systems of polynomial equations and inequalities can always be reduced:
A quantified polynomial system:
An algebraic system:
Piecewise equations:
Piecewise inequalities:
Transcendental equations, solvable using inverse functions:
Transcendental inequalities, solvable using inverse functions:
Transcendental equation, solvable using special function zeros:
Transcendental inequality, solvable using special function zeros:
Exp-log equations:
High-degree sparse polynomial equation:
Algebraic equation involving high-degree radicals:
Equation involving irrational real powers:
Exp-log inequality:
Elementary function equation in a bounded interval:
Holomorphic function equation in a bounded interval:
Periodic elementary function equation over the reals:
Transcendental systems solvable using inverse functions:
Systems exp-log in the first variable and polynomial in the other variables:
Quantified system:
Systems elementary and bounded in the first variable and polynomial in the other variables:
Quantified system:
Systems holomorphic and bounded in the first variable and polynomial in the other variables:
Quantified system:
Linear system of equations:
A linear system of equations and inequalities:
A univariate polynomial equation:
A univariate polynomial inequality:
Binary quadratic equations:
A Thue equation:
A sum of squares equation:
The Pythagorean equation:
A bounded system of equations and inequalities:
A high-degree system with no solution:
Transcendental Diophantine systems:
A polynomial system of congruences:
A linear system:
A univariate polynomial equation:
A multivariate polynomial equation:
A system of polynomial equations and inequations:
Reduce a quantified polynomial system:
Mixed real and complex variables:
Find real values of and complex values of for which is real and less than :
Reduce an inequality involving Abs[x]:
Plot the solution set:
Since appears after in the variable list, Reduce may use to express the solution for :
With True, Reduce gives explicit numeric values for :
By default Reduce does not use general formulas for solving cubics in radicals:
With Cubics->True, Reduce solves all cubics in terms of radicals:
Reduce may introduce new parameters to represent the solution:
Use GeneratedParameters to control how the parameters are generated:
Solve equations over the integers modulo 9:
By default Reduce does not use general formulas for solving quartics in radicals:
With Quartics->True, Reduce solves all quartics in terms of radicals:
Reduce cannot solve the problem due to high degrees of algebraic numbers involved:
Using WorkingPrecision enables Reduce to find a solution, but it may be incorrect:
Find conditions for a quartic to have all roots equal:
A method using Subresultants:
A method using quantifier elimination:
Plot a space curve given by an implicit description:
Plot the projection of the space curve on the - plane:
Prove geometric inequalities for , , and sides of a triangle:
Prove an inequality for triangles:
Prove an inequality for acute triangles:
Find a Pythagorean triple:
Find a sequence of Pythagorean triples:
Find how to pay $2.27 postage with 10-, 23- and 37-cent stamps:
The same task can be accomplished with IntegerPartitions:
Show that there are only five regular polyhedrons:
Each face for a regular -gon contributes edges, but they are shared, so they are counted twice:
Each face for a regular -gon contributes vertices, but they are shared, so they are counted times:
Using Euler's formula , find the number of faces:
For this last formula to be well defined, the denominator needs to be positive and an integer:
Hence the following five cases:
Compare this to the actual counts in PolyhedronData:
The result of reduction is equivalent to the original system:
ToRules and ReplaceRepeated can be used to backsubstitute finite solution sets:
Use Expand to simplify a result of substitution involving simple radicals:
To simplify expressions involving algebraic numbers use RootReduce:
To find solution instances use FindInstance:
Solve represents solutions of complex equations in terms of replacement rules:
Solve omits solutions involving equations on parameters:
For transcendental equations Solve may not give all solutions:
Using inverse functions allows Solve to find some solutions fast:
Finding the complete solution may take much longer and the solution may be large:
This finds the values of for which x=2 is a solution:
SolveAlways gives the values of parameters for which complex equations are always true:
This solves the same problem using Reduce:
Resolve eliminates quantifiers, possibly without solving the resulting quantifier-free system:
Eliminate eliminates variables from systems of complex equations:
This solves the same problem using Resolve:
Reduce additionally solves the resulting equations:
Because appears in an inequality, it is assumed to be real; is allowed to be complex:
When domain Reals is specified, , , and Sqrt[x] are required to be real:
This allows complex values of for which both sides of the inequality are real:
Reduce does not solve equations that depend on branch cuts of Mathematica functions:
Plot the region where the first condition is nonzero:
Find the vertical asymptotes of by directly using the definition of limit:
New in 1 | Last modified in 5