Author 
Message 
duli science forum beginner
Joined: 31 May 2006
Posts: 4

Posted: Wed May 31, 2006 5:46 pm Post subject:
Algebraic Expression Manipulation



Hello:
I posted this to the mathematica newgroup but somehow it never
appeared. So
I am positing it here.
I need a way to take an expression like
(1)^(2x + 3 y) and be able to reduce it to (1)^y.
I could not figure out how to do this in Mathematica and need
suggestions
as to how one might go about doing this in other packages (like Maple).
Thanks! 

Back to top 


D Herring science forum beginner
Joined: 12 Dec 2005
Posts: 7

Posted: Wed May 31, 2006 6:26 pm Post subject:
Re: Algebraic Expression Manipulation



duli wrote:
Quote:  I posted this to the mathematica newgroup but somehow it never
appeared. So I am positing it here.

The Mathematica group is moderated; your post was probably dropped.
Quote:  I need a way to take an expression like
(1)^(2x + 3 y) and be able to reduce it to (1)^y.

I don't see how that simplification is possible unless we know more
about x and y; maybe x=y?
In Mathematica, try
Simplify[(1)^(2x+3y), x==y]
Quote:  I could not figure out how to do this in Mathematica and need
suggestions as to how one might go about doing this in other packages (like Maple).

Most packages have some variant of the simplify command...
Daniel 

Back to top 


duli science forum beginner
Joined: 31 May 2006
Posts: 4

Posted: Wed May 31, 2006 6:43 pm Post subject:
Re: Algebraic Expression Manipulation



I want to use (1)^2 =1 in the expressions below. So
(1)^(2x+2y) should simply to 1. Relations between x and y
are not relevant to this computation.
D Herring wrote:
Quote:  duli wrote:
I posted this to the mathematica newgroup but somehow it never
appeared. So I am positing it here.
The Mathematica group is moderated; your post was probably dropped.
I need a way to take an expression like
(1)^(2x + 3 y) and be able to reduce it to (1)^y.
I don't see how that simplification is possible unless we know more
about x and y; maybe x=y?
In Mathematica, try
Simplify[(1)^(2x+3y), x==y]
I could not figure out how to do this in Mathematica and need
suggestions as to how one might go about doing this in other packages (like Maple).
Most packages have some variant of the simplify command...
Daniel 


Back to top 


A. van der Meer science forum beginner
Joined: 31 May 2006
Posts: 1

Posted: Wed May 31, 2006 7:27 pm Post subject:
Re: Algebraic Expression Manipulation



duli wrote:
Quote:  I want to use (1)^2 =1 in the expressions below. So
(1)^(2x+2y) should simply to 1. Relations between x and y
are not relevant to this computation.

So you have to tell your CAS (and the newsgroup) that x
and y are integers.
For example in Maple:
simplify((1)^(2*x+3*y)) assuming integer;
gives (1)^y
Quote: 
D Herring wrote:
duli wrote:
I posted this to the mathematica newgroup but somehow it never
appeared. So I am positing it here.
The Mathematica group is moderated; your post was probably dropped.
I need a way to take an expression like
(1)^(2x + 3 y) and be able to reduce it to (1)^y.
I don't see how that simplification is possible unless we know more
about x and y; maybe x=y?
In Mathematica, try
Simplify[(1)^(2x+3y), x==y]
I could not figure out how to do this in Mathematica and need
suggestions as to how one might go about doing this in other packages
(like Maple).
Most packages have some variant of the simplify command...
Daniel 


Back to top 


Dave (from the UK) science forum addict
Joined: 12 Jan 2006
Posts: 76

Posted: Wed May 31, 2006 7:33 pm Post subject:
Re: Algebraic Expression Manipulation



duli wrote:
Quote:  Hello:
I posted this to the mathematica newgroup but somehow it never
appeared. So
I am positing it here.

