Incorrect derivative
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Incorrect derivative
Hello,
I encountered a very strange problem in Mathcad 15. When I want to calculate a derivative symbolically that contains a natural logarithm the solution is wrong. I do not know why is it so.
Attached you can find the Mathcad file.
Regards
Rafal
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I can confirm that this is a severe bug.
Here in Mathcad 15 M045
and here in Prime 3.0
As you can see the problem occurs with other functions, too. If the function simplifies to an exact value like ln(e) or if we force to switch to float mode or if we introduce another variable (anywhere) the derivative is OK.
I am not absolutely sure but can it be that we had already discussed this bug quite a while ago? But I could not find an appropriate thread, so maybe I am wrong about that.
Anybody using older releases of Mathcad 15 or even Mathcad 15 and can give it try to see if its a newly introduced bug ar an older one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hmm. It still does not work for me. Maybe it is related to Mathcad 15 version/patch? I attached a snapshot of my original problem (left) and your solution (right).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Seems like a bug to me. You get the correct result if you put variables in the natural logarithm instead of numbers:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Yes, it is a bug. The problem does not appear in Mathcad version 13.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I can confirm that this is a severe bug.
Here in Mathcad 15 M045
and here in Prime 3.0
As you can see the problem occurs with other functions, too. If the function simplifies to an exact value like ln(e) or if we force to switch to float mode or if we introduce another variable (anywhere) the derivative is OK.
I am not absolutely sure but can it be that we had already discussed this bug quite a while ago? But I could not find an appropriate thread, so maybe I am wrong about that.
Anybody using older releases of Mathcad 15 or even Mathcad 15 and can give it try to see if its a newly introduced bug ar an older one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The bug is there in the earliest M15.
If you click on the ln(2)(x) the display changes to ln(2(x))
Alan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
AlanStevens wrote:
The bug is there in the earliest M15.
If you click on the ln(2)(x) the display changes to ln(2(x))
Alan
Oh, I see. Its a strange bug. And when we assign the derivative to a function and evaluate it symbolically, we get a strange error message
In my last sentence above I wanted to write "Anybody using older releases of Mathcad 15 or even Mathcad 14..."
It seems the change quite a bit from 14 to 15 concerning the symbolic calculus (mainly wrong integral tables, I guess) - so maybe it happened there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
FYI - this error also exists in 14.0 M020.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks for the information. So it was one of the many bugs which were already introduced by the replacement of Maple by MuPad and chances are we can't blame PTC for it 😉
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Just to make sure....Mathcad 11:
Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks. But I had no doubt, that MC11 with Maple would get it right 😉
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you for your reply. Indeed, there is a way to deal with this bug by multiplying the expression by additional variable. I have introduced it in my calculations, and after the derivative is calculated I set the additional variable value to 1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Rafal Sulwinski wrote:
Thank you for your reply. Indeed, there is a way to deal with this bug by multiplying the expression by additional variable. I have introduced it in my calculations, and after the derivative is calculated I set the additional variable value to 1.
Yes and you could do it in one step by using the symbolic "substitute" (which automatically applies some "simplifications" which you probably may not like).
Using the Ctrl-Shift-K trick we can even create a variable name which is a simple space and also hide the keywords so all looks like it is as it should.
But this all should not be necessary and I consider it a really server bug. Anybody willing to report it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I am not absolutely sure but can it be that we had already discussed this bug quite a while ago? But I could not find an appropriate thread, so maybe I am wrong about that.
Yes, we did. However, I also cannot find the thread.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I ask my students what is a derivative of x^n.
99% answer n*x^(n-1). And only 1% asks - what is a variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
????????????
The variable of differentiation in Rafals sheet is clearly dx_M.xx - no doubt.
