Subject: Half-angle-simplification of trig functions
From: Dieter Kaiser
Date: Wed, 07 Jan 2009 23:16:34 +0100
Am Mittwoch, den 07.01.2009, 15:09 +0100 schrieb Stefano Ferri:
> I hope you'll find soon where is the bug :-)...
I am working on the problem and I am very close to it. Here again some
simple example:
(%i1) assume(x<2*%pi);
(%o1) [2*%pi > x]
(%i2) is(x<2*%pi);
(%o2) true
(%i3) is(x<3*%pi);
(%o3) unknown
(%i4) is(x<10.0);
(%o4) unknown
We always have a problem with assume when the constant is involved in an
expression. The following expression is stored in the database for the
example above:
((MLIST) ((MGREATERP) ((MTIMES SIMP) 2 $%PI) $X))
The algorithm do not convert the expression ((mtimes simp) 2 $%pi) in
something which can be compared with a number like in example (%i4) or
can be compared with other expressions involving %pi.
Here is a workaround which might be useful (Until we have a solution for
the bug):
(%i6) assume(x<2*%pi),numer;
(%o6) [x < 6.283185307179586]
(%i7) is(x<2*%pi);
(%o7) true
(%i8) is(x<3*%pi);
(%o8) true
(%i9) is(x<10.0);
(%o9) true
In this case the numerical value of 2*%pi is stored in the database and
all tests work.
((MGREATERP) 6.283185307179586 $X))
In fact to do the comparison of expressions Maxima converts the
constants %pi and %e to numbers too. But not for symbols within
expressions like ((mtimes) 2 $%pi). Therefore a lot of tests fail.
Dieter Kaiser