As someone said it is moderated. Looking at the content of your post, I
don't think Steve would censor it. However, the delays are really
annoying. I give up and don't bother posting there any more.
Quote:  I need a way to take an expression like
(1)^(2x + 3 y) and be able to reduce it to (1)^y.

In general that is simply not true, but of couse it will be under some
circumstances. What do you know about x and y?
Quote:  I could not figure out how to do this in Mathematica and need
suggestions
as to how one might go about doing this in other packages (like Maple).

Well, it is simply not possible.

Dave K MCSE.
MCSE = Minefield Consultant and Solitaire Expert.
Please note my email address changes periodically to avoid spam.
It is always of the form: monthyear@domain. Hitting reply will work
for a couple of months only. Later set it manually.
http://witm.sourceforge.net/ (Web based Mathematica frontend) 

Back to top 


duli science forum beginner
Joined: 31 May 2006
Posts: 4

Posted: Wed May 31, 2006 8:33 pm Post subject:
Re: Algebraic Expression Manipulation



Thanks! I'll try that.
Unfortunately in Mathematica 5.1
Simplify[(1)^(4r + 5 s), {r, s} ∈ Integers]
gives (1)^(4r + 5s)
and so gives no simplification.
Perhaps it is fixed in 5.2 but I don't have that version.
A. van der Meer wrote:
Quote:  duli wrote:
I want to use (1)^2 =1 in the expressions below. So
(1)^(2x+2y) should simply to 1. Relations between x and y
are not relevant to this computation.
So you have to tell your CAS (and the newsgroup) that x
and y are integers.
For example in Maple:
simplify((1)^(2*x+3*y)) assuming integer;
gives (1)^y
D Herring wrote:
duli wrote:
I posted this to the mathematica newgroup but somehow it never
appeared. So I am positing it here.
The Mathematica group is moderated; your post was probably dropped.
I need a way to take an expression like
(1)^(2x + 3 y) and be able to reduce it to (1)^y.
I don't see how that simplification is possible unless we know more
about x and y; maybe x=y?
In Mathematica, try
Simplify[(1)^(2x+3y), x==y]
I could not figure out how to do this in Mathematica and need
suggestions as to how one might go about doing this in other packages
(like Maple).
Most packages have some variant of the simplify command...
Daniel 


Back to top 


duli science forum beginner
Joined: 31 May 2006
Posts: 4

Posted: Wed May 31, 2006 8:35 pm Post subject:
Re: Algebraic Expression Manipulation



My original post left out the requirement that x,y are integers. With
this requirement, it is possible to simplify since the exponent
is a polynomial in GF(2).
So I need to add that requirement. But even when I specify that,
Mathematica
does not seem to be able to simplify to the required form. Perhaps
I am doing something wrong.
Dave (from the UK) wrote:
Quote:  duli wrote:
Hello:
I posted this to the mathematica newgroup but somehow it never
appeared. So
I am positing it here.
As someone said it is moderated. Looking at the content of your post, I
don't think Steve would censor it. However, the delays are really
annoying. I give up and don't bother posting there any more.
I need a way to take an expression like
(1)^(2x + 3 y) and be able to reduce it to (1)^y.
In general that is simply not true, but of couse it will be under some
circumstances. What do you know about x and y?
I could not figure out how to do this in Mathematica and need
suggestions
as to how one might go about doing this in other packages (like Maple).
Well, it is simply not possible.

Dave K MCSE.
MCSE = Minefield Consultant and Solitaire Expert.
Please note my email address changes periodically to avoid spam.
It is always of the form: monthyear@domain. Hitting reply will work
for a couple of months only. Later set it manually.
http://witm.sourceforge.net/ (Web based Mathematica frontend) 


Back to top 


D Herring science forum beginner
Joined: 12 Dec 2005
Posts: 7

Posted: Thu Jun 01, 2006 12:33 am Post subject:
Re: Algebraic Expression Manipulation



