Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

Re: Simplification question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59108] Re: Simplification question
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Fri, 29 Jul 2005 00:41:47 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, U.K.
  • References: <dc76pp$jvg$1@smc.vnet.net> <dc9vdl$cm6$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Jean-Marc Gulliet wrote:
> 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.
> 
Sorry, the last two input lines should have been the following ones:

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

Out[1]=
-1

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

Out[2]=
1

If you want to keep your original expression you an use a replacement 
rule for m, depending on whether m is odd or even:

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

Out[3]=
-1

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

Out[4]=
1

Best regards,
/J.M.


  • Prev by Date: Re: Re: Simplification question
  • Next by Date: Re: silly questions?
  • Previous by thread: Re: Simplification question
  • Next by thread: silly questions?