Appendix A: Functions and Instructions 879
Use the “|” operator to restrict the solution interval
and/or other variables that occur in the equation or
inequality. When you find a solution in one interval,
you can use the inequality operators to exclude that
interval from subsequent searches.
In Radian angle mode:
solve(tan(x)=1/x,x)|x>0 and x<1
¸x
false is returned when no real solutions are found.
true
is returned if solve() can determine that any
finite real value of
var
satisfies the equation or
inequality.
solve(x=x+1,x) ¸ false
solve(x=x,x)
¸ true
Since solve() always returns a Boolean result, you
can use “and,” “or,” and “not” to combine results
from
solve() with each other or with other Boolean
expressions.
2xì 11 and solve(x^2ƒ9,x) ¸
x
1 and x ƒ ë 3
Solutions might contain a unique new undefined
variable of the form @
n
j
with
j
being an integer in
the interval 1–255. Such variables designate an
arbitrary integer.
In Radian angle mode:
solve(sin(x)=0,x)
¸ x = @n1ø p
In real mode, fractional powers having odd
denominators denote only the real branch.
Otherwise, multiple branched expressions such as
fractional powers, logarithms, and inverse
trigonometric functions denote only the principal
branch. Consequently,
solve() produces only
solutions corresponding to that one real or principal
branch.
Note: See also
cSolve(), cZeros(), nSolve(), and
zeros().
solve(x^(1/3)=ë 1,x) ¸ x = ë 1
solve(
‡(x)=ë 2,x) ¸ false
solve(
ë ‡(x)=ë 2,x) ¸ x = 4
solve(
equation1
and
equation2
[and
…
], {
varOrGuess1
,
varOrGuess2
[,
…
]}) ⇒
⇒⇒
⇒
Boolean expression
Returns candidate real solutions to the
simultaneous algebraic equations, where each
varOrGuess
specifies a variable that you want to
solve for.
Optionally, you can specify an initial guess for a
variable. Each
varOrGuess
must have the form:
variable
– or –
variable
=
real or non-real number
For example,
x is valid and so is x=3.
solve(y=x^2ì 2 and
x+2y=
ë 1,{x,y}) ¸
x=1 and y=ë 1
or x=
ë 3/2 and y=1/4
If all of the equations are polynomials and if you
do NOT specify any initial guesses,
solve() uses
the lexical Gröbner/Buchberger elimination
method to attempt to determine all real
solutions.
For example, suppose you have a circle of radius r
at the origin and another circle of radius r
centered where the first circle crosses the positive
x-axis. Use
solve() to find the intersections.
As illustrated by r in the example to the right,
simultaneous
polynomial
equations can have
extra variables that have no values, but represent
given numeric values that could be substituted
later.
solve(x^2+y^2=r^2 and
(x
ì r)^2+y^2=r^2,{x,y}) ¸
x=
r
2
and y=
3ør
2
or x=
r
2
and y=
ë 3ør
2
You can also (or instead) include solution
variables that do not appear in the equations. For
exam
le,
ou can include z as a solution variable
solve(x^2+y^2=r^2 and
(x
ì r)^2+y^2=r^2,{x,y,z}) ¸