The Representation of Equations and Solutions
Mathematica treats equations as logical statements. If you type in an equation like
x^2+3x2,
Mathematica interprets this as a logical statement which asserts that
x^2+3x is equal to
2. If you have assigned an explicit value to
x, say
x=4, then
Mathematica can explicitly determine that the logical statement
x^2+3x2 is
False.
If you have not assigned any explicit value to
x, however,
Mathematica cannot work out whether
x^2+3x2 is
True or
False. As a result, it leaves the equation in the symbolic form
x^2+3x2.
You can manipulate symbolic equations in
Mathematica in many ways. One common goal is to rearrange the equations so as to "solve" for a particular set of variables.
Here is a symbolic equation.
Out[1]=  

You can use the function Reduce to reduce the equation so as to give "solutions" for x. The result, like the original equation, can be viewed as a logical statement.
Out[2]=  

The quadratic equation
x^2+3x2 can be thought of as an implicit statement about the value of
x. As shown in the example above, you can use the function
Reduce to get a more explicit statement about the value of
x. The expression produced by
Reduce has the form
xr_{1}xr_{2}. This expression is again a logical statement, which asserts that either
x is equal to
r_{1}, or
x is equal to
r_{2}. The values of
x that are consistent with this statement are exactly the same as the ones that are consistent with the original quadratic equation. For many purposes, however, the form that
Reduce gives is much more useful than the original equation.
You can combine and manipulate equations just like other logical statements. You can use logical connectives such as
 and
&& to specify alternative or simultaneous conditions. You can use functions like
LogicalExpand, as well as
FullSimplify, to simplify collections of equations.
For many purposes, you will find it convenient to manipulate equations simply as logical statements. Sometimes, however, you will actually want to use explicit solutions to equations in other calculations. In such cases, it is convenient to convert equations that are stated in the form
lhsrhs into transformation rules of the form
lhs>rhs. Once you have the solutions to an equation in the form of explicit transformation rules, you can substitute the solutions into expressions by using the
/. operator.
Reduce produces a logical statement about the values of x corresponding to the roots of the quadratic equation.
Out[3]=  

ToRules converts the logical statement into an explicit list of transformation rules.
Out[4]=  

You can now use the transformation rules to substitute the solutions for x into expressions involving x.
Out[5]=  

The function Solve produces transformation rules for solutions directly.
Out[6]=  
