define integer to simplify trigonometric functions
Subject: define integer to simplify trigonometric functions
From: Mark H Weaver
Date: Wed, 19 Oct 2011 17:21:28 -0400
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