Go to the first, previous, next, last section, table of contents.

Solving Equations

The a S (calc-solve-for) [solve] command rearranges an equation to solve for a specific variable. An equation is an expression of the form L = R. For example, the command a S x will rearrange y = 3x + 6 to the form, x = y/3 - 2. If the input is not an equation, it is treated like an equation of the form X = 0.

This command also works for inequalities, as in y < 3x + 6. Some inequalities cannot be solved where the analogous equation could be; for example, solving @c{$a < b \, c$} a < b c for b is impossible without knowing the sign of c. In this case, a S will produce the result @c{$b \mathbin{\hbox{\code{!=}}} a/c$} b != a/c (using the not-equal-to operator) to signify that the direction of the inequality is now unknown. The inequality @c{$a \le b \, c$} a <= b c is not even partially solved. See section Declarations, for a way to tell Calc that the signs of the variables in a formula are in fact known.

Two useful commands for working with the result of a S are a . (see section Logical Operations), which converts x = y/3 - 2 to y/3 - 2, and s l (see section The Let Command) which evaluates another formula with x set equal to y/3 - 2.


Go to the first, previous, next, last section, table of contents.