rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

fourier_elim((x>=-1 and x<=1) and x=0, [x]) gives emptyset #589

Open rtoy opened 2 months ago

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-03 02:03:40 Created by msoegtropintel on 2017-03-09 16:55:35 Original: https://sourceforge.net/p/maxima/bugs/3292


This is tested with Maxima 5.38.1, SBCL 64, Windows.

The following result is incorrect:

(%i2) fourier_elim((x>=-1 and x<=1) and x=0, [x]); (%o2) emptyset

Reformulating this without and gives the correct result:

(%i5) fourier_elim([x>=-1, x<=1, x=0], [x]); (%o5) [x=0]

Best regards,

Michael

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-03 02:03:41 Created by tomasriker on 2017-03-10 12:55:37 Original: https://sourceforge.net/p/maxima/bugs/3292/#f969


fourier_elim expects a list of single inequations, so I think this is correct behavior, i.e. not a bug. But maybe the function should print a warning if it sees that the input is not of the expected format.

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-03 02:03:45 Created by msoegtropintel on 2017-03-10 15:01:23 Original: https://sourceforge.net/p/maxima/bugs/3292/#3123


Dear David,

this was disussed on the list. Barton Willis asked me to report it (I should have mentioned this above):

https://sourceforge.net/p/maxima/mailman/message/35712699/

Also see describe(fourier_elim) - towards the end.

Best regards,

Michael

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-03 02:03:48 Created by willisbl on 2021-06-10 18:53:52 Original: https://sourceforge.net/p/maxima/bugs/3292/#58e0


In a fresh Maxima, I get

(%i1)   ((x>=-1 and x<=1) and x=0);
(%o1)   false

Thus fourier_elim receives false as its first argument. After that, it returns emptyset. No this isn't a problem with the fourier_elim code.

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-03 02:03:52 Created by willisbl on 2021-06-10 18:57:56 Original: https://sourceforge.net/p/maxima/bugs/3292/#ea5c