Skip to main content
25-Diamond I
May 11, 2019
Question

Bug in Mathcads Symbolics

  • May 11, 2019
  • 3 replies
  • 5927 views

Guess this is a bug in Mathcads symbolics or am I missing something?

B.png

3 replies

ttokoro
21-Topaz I
21-Topaz I
May 11, 2019

exp-bug.png

Thanks. This bug must be know.

t.t.
Werner_E25-Diamond IAuthor
25-Diamond I
May 12, 2019

The workaround you show does not need the UnitsOf(e) part. It works simply because of the inline evaluation, which redefines e as a simple float number. It looks like e is defined in the symbolics as a function e(x) and this fact should not show through, thats the essence of bug, I guess.

This would explain to some extent the error message I get - Mathcad seems to think that I am trying to evaluate e(x)(x) which equals e(x,x) but "function" e only accepts just 1 argument, not 2.

Not sure about that explanation, though.

B.png

23-Emerald IV
May 12, 2019

For function g and h the answer for the derivative is now correct. For f it still is NOT.

See my post below.

 

Luc

23-Emerald IV
May 12, 2019

The bug (yes it's a severe bug!), already occurs in the second line/expression.

The derivative of x*e to x is NOT e(x), but simply e.

Mathcad11/Maple translates that to exp(1), which is correct to some extent. It's bad in the sense that you cannot have a symbolic variable called e, that means something else than exp(1), but I can live with it. According to ISO 80000, variables should be written in italics, well known mathematics constants and functions should be written in roman (upright) style. Then a variable called e could be anything , but e=exp(1).

20190512_Bug.png

 

Is there any difference when defining f(x):=e*x

And I wonder how Prime fares...it is capable of telling the difference between a variable e and the constant e=exp(1).

 

Success!
Luc

 

 

Werner_E25-Diamond IAuthor
25-Diamond I
May 12, 2019

Is there any difference when defining f(x):=e*x

And I wonder how Prime fares...it is capable of telling the difference between a variable e and the constant e=exp(1).

 


No, the order of the multiplication does not matter.

As I don't care about Prime I did not bother starting up the moloch, but as it seems to be a symbolic bug and Prime uses the same old muPad I guess that there would be not much difference.

 

Here is another strange effect I noticed while playing around:

B.png

23-Emerald IV
May 12, 2019

The (symbolic) derivative of f(x) to x is exp(2) according to Mathad11/Maple.

That won't come as a surprise for you I guess.

 

Luc

21-Topaz II
May 13, 2019

Hello everyone,
However, if I represent e with exp (1), the result is acceptable:

xe.jpg

Werner_E25-Diamond IAuthor
25-Diamond I
May 13, 2019

Yes, thats just another way to force the symbolics into float mode. As shown above this gives a a correct, but only a numeric result - not what we would expect from symbolic math.

Above I used "e^1.0" and you used the equivalent "exp(1.0)"

Its bad to know that we can't/shouldn't use the exact e in some symbolic calculations but rather have to resort to a numeric approximation.

21-Topaz II
May 13, 2019

but if I use "substitute 2.7182182...=e" , which makes the whole thing a bit redundant, I get the correct symbolic result: 

xe.jpg