|
GNU Emacs Calc 2.02 Manual
11.6: 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 a < b c for b is impossible without knowing the sign of c. In this case, a S will produce the result b != a/c (using the not-equal-to operator) to signify that the direction of the inequality is now unknown. The inequality a <= b c is not even partially solved. See 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 Logical Operations), which converts x = y/3 - 2 to y/3 - 2, and s l (see Let Command) which evaluates another formula with x set equal to y/3 - 2.
|