MathGroup Archive 2006

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

Search the Archive

Re: Re: Simplifying algebraic expressions


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
>


  • Prev by Date: Re: piecewise integration
  • Next by Date: Re: How to make results from Integrate and NIntegrate agree
  • Previous by thread: Re: Simplifying algebraic expressions
  • Next by thread: Re: Re: Re: Simplifying algebraic expressions