Page 1 sur 1

domain function has problems with abs

Publié : ven. déc. 22, 2017 10:40 am
par lukamar
Hello,
The following command gives wrong result:

Code : Tout sélectionner

domain(sqrt(ln(3-abs(x)))/ln(abs(x)),x)
It gives

Code : Tout sélectionner

[((x>0) and (x<=2) and (x<>1))]
However, the complete solution is [-2,2]\{-1,0,1} (the given expression is even). Hence "domain" discards left half of the solution... I had a brief look at derive.cc and function "domain" handles abs function somehow, but obviously not in this case.

Re: domain function has problems with abs

Publié : sam. déc. 23, 2017 9:08 pm
par parisse
Unlike you, I get a symmetric domain, perhaps you had some assumption on x.

Re: domain function has problems with abs

Publié : sam. déc. 23, 2017 11:00 pm
par lukamar
Thanks, you're right, I get the correct result in a fresh session. I have keep in mind to always purge variables before testing for a bug...