duli wrote:
Quote:  Unfortunately in Mathematica 5.1
Simplify[(1)^(4r + 5 s), {r, s} ∈ Integers]
gives (1)^(4r + 5s)
and so gives no simplification.
Perhaps it is fixed in 5.2 but I don't have that version.

Nope; not fixed in 5.2.
For entertainment, I tried a few different pairs of coefficients.
When both coefficients were the even,
Simplify[(1)^(2r+4s), {r,s}\[Element]Integers]
> 1
When both coefficients were odd and had a nontrivial gcd,
FullSimplify[(1)^(3r+6s), {r,s}\[Element]Integers]
> Cos[3 Pi (r + 2s)]
For mixed even and odd, the result is returned unevaluated.
You can get a little closer by forcing Mathematica to distribute the
terms first, but it still acts poorly, refusing to remove odd coefficients.
Simplify[ Distribute[(1)^(2r+3s)], {r,s}\[Element]Integers ]
> 1 + (1)^(3s)
Daniel 

Back to top 


Dana DeLouis science forum beginner
Joined: 06 Mar 2006
Posts: 37

Posted: Thu Jun 01, 2006 6:21 am Post subject:
Re: Algebraic Expression Manipulation



Quote:  I need a way to take an expression like
(1)^(2x + 3 y) and be able to reduce it to (1)^y.

Hi. I'm using v5.2
equ = (1)^(2*x + 3*y);
Assuming[x + y == 1, FullSimplify[equ]]
(1)^y
I got the hint from using "Reduce."
FullSimplify[Reduce[equ == (1)^y, {x, y}]];

HTH. :>)
Dana DeLouis
"duli" <dulipishi@gmail.com> wrote in message
news:1149107746.028317.232890@i40g2000cwc.googlegroups.com...
Quote:  My original post left out the requirement that x,y are integers. With
this requirement, it is possible to simplify since the exponent
is a polynomial in GF(2).
So I need to add that requirement. But even when I specify that,
Mathematica
does not seem to be able to simplify to the required form. Perhaps
I am doing something wrong.
Dave (from the UK) wrote:
duli wrote:
Hello:
I posted this to the mathematica newgroup but somehow it never
appeared. So
I am positing it here.
As someone said it is moderated. Looking at the content of your post, I
don't think Steve would censor it. However, the delays are really
annoying. I give up and don't bother posting there any more.
I need a way to take an expression like
(1)^(2x + 3 y) and be able to reduce it to (1)^y.
In general that is simply not true, but of couse it will be under some
circumstances. What do you know about x and y?
I could not figure out how to do this in Mathematica and need
suggestions
as to how one might go about doing this in other packages (like Maple).
Well, it is simply not possible.

Dave K MCSE.
MCSE = Minefield Consultant and Solitaire Expert.
Please note my email address changes periodically to avoid spam.
It is always of the form: monthyear@domain. Hitting reply will work
for a couple of months only. Later set it manually.
http://witm.sourceforge.net/ (Web based Mathematica frontend)



Back to top 


Dana DeLouis science forum beginner
Joined: 06 Mar 2006
Posts: 37

Posted: Thu Jun 01, 2006 6:26 am Post subject:
Re: Algebraic Expression Manipulation



I forgot to mention that since a Constant can be anything, I picked 0.
FullSimplify[Reduce[equ == (1)^y, {x, y}]] /.
C[1] > 0
x + y == 1  x + y == 2

HTH. :>)
Dana DeLouis
"Dana" <ddelouis@bellsouth.net> wrote in message
news:nHvfg.524$ED2.66@bignews2.bellsouth.net...
Quote:  I need a way to take an expression like
(1)^(2x + 3 y) and be able to reduce it to (1)^y.
Hi. I'm using v5.2
equ = (1)^(2*x + 3*y);
Assuming[x + y == 1, FullSimplify[equ]]
(1)^y
I got the hint from using "Reduce."
FullSimplify[Reduce[equ == (1)^y, {x, y}]];

