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/