Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

Expect a letter from a friend who will ask a favor of you.


sci / sci.math.symbolic / Re: why this difference in simplification behavior between Mathematicaand Maple

SubjectAuthor
* why this difference in simplification behavior between Mathematica and MapleNasser M. Abbasi
`* Re: why this difference in simplification behavior between Mathematicaand Mapleclicliclic@freenet.de
 `- Re: why this difference in simplification behavior between Mathematicaand MapleNasser M. Abbasi

1
Subject: why this difference in simplification behavior between Mathematica and Maple
From: Nasser M. Abbasi
Newsgroups: sci.math.symbolic
Organization: A noiseless patient Spider
Date: Wed, 11 Oct 2023 04:15 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nma@12000.org (Nasser M. Abbasi)
Newsgroups: sci.math.symbolic
Subject: why this difference in simplification behavior between Mathematica
and Maple
Date: Tue, 10 Oct 2023 23:15:43 -0500
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <ug57hh$1l30a$1@dont-email.me>
Reply-To: nma@12000.org
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 11 Oct 2023 04:15:45 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="476e50fec7ab02e1ddc159ec09e65613";
logging-data="1739786"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Yok7gLzlugOcdoDtn8R/f"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:0fPs+NXUDHQasQOi4Z7PBVIgyZg=
Content-Language: en-US
View all headers

in Mathematica

eq= a==a-x
Simplify[eq]

gives what is expected, which is

x==0

in Maple

eq:=a=a-x;
simplify(eq)

returns back a=a-x. So it did not do anything.

Why Maple does not do such simplification automatically as
Mathematica? Using option "size" does not help

eq:=a=a-x;
simplify(eq,size)

Only way I found in Maple is to manually convert
the equation to put everything on one side, like this

eq:=a=a-x;
simplify( lhs(eq)-rhs(eq) = 0 );

x=0

What is the logic that makes Maple not simplify a=a-x
to x=0 automatically? I do not see it myself.

Does your CAS simplify this automatically also?

--Nasser

Subject: Re: why this difference in simplification behavior between Mathematicaand Maple
From: clicliclic@freenet.d
Newsgroups: sci.math.symbolic
Organization: Killfiles, Unlimited
Date: Wed, 11 Oct 2023 15:26 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!news.killfile.org!.POSTED.port-92-196-139-121.dynamic.as20676.net!not-for-mail
From: nobody@nowhere.invalid (clicliclic@freenet.de)
Newsgroups: sci.math.symbolic
Subject: Re: why this difference in simplification behavior between
Mathematicaand Maple
Date: Wed, 11 Oct 2023 17:26:09 +0200
Organization: Killfiles, Unlimited
Message-ID: <6526BE91.5DB7B585@nowhere.invalid>
References: <ug57hh$1l30a$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: flea.killfile.org; posting-host="port-92-196-139-121.dynamic.as20676.net:92.196.139.121";
logging-data="4130644"; mail-complaints-to="news@news.killfile.org"
X-Mailer: Mozilla 4.75 [de] (Win98; U)
X-Accept-Language: de
View all headers

"Nasser M. Abbasi" schrieb:
>
> in Mathematica
>
> eq= a==a-x
> Simplify[eq]
>
> gives what is expected, which is
>
> x==0
>
> in Maple
>
> eq:=a=a-x;
> simplify(eq)
>
> returns back a=a-x. So it did not do anything.
>
> Why Maple does not do such simplification automatically as
> Mathematica? Using option "size" does not help
>
> eq:=a=a-x;
> simplify(eq,size)
>
> Only way I found in Maple is to manually convert
> the equation to put everything on one side, like this
>
> eq:=a=a-x;
> simplify( lhs(eq)-rhs(eq) = 0 );
>
> x=0
>
> What is the logic that makes Maple not simplify a=a-x
> to x=0 automatically? I do not see it myself.
>
> Does your CAS simplify this automatically also?
>

There is no explicit simplification command in Derive 6.10, only a
simplification button, and clicking this button doesn't change your
equation:

a = a - x
a = a - x

For an explicit simplification command one may define a dummy
procedure, however, which then indeed simplifies you equation:

eval(t) := t

eval(a = a - x)
x = 0

the FACTOR and EXAND commands in Derive also work here:

FACTOR(a = a - x)
x = 0

EXPAND(a = a - x)
x = 0

Perhaps Maple operates in a similar way.

Martin.

Subject: Re: why this difference in simplification behavior between Mathematicaand Maple
From: Nasser M. Abbasi
Newsgroups: sci.math.symbolic
Organization: A noiseless patient Spider
Date: Wed, 11 Oct 2023 18:21 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nma@12000.org (Nasser M. Abbasi)
Newsgroups: sci.math.symbolic
Subject: Re: why this difference in simplification behavior between
Mathematicaand Maple
Date: Wed, 11 Oct 2023 13:21:24 -0500
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <ug6p35$1vilh$1@dont-email.me>
References: <ug57hh$1l30a$1@dont-email.me> <6526BE91.5DB7B585@nowhere.invalid>
Reply-To: nma@12000.org
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 11 Oct 2023 18:21:25 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="476e50fec7ab02e1ddc159ec09e65613";
logging-data="2083505"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19r1Ib2ovbVaxiIS4wa0FV6"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:FQjVIr5jXk0jZ1GmVnjT3TuLAkU=
Content-Language: en-US
In-Reply-To: <6526BE91.5DB7B585@nowhere.invalid>
View all headers

On 10/11/2023 10:26 AM, clicliclic@freenet.de wrote:

> Perhaps Maple operates in a similar way.
>
> Martin.

May be. I've been using Maple for long time, and I just
noticed this only now, when I was looking at some
result and noticed

ln(x) = ln(x) + .... etc...

Even thought I did simplify on the equation before.

So I had to change all my code which simplifies
equations, by first rewriting the equation as
lhs(eq)-rhs(eq)=0 and only then call simplify.

I think Mathematica's way is more natural. But may be
there is a good reason why Maple does not simplify it,
and that is why I asked.

btw, sympy also does it like Mathematica:

--------------------------------
>python
Python 3.11.3 (main, Apr 5 2023, 15:52:25) [GCC 12.2.1 20230201] on linux
>>> from sympy import *
>>> a,x = symbols('a x')
>>> eq=Eq(a,a-x)
>>> eq
Eq(a, a - x)

>>> simplify(eq)
Eq(x, 0)

-------------------

--Nasser

1

rocksolid light 0.9.8
clearnet tor