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

In article <DDuM67.IuF at wri.com> izovko at dominis.phy.hr (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  
execute:

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)  
multiplication.

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 math.unl.edu (NeXT/MIME)
Research Associate                        Voice: (402)472-9747 
Department of Mathematics and Statistics  FAX:   (402)472-8466 
University of Nebraska - Lincoln          http://www.math.unl.edu/~rdieter/


  • 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