cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Incorrect derivative

rsulwinski
1-Newbie

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

1 ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

16 REPLIES 16

Works if you get the syntax right

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).

Seems like a bug to me.  You get the correct result if you put variables in the natural logarithm instead of numbers:

rsulwinski
1-Newbie
(To:MJG)

Yes, it is a bug. The problem does not appear in Mathcad version 13.

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.

The bug is there in the earliest M15.

If you click on the ln(2)(x)  the display changes to ln(2(x))  

Alan

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.

MJG
18-Opal
18-Opal
(To:Werner_E)

FYI - this error also exists in 14.0 M020.

Werner_E
24-Ruby V
(To:MJG)

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 😉

LucMeekes
23-Emerald III
(To:Werner_E)

Just to make sure....Mathcad 11:

Luc

Thanks. But I had no doubt, that MC11 with Maple would get it right 😉

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.

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?

RichardJ
19-Tanzanite
(To:Werner_E)

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.

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

????????????

The variable of differentiation in Rafals sheet is clearly dx_M.xx - no doubt.

Top Tags