MathGroup Archive 2005

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

Search the Archive

Re: Simplification question


snoofly wrote:
> Can someone explain this to me please.
> 
> Clear[m]
> 
> Simplify[Sin[3 m Pi], Assumptions -> m \[Element] Integers]
> 0
> 
> Simplify[Cos[3 m Pi], Assumptions -> m \[Element] Integers]
> 
> Cos[3 m \[Pi]]
> 
> I'm not sure why Mathematica cannot deduce that the second simplification 
> should be (1)^m.
> 
Because it is a wrong answer!

In[1]:=
Simplify[Cos[m*Pi], Assumptions -> m \[Element] Integers]

Out[1]=
(-1)^m

In[2]:=
Simplify[Cos[m*Pi], Assumptions -> m \[Element] Integers] /. m -> 3*m

Out[2]=
(-1)^(3*m)

If m is even then

In[3]:=
Simplify[Cos[2*k*Pi], Assumptions -> k \[Element] Integers]

Out[3]=
1

If m is odd then

In[4]:=
Simplify[Cos[(2*k + 1)*Pi], Assumptions -> k \[Element] Integers]

Out[4]=
-1

Regards,
/J.M.


  • Prev by Date: Re: Why won't Horner[] work?
  • Next by Date: Re: "Substract one and add one" algorithm
  • Previous by thread: Re: Simplification question
  • Next by thread: Re: Simplification question