• why this difference in simplification behavior between Mathematica and

    From Nasser M. Abbasi@21:1/5 to All on Tue Oct 10 23:15:43 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nobody@nowhere.invalid@21:1/5 to Nasser M. Abbasi on Wed Oct 11 17:26:09 2023
    "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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nasser M. Abbasi@21:1/5 to clicliclic@freenet.de on Wed Oct 11 13:21:24 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)