HTH. :>)
Dana DeLouis
"duli" <dulipishi@gmail.com> wrote in message
news:1149107746.028317.232890@i40g2000cwc.googlegroups.com...
My original post left out the requirement that x,y are integers. With
this requirement, it is possible to simplify since the exponent
is a polynomial in GF(2).
So I need to add that requirement. But even when I specify that,
Mathematica
does not seem to be able to simplify to the required form. Perhaps
I am doing something wrong.
Dave (from the UK) wrote:
duli wrote:
Hello:
I posted this to the mathematica newgroup but somehow it never
appeared. So
I am positing it here.
As someone said it is moderated. Looking at the content of your post, I
don't think Steve would censor it. However, the delays are really
annoying. I give up and don't bother posting there any more.
I need a way to take an expression like
(1)^(2x + 3 y) and be able to reduce it to (1)^y.
In general that is simply not true, but of couse it will be under some
circumstances. What do you know about x and y?
I could not figure out how to do this in Mathematica and need
suggestions
as to how one might go about doing this in other packages (like
Maple).
Well, it is simply not possible.

Dave K MCSE.
MCSE = Minefield Consultant and Solitaire Expert.
Please note my email address changes periodically to avoid spam.
It is always of the form: monthyear@domain. Hitting reply will work
for a couple of months only. Later set it manually.
http://witm.sourceforge.net/ (Web based Mathematica frontend)



Back to top 


Dana DeLouis science forum beginner
Joined: 06 Mar 2006
Posts: 37

Posted: Thu Jun 01, 2006 1:21 pm Post subject:
Re: Algebraic Expression Manipulation



Hi. I believe these are two different equations. Here's what I did with v
5.2:
Quote:  (1)^(2x+2y) should simply to 1. Relations between x and y
are not relevant to this computation.

Doesn't seem to be true with non integers...
(1)^(2*x + 2*y) /. {x > 2.1, y > 3}
0.8090169943749502 + 0.5877852522924693*I
Assuming[Element[{x, y}, Integers], Simplify[(1)^(2x + 2y)]]
1

We can get Daniel's neater solution by setting C[1] = 1.
I've used Reduce to get a better understanding of the relationships.
FullSimplify[Reduce[equ == (1)^y, {x, y}]] /.
C[1] > 1
x + y == 1  x + y == 0
Where we pick the second suggestion, and change it slightly to x==y
therefore:
Assuming[r == s, Simplify[(1)^(4*r + 5*s)]]
(1)^s


HTH. :>)
Dana DeLouis
"duli" <dulipishi@gmail.com> wrote in message
news:1149107616.440952.323250@j55g2000cwa.googlegroups.com...
Thanks! I'll try that.
Unfortunately in Mathematica 5.1
Simplify[(1)^(4r + 5 s), {r, s} ? Integers]
gives (1)^(4r + 5s)
and so gives no simplification.
Perhaps it is fixed in 5.2 but I don't have that version.
A. van der Meer wrote:
Quote:  duli wrote:
I want to use (1)^2 =1 in the expressions below. So
(1)^(2x+2y) should simply to 1. Relations between x and y
are not relevant to this computation.
So you have to tell your CAS (and the newsgroup) that x
and y are integers.
For example in Maple:
simplify((1)^(2*x+3*y)) assuming integer;
gives (1)^y
D Herring wrote:
duli wrote:
I posted this to the mathematica newgroup but somehow it never
appeared. So I am positing it here.
The Mathematica group is moderated; your post was probably dropped.
I need a way to take an expression like
(1)^(2x + 3 y) and be able to reduce it to (1)^y.
I don't see how that simplification is possible unless we know more
about x and y; maybe x=y?
In Mathematica, try
Simplify[(1)^(2x+3y), x==y]
I could not figure out how to do this in Mathematica and need
suggestions as to how one might go about doing this in other packages
(like Maple).
Most packages have some variant of the simplify command...
Daniel 


Back to top 


Google


Back to top 



The time now is Wed Jan 23, 2019 11:52 pm  All times are GMT

