Services & Resources / Wolfram Forums
MathGroup Archive
*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
  • Subject: [mg76503] Re: [mg76453] Re: [mg76401] Simplify (-1)^((-1)^n)
  • From: "Lev Bishop" <lev.bishop at>
  • Date: Wed, 23 May 2007 05:23:07 -0400 (EDT)
  • References: <>

On 5/22/07, Bob Hanlon <hanlonr at> 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