Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1995
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1995

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Question: how to get Sin[n*Pi]=0 (n integer)

  • To: mathgroup at christensen.cybernetics.net
  • Subject: [mg1962] Re: Question: how to get Sin[n*Pi]=0 (n integer)
  • From: Scott.A.Hill at williams.edu (Lancelot)
  • Date: Sun, 27 Aug 1995 23:23:59 -0400
  • Organization: Williams College, Williamstown MA

In article <DDuM67.IuF at wri.com>, Ilija I Zovko <izovko at dominis.phy.hr> wrote:

>Hi,

>How can one tell Mathematica to simplify Sin[n Pi]=0 or
>Cos[n Pi]=(-1)^n and similar kind of stuff.

	In such cases I tend just to substitute them by hand.  E.g.:

In[4]:=RandomFunction[5]

Out[4]= 3 + 5 Cos [n Pi] + Sin[n Pi]

In[5]:=%4/.{Sin[n Pi]->0,Cos[n Pi]->(-1)^n}

                  n
Out[5]= 3 + 5 (-1)

Of course, you should make sure n is really an integer first.

>Also, how does one tell it "A" & "B" are matrices so it doesn't 
>commute them (AB.not equal.BA).

	Mathematica has a non-commutative multiplication command,
represented by **.  Thus:

In[6]:= B*A

Out[6]= A B

In[7]:= B**A

Out[7]= B ** A


/
:@-) Scott
\




  • Prev by Date: Re: question about nest
  • Next by Date: Re: question about nest
  • Previous by thread: Question: how to get Sin[n*Pi]=0 (n integer)
  • Next by thread: Re: Question: how to get Sin[n*Pi]=0 (n integer)