Search code examples
booleanmaplemathematical-expressions

Why does `evalb(((3*x + 1)^5)(3*x - 1)/x^6 = ((3 + 1/x)^5)(3 - 1/x)) assuming (0 < x)` return `false` in Maple?


The question should perhaps be why does (3*x + 1)^5 * (3*x - 1) / x^6 = (3 + 1/x)^5 * (3 - 1/x) evaluate to false in Maple, even with the assumption that x > 0. The same expression evaluates to true in Mathematica and, of course, the statement itself is mathematically true under the previous assumption.

Maple's help pages don't give any clue on why this happens, and I would like someone to explain this behaviour before I think that Maple's evalb() is kind of broken. It is the type of questions I'm asking myself lately, since I'm deciding wether I should learn Maple or rather drop it and focus on learning Mathematica.

Thank you in advance.


Solution

  • If both sides of the equation are of type numeric (or extended complex numeric, etc), then evalb will test the equality. But for your symbolic expressions the evalb command will only test that they are the very same expression (by comparing memory address).

    But they are not the very same expression. They are merely two different symbolic expressions for which you wish to do a mathematical test of equivalence.

    restart;
    
    expr:=(3*x+1)^5*(3*x-1)/x^6=(3+1/x)^5*(3-1/x):
    
    is(expr);
                              true
    
    testeq(expr);
                              true
    
    simplify((rhs-lhs)(expr));
                               0