[newbie] positive root



On Thu, 21 Nov 2013, Richard Fateman wrote: >* On 11/21/2013 8:34 AM, Hugo
Coolens wrote: *>>* I found the following in the documentation: *>>* sqrt
(x^2); *>>* gives abs(x) *>* Mathematically speaking this is false and the
result given *>* by Maxima can lead to errors. There are two square roots. *
>* abs(x) is not one of them, as you can see by plotting x, -x, and abs(x).
*>Some people use the sqrt-symbol to give you only the positive root,
>therefore I thought Maxima imitated this somehow by answering with abs(x).
>As a matter of fact I'm only interested in positive solutions, therefore
>I'd really like to see a method in Maxima which transforms
>sqrt(x^4-2*x^2+1) into abs(x^2-1) >hope you understand me >regards >hugo >
>> >>* However: *>> >>* sqrt(x^4-2*x^2+1); *>> >>* does not result in *>>*
abs(x^2-1) *>* This too is false. *>>* but leaves the expression untouched.
*>> >> >>* It puzzles me why, can I make Maxima do it? *>* You can try
radcan(%), which returns one of the roots, x^2-1,and ignores the *>* other.
*>* This is a feature of radcan. It shouldn't be a feature of the general *>*
simplifier. *> >* You can try map(factor,%) which returns the dubious
abs(x-1)*abs(x+1). *> >* RJF *>

*I found the following method:*

(%i1) f:sqrt(x^4-2*x^2+1);
(%o1) sqrt(x^4-2*x^2+1)
(%i2) ratsubst(t,x^2-1,f);
(%o2) abs(t)
(%i3) subst(x^2-1,t,%);
(%o3) abs(x^2-1)

Aleksas D