FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Forum index » Science and Technology » Math » Symbolic
Algebraic Expression Manipulation
Post new topic   Reply to topic Page 1 of 1 [11 Posts] View previous topic :: View next topic
Author Message
Dana DeLouis
science forum beginner


Joined: 06 Mar 2006
Posts: 37

PostPosted: Thu Jun 01, 2006 1:21 pm    Post subject: Re: Algebraic Expression Manipulation Reply with quote

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
Dana DeLouis
science forum beginner


Joined: 06 Mar 2006
Posts: 37

PostPosted: Thu Jun 01, 2006 6:26 am    Post subject: Re: Algebraic Expression Manipulation Reply with quote

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: month-year@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

PostPosted: Thu Jun 01, 2006 6:21 am    Post subject: Re: Algebraic Expression Manipulation Reply with quote

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: month-year@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

PostPosted: Thu Jun 01, 2006 12:33 am    Post subject: Re: Algebraic Expression Manipulation Reply with quote

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
duli
science forum beginner


Joined: 31 May 2006
Posts: 4

PostPosted: Wed May 31, 2006 8:35 pm    Post subject: Re: Algebraic Expression Manipulation Reply with 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:
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: month-year@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

PostPosted: Wed May 31, 2006 8:33 pm    Post subject: Re: Algebraic Expression Manipulation Reply with quote

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
Dave (from the UK)
science forum addict


Joined: 12 Jan 2006
Posts: 76

PostPosted: Wed May 31, 2006 7:33 pm    Post subject: Re: Algebraic Expression Manipulation Reply with quote

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: month-year@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
A. van der Meer
science forum beginner


Joined: 31 May 2006
Posts: 1

PostPosted: Wed May 31, 2006 7:27 pm    Post subject: Re: Algebraic Expression Manipulation Reply with quote

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
duli
science forum beginner


Joined: 31 May 2006
Posts: 4

PostPosted: Wed May 31, 2006 6:43 pm    Post subject: Re: Algebraic Expression Manipulation Reply with 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.




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
D Herring
science forum beginner


Joined: 12 Dec 2005
Posts: 7

PostPosted: Wed May 31, 2006 6:26 pm    Post subject: Re: Algebraic Expression Manipulation Reply with quote

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

PostPosted: Wed May 31, 2006 5:46 pm    Post subject: Algebraic Expression Manipulation Reply with quote

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
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [11 Posts] View previous topic :: View next topic
The time now is Sat Jun 24, 2017 7:09 am | All times are GMT
Forum index » Science and Technology » Math » Symbolic
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Integrate erf type expression Pratim Vakish num-analysis 4 Mon Jul 17, 2006 2:27 pm
No new posts How to get the analytical PDF of this expression? glare22@gmail.com num-analysis 3 Thu Jul 13, 2006 9:08 am
No new posts Question from an old algebraic topology qualifying exam melanie Math 5 Thu Jul 13, 2006 1:38 am
No new posts Simplifying Algebraic expression Jeffrey Spoon Math 4 Wed Jul 12, 2006 3:04 pm
No new posts ? LS expression for A*x = b Cheng Cosine num-analysis 4 Tue Jul 11, 2006 11:27 pm

Copyright © 2004-2005 DeniX Solutions SRL
Other DeniX Solutions sites: Electronics forum |  Medicine forum |  Unix/Linux blog |  Unix/Linux documentation |  Unix/Linux forums  |  send newsletters
 


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0663s ][ Queries: 20 (0.0398s) ][ GZIP on - Debug on ]