MathGroup Archive 2007

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg76453] Re: [mg76401] Simplify (-1)^((-1)^n)
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Tue, 22 May 2007 02:59:06 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

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


Bob Hanlon

---- peter.clave at gmail.com wrote: 
> Hi,
> 
> I am using Mathematica 5.2.
> 
> How can I urge Mathematica on evaluate
> In[x] := Simplify[ (-1)^((-1)^n), Element[n, Integers] ]
> to
> Out[x] := -1
> ?
> 
> Many thanks for any help,
> Peter
> 
> 



  • Prev by Date: Re: Simplify (-1)^((-1)^n)
  • Next by Date: Re: simple question
  • Previous by thread: Re: Re: Simplify (-1)^((-1)^n)
  • Next by thread: Re: Re: Simplify (-1)^((-1)^n)