[Maxima] mistake in halfangles manual
Dieter Kaiser
drdieterkaiser at web.de
Sat Aug 22 09:04:58 CDT 2009
Am Samstag, den 22.08.2009, 14:57 +0200 schrieb Rafał Topolnicki:
> Hi,
>
> Example in manual/halfangles ^floor(x/(2*%pi)) is missing:
>
> (%i4) sin(x/2),halfangles:true;
> (%o4) sqrt(1-cos(x))*(-1)^floor(x/(2*%pi))/sqrt(2)
>
> which gives the correct plot.
Thank you very much for the hint.
The halfangles code has been updated to give more general results, but
not the manual.
By the way these are possible answers for the Sin function.
A complex variable:
(%i3) declare(z,complex)$
(%i4) sin(z/2),halfangles:true;
(%o4) sqrt(1-cos(z))*(-1)^floor('realpart(z)/(2*%pi))
*(1-unit_step(-'imagpart(z))
*((-1)^(floor('realpart(z)/(2*%pi))
-ceiling('realpart(z)/(2*%pi)))
+1))
/sqrt(2)
A real variable:
(%i5) sin(x/2),halfangles:true;
(%o5) sqrt(1-cos(x))*(-1)^floor(x/(2*%pi))/sqrt(2)
A real variable in the intervall [0,2*%pi):
(%i8) assume(abs(x)<2*%pi)$
(%i9) sin(x/2),halfangles:true;
(%o9) sqrt(1-cos(x))/sqrt(2)
I will do my best do update the manual too.
Dieter Kaiser
More information about the Maxima
mailing list