domain function has problems with abs

Librairie C++ de calcul formel/ C++ symbolic computation library

Modérateur : xcasadmin

lukamar
Messages : 331
Inscription : ven. juin 30, 2017 9:55 am
Localisation : Zagreb, Croatia

domain function has problems with abs

Message par lukamar » ven. déc. 22, 2017 10:40 am

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.

parisse
Messages : 5731
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: domain function has problems with abs

Message par parisse » sam. déc. 23, 2017 9:08 pm

Unlike you, I get a symmetric domain, perhaps you had some assumption on x.

lukamar
Messages : 331
Inscription : ven. juin 30, 2017 9:55 am
Localisation : Zagreb, Croatia

Re: domain function has problems with abs

Message par lukamar » sam. déc. 23, 2017 11:00 pm

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...

Répondre