Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica >

Reduce

Reduce[expr, vars]
reduces the statement expr by solving equations or inequalities for vars and eliminating quantifiers.
Reduce[expr, vars, dom]
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:
lhsEqualrhsequations
lhsNotEqualrhsinequations
lhs>rhs or lhs>=rhs inequalities
exprElementdomdomain specifications
ForAll[x,cond,expr]universal quantifiers
Exists[x,cond,expr]existential quantifiers
  • The result of Reduce[expr, vars] always describes exactly the same mathematical set as expr.
  • Reduce[{expr1, expr2, ...}, vars] is equivalent to Reduce[expr1&&expr2&&..., vars].
  • Reduce[expr, vars] assumes by default that quantities appearing algebraically in inequalities are real, while all other quantities are complex.
  • Reduce[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.
  • Reduce[expr&&varsElementReals, 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[expr, {x1, x2, ...}, ...] effectively writes expr as a combination of conditions on x_1,x_2,... , where each condition involves only the earlier x_i.
  • Algebraic variables in expr free of the x_i and of each other are treated as independent parameters.
  • Applying LogicalExpand to the results of Reduce[expr, ...] yields an expression of the form e_1||e_2||..., where each of the e_i can be thought of as representing a separate component in the set defined by expr.
  • The e_i may not be disjoint, and may have different dimensions. After LogicalExpand, each of the e_i have the form e&&e&&....
  • Without LogicalExpand, Reduce by default returns a nested collection of conditions on the x_i, 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 x_i.
  • 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[expr, vars] 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 x_i are backsubstituted so that the conditions for a particular x_i have only minimal dependence on earlier x_i.  »
Reduce equations and inequalities:
Use specific domains:
Reduce a quantified expression:
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 non-rational 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 x and complex values of y for which x2+y2 is real and less than 1:
Reduce an inequality involving Abs[x]:
Plot the solution set:
Since y appears after x in the variable list, Reduce may use x to express the solution for y:
With Backsubstitution->True, Reduce gives explicit numeric values for y:
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->100 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 {x, y} plane.
Prove geometric inequalities for a, b, and c 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:
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 n for which xEqual2 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 x appears in an inequality, it is assumed to be real; y is allowed to be complex:
When domain Reals is specified, x, y and Sqrt[x] are required to be real:
This allows complex values of x 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
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team