>> From: Rafael Espericueta "mathprof"
Try using the surd function.
Instead of sqrt(x), use surd(x,2).
Similarly, the Nth root of x can be expressed as surd(x,N).
eq:=a*x+surd(1-x^2,2)=0;
solve(eq,x);
Seems to work just fine (at least in version 8)! :-)
Surd avoids lots of "problems" that arise, if you're restricting yourself to
the real numbers. In particular if you every want to graph an expression
containing radicals, it's essential to express it in terms of the surd
function.
-Rafael Espericueta
Bakersfield College
----- Original Message -----
From: PierLuigi Zezza
To: "maple-list"
Sent: Sunday, July 28, 2002 4:22 AM
Subject: [MUG] Solving equations with radicals
>> From: PierLuigi Zezza "pierluigi.zezza"
# I have some problems in understanding the behavior al Maple
> restart;
# Let us solve an equation with radicals
> eq:=a*x+sqrt(1-x^2)=0;
> assume(a,positive);
> sol:=[solve(eq,x)];
#
2
eq := a x + sqrt(1 - x ) = 0
1 1
sol := [-------------, - -------------]
2 2
sqrt(1 + a~ ) sqrt(1 + a~ )
# Maple find two solutions, the first one is wrong
> simplify(subs(x=sol[1],eq));
a~
2 ------------ = 0
2 1/2
(1 + a~ )
# The second is correct
> simplify(subs(x=sol[2],eq));
0 = 0
# The problem arises from "squaring" the radical and hence I try
> restart:
> with(RealDomain):
Warning, these protected names have been redefined and unprotected:
Im, Re, ^, arccos, arccosh, arccot, arccoth, arccsc, arccsch, arcsec,
arcsech, arcsin, arcsinh, arctan, arctanh, cos, cosh, cot, coth, csc,
csch, eval, exp, expand, limit, ln, log, sec, sech, signum, simplify,
sin, sinh, solve, sqrt, surd, tan, tanh
> eq:=a*x+sqrt(1-x^2)=0;
> assume(a,positive);
> sol:=solve(eq,x);
2
eq := a x + sqrt(1 - x ) = 0
1
sol := -------------
2
sqrt(1 + a~ )
# But in this way Maple finds only the wrong one and I do not understand
# way
# thanks
# gigi zezza
PierLuigi Zezza
"pzezza"
|