define integer to simplify trigonometric functions



anonymous <secretagent007 at web.de> writes:
> is it possible to tell Maxima that the variable n is an integer, so
> that Maxima will automatically simplify expressions like
> sin( n*%pi ) = 0,
> cos (n*%pi ) = (-1)^n ?

Yes, you want to declare(n,integer):

(%i2) declare(n, integer);
(%o2) done
(%i3) sin(n*%pi);
(%o3) 0
(%i4) cos(n*%pi);
(%o4) (-1)^n

     Mark