Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Re: Simplify (-1)^((-1)^n)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg76503] Re: [mg76453] Re: [mg76401] Simplify (-1)^((-1)^n)
  • From: "Lev Bishop" <lev.bishop at gmail.com>
  • Date: Wed, 23 May 2007 05:23:07 -0400 (EDT)
  • References: <200705220659.CAA20235@smc.vnet.net>

On 5/22/07, Bob Hanlon <hanlonr at cox.net> wrote:
> Applying brute force:
>
> integerSimplify[expr_, n_Symbol]:=Module[{ev,od},
>     Off[Simplify::fas];
>     ev=Simplify[expr,EvenQ[n]];
>     od=Simplify[expr,OddQ[n]];
>     On[Simplify::fas];
>     If[ev==od,ev,expr]]
>
> integerSimplify[(-1)^((-1)^n),n]
>
> -1

No! That gives wrong answers.
In[65]:= integerSimplify[(-1)^n,n]
Out[65]= 1

You should *never* ignore Simplify::fas or you can prove anything you like:
Eg, pi==3...
In[86]:= Simplify[x==3&&x==\[Pi],False]
During evaluation of In[86]:= Simplify::fas: Warning: One or more
assumptions evaluated to False. >>
Out[86]= True


  • Prev by Date: Re: Dialogs and inheritance
  • Next by Date: Re: Evaluation Question
  • Previous by thread: Re: Simplify (-1)^((-1)^n)
  • Next by thread: little help needed