Guess this is a bug in Mathcads symbolics or am I missing something?
Thanks. This bug must be know.
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.
For function g and h the answer for the derivative is now correct. For f it still is NOT.
See my post below.
Luc
@LucMeekes wrote:
For function g and h the answer for the derivative is now correct. For f it still is NOT.
See my post below.
Luc
Yes, the reason seems to be that even in float mode the symblics first simplifies symbolically (at leat partial) which gives us exact "e" (or the wrong e(x)) and applies float mode only after that.
So 1.0*e^x does not do the trick, while e^1.0 does.
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).
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
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:
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
@LucMeekes wrote:
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
Right, neither the result itself, nor the fact that Maple can deliver this result correctly is surprising 🙂
Hello everyone,
However, if I represent e with exp (1), the result is acceptable:
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.
but if I use "substitute 2.7182182...=e" , which makes the whole thing a bit redundant, I get the correct symbolic result:
@-MFra- wrote:
but if I use "substitute 2.7182182...=e" , which makes the whole thing a bit redundant, I get the correct symbolic result:
Not reasonable IMHO !
I would never do such a thing. I have been using MATHCAD since the nineties and something like this has never happened to me ...
@-MFra- wrote:
I would never do such a thing.
Neither would I - that was the point. Its no practical workaround.
You wrote that by doing so "...I get the correct symbolic result" but in fact you get any result you like depending on whatever you substitute. You have to already know the correct result to apply the correct substitution.
I have been using MATHCAD since the nineties and something like this has never happened to me ...
My first version was 2.0 followed by 2.5 - both under good old DOS 😉
But this bug has to do with the symbolics (muPad) and as shown by Luc is not present in MC11 with Maple. So I guess its there since MC14.
kann sein, aber es ist alles klar. Gruß
Ja.
So we found a bug and can be pretty sure that it will not be fixed. It would make no sense reporting it. After all there is no officially accepted bug report procedure.
You could just open a support ticket and are only able to do so if you pay maintenance fee. This clearly shows that PTC is not really interested in improving their software and making it bug-free (which is not possibe anyway, I know). Otherwise they would happily receive bug fixes by whomever.