Appendix A: Functions and Instructions 799
cSolve() starts with exact symbolic methods.
Except in
EXACT mode, cSolve() also uses
iterative approximate complex polynomial
factoring, if necessary.
Note: See also
cZeros(), solve(), and zeros().
Note: If
equation
is non-polynomial with
functions such as
abs(), angle(), conj(), real(),
or
imag(), you should place an underscore _
(
2 ) at the end of
var
. By default, a variable
is treated as a real value.
Display
Digits mode in Fix 2:
exact(cSolve(x^5+4x^4+5x
^3ì6xì3=0,x))
¸
cSolve(ans(1),x)
¸
If you use
var
_ , the variable is treated as
complex.
You should also use
var
_ for any other variables
in
equation
that might have unreal values.
Otherwise, you may receive unexpected results.
z is treated as real:
cSolve(conj(z)=1+
i
,z) ¸
z=1+
i
z_ is treated as complex:
cSolve(conj(z_)=1+
i
,z_) ¸
z_=1−
i
cSolve(
equation1
and
equation2
[and
…
],
{
varOrGuess1
,
varOrGuess2
[,
…
]})
⇒
⇒⇒
⇒
Boolean expression
Returns candidate complex 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+
i
.
If all of the equations are polynomials and if you
do NOT specify any initial guesses,
cSolve() uses
the lexical Gröbner/Buchberger elimination
method to attempt to determine all complex
solutions.
Note: The following examples use an underscore _
so that the variables will be treated as complex.
Complex solutions can include both real and non-
real solutions, as in the example to the right.
cSolve(u_ù v_ì u_=v_ and v_^2=ë u_,{u_,v_})
¸
u_=1/2 +
3
2
ø
i
and v_=1/2 ì
3
2
ø
i
or u_=1/2 ì
3
2
ø
i
and v_=1/2 +
3
2
ø
i
or u_=0 and v_=0
Simultaneous
polynomial
equations can have
extra variables that have no values, but represent
given numeric values that could be substituted
later.
cSolve(u_ù v_ì u_=c_ù v_ and
v_^2=ë u_,{u_,v_}) ¸
u_=
ë(
1ì4øc_+1)
2
4
and v_=
1ì4øc_+1
2
or
u_=
ë(
1ì4øc_ì1)
2
4
and v_=
ë(
1ì4øc_ì1)
2
or u_=0 and v_=0