The Representation of Equations and Solutions

The Wolfram System treats equations as logical statements. If you type in an equation like x^2+3x==2, the Wolfram System interprets this as a logical statement that asserts that x^2+3x is equal to 2. If you have assigned an explicit value to x, say x=4, then the Wolfram System can explicitly determine that the logical statement x^2+3x==2 is (RefLink[False, paclet:ref/False]).

If you have not assigned any explicit value to x, however, the Wolfram System cannot work out whether x^2+3x==2 is (RefLink[True, paclet:ref/True]) or (RefLink[False, paclet:ref/False]). As a result, it leaves the equation in the symbolic form x^2+3x==2.

You can manipulate symbolic equations in the Wolfram System 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:

x^2+3x==2

You can use the function (RefLink[Reduce, paclet:ref/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:

Reduce[%,x]

The quadratic equation x^2+3x==2 can be thought of as an implicit statement about the value of x. As shown in the example above, you can use the function (RefLink[Reduce, paclet:ref/Reduce]) to get a more explicit statement about the value of x. The expression produced by (RefLink[Reduce, paclet:ref/Reduce]) has the form x==(Subscript[r, 1])||x==(Subscript[r, 2]). This expression is again a logical statement, which asserts that either x is equal to (Subscript[r, 1]), or x is equal to (Subscript[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 (RefLink[Reduce, paclet:ref/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 (RefLink[LogicalExpand, paclet:ref/LogicalExpand]), as well as (RefLink[FullSimplify, paclet:ref/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 lhs==rhs 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.

(RefLink[Reduce, paclet:ref/Reduce]) produces a logical statement about the values of x corresponding to the roots of the quadratic equation:

Reduce[x^2+3x==2,x]

(RefLink[ToRules, paclet:ref/ToRules]) converts the logical statement into an explicit list of transformation rules:

{ToRules[%]}

You can now use the transformation rules to substitute the solutions for x into expressions involving x:

x^2+a x/.%

The function (RefLink[Solve, paclet:ref/Solve]) produces transformation rules for solutions directly:

Solve[x^2+3x==2,x]