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
  • Subject: [mg1971] Re: Question: how to get Sin[n*Pi]=0 (n integer)
  • From: rdieter at (Rex Dieter)
  • Date: Wed, 30 Aug 1995 01:50:40 -0400
  • Organization: University of Nebraska--Lincoln

In article <DDuM67.IuF at> izovko at (Ilija I Zovko) writes:

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

That's a good question.  Mathematica normally can't make assumptions like "n  
is an integer)", and I'm not sure how to do this easily.  Perhaps try the  
following... say you want to simplify an expression "expr" that contains the  
constructs you describe above.  To get the simplifications you desire, simply  

expr /. { Sin[n Pi] -> (0), Cos[n Pi] -> ( (-1)^n ) }

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

Mathematica won't commute things that can't be commuted.  I think you might  
specify that you want Matrix multiplication and not plain (component-wise)  

A . B 	matrix multiply (ought not to commute)
A * B	component multiply (may commute, because that's ok)
A + B	addition (may commute...)

Rex A. Dieter                             rdieter at (NeXT/MIME)
Research Associate                        Voice: (402)472-9747 
Department of Mathematics and Statistics  FAX:   (402)472-8466 
University of Nebraska - Lincoln

  • Prev by Date: Re: Plotting Piecewise Functions with Discontinuites
  • Previous by thread: Re: Question: how to get Sin[n*Pi]=0 (n integer)
  • Next by thread: convolution