www.delorie.com/gnu/docs/calc/calc_259.html   search  
Buy the book!

GNU Emacs Calc 2.02 Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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 section 7.6 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 11.10 Logical Operations), which converts x = y/3 - 2 to y/3 - 2, and s l (see section 13.4 The Let Command) which evaluates another formula with x set equal to y/3 - 2.

11.6.1 Multiple Solutions  
11.6.2 Solving Systems of Equations  
11.6.3 Decomposing Polynomials  

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003