Re: Re: Simplifying algebraic expressions

*To*: mathgroup at smc.vnet.net*Subject*: [mg66959] Re: [mg66881] Re: [mg66839] Simplifying algebraic expressions*From*: Andrzej Kozlowski <akoz at mimuw.edu.pl>*Date*: Mon, 5 Jun 2006 03:48:11 -0400 (EDT)*References*: <200606011054.GAA20566@smc.vnet.net> <200606020809.EAA18083@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Here is, I think, an optimized version of the "simplification" I sent earlier: rule1 = {2x -> u, 3y -> v}; rule2 = Map[Reverse, rule1]; Simplify[TrigFactor[Simplify[ExpToTrig[ Simplify[ExpToTrig[(-1)^(2*x + 3*y) /. rule1], Mod[u, 2] == 0] /. rule2], y â?? Integers]], y â?? Integers] (-1)^y "Optimized" means that I can't see any obvious way to make this simpler. Unlike other answers to the original post, this works in Mathematica 5.1 and 5.2, and involves only reversible operations. In other words, it constitutes a proof. On the other hand, obviously, it would be ridiculous to use this approach in practice: there must be a simple transformation rule (or rules) missing from Simplify, which apparently has already been added in the development version. Note also the following problem, which I suspect is related: Simplify[(-1)^(u + v), (u | v) â?? Integers && Mod[u, 2] == 0 && Mod[v, 2] == 1] -1 Simplify[(-1)^(u + v), (u | v) â?? Integers && Mod[u, 2] == 0 && Mod[v, 2] == 0] 1 But Simplify[(-1)^(u + v), (u | v) â?? Integers && Mod[u, 2] == 0] (-1)^(u + v) I am sure this also gives (-1)^v in the development version. Andrzej Kozlowski On 2 Jun 2006, at 17:09, Andrzej Kozlowski wrote: > > On 1 Jun 2006, at 19:54, Amitabha Roy wrote: > >> Hello: >> >> I would like Mathematica to be able to take an expression, say, >> >> (-1)^{2 x + 3 y} and be able to simplify to (-1)^y. >> >> Is there a way one can do this ? >> >> Thanks >> > > Note that you are using {} instead of (). Different kind of brackets > have completely different meaning in Mathematica. > I have found it amazingly hard to force Mathematica to perform this > simplification. The best I could do is this. We need two rules. rule1 > will replace 2x by u and 3y by v. rule 2 does the opposite: it > replaces u by 2x and v by 2y. > > rule1 = {2x -> u, 3y -> v};rule2 = Map[Reverse, rule1]; > > Now: > > > Simplify[TrigFactor[ > FullSimplify[ExpToTrig[ > FullSimplify[ > ComplexExpand[ > (-1)^(2*x + 3*y) /. > rule1], Mod[u, 2] == > 0] /. rule2], > y â?? Integers]], > y â?? Integers] > > > (-1)^y > > Uff... Surely, this ought to be easier... > > Andrzej Kozlowski > Tokyo, Japan >

**Follow-Ups**:**Re: Re: Re: Simplifying algebraic expressions***From:*"Carl K. Woll" <carlw@wolfram.com>

**References**:**Simplifying algebraic expressions***From:*Amitabha Roy <aroy@cs.bc.edu>

**Re: Simplifying algebraic expressions***From:*Andrzej Kozlowski <akoz@mimuw.edu.pl>