Skip to main content
1-Visitor
June 23, 2016
Question

Why is differentation of const. times x giving const. (x)?

  • June 23, 2016
  • 25 replies
  • 7082 views

In Prime 3.1 symbolic evaluation of d (sin(6) x)/dx yields sin(6) (x), while I expected sin(6).

What did I misunderstand?

/Henning

25 replies

24-Ruby III
June 23, 2016

Observation ...

sin.png

MH

23-Emerald V
June 23, 2016

Interesting.  The same thing happens in Mathcad 15 ... same symbolic engine, as far as I'm aware.

Stuart

23-Emerald V
June 23, 2016

... Forgot to add that replacement of g = x by g = x^2 seems to give the correct answer, so it may be something to do with just x being miscalculated (or some assumption that I'm making that the symbolic processor isn't!).

.... this also seems vaguely familiar - I have a slight sense of deja vu.

Stuart

1-Visitor
June 23, 2016

Neither Prime nor MC15 can evaluate its own symbolic result numerically when the variable is replaced by a number:DiffPrime3.1.PNG

DiffMC15.PNG

/Henning

23-Emerald V
June 24, 2016

Henning Søgaard wrote:

Neither Prime nor MC15 can evaluate its own symbolic result numerically when the variable is replaced by a number:DiffPrime3.1.PNG

DiffMC15.PNG

But, fortunately, M15 (and I presume Prime) can handle the substitution if 6 is substituted for a constant ...

Stuart

24-Ruby IV
June 23, 2016

I think in Mathcad 11 and Maple all is OK:

24-Ruby IV
June 23, 2016

My students sometime get so:

Do you know why?

25-Diamond I
June 23, 2016

A crazy beast.

Obviously the parser tries to feed the sine function with two arguments !?

24-Ruby III
June 23, 2016

Hi,

in Mathcad Prime 3.1 problem is resolved by changing sin(6) to sin(6 rad). Symbolic solver needs to know units.

MH

25-Diamond I
June 23, 2016

MartinHanak wrote:

Hi,

in Mathcad Prime 3.1 problem is resolved by changing sin(6) to sin(6 rad). Symbolic solver needs to know units.

MH

The same is true for Mathcad 15.

But its not the unit which does the trick. For the symbolics rad is unknown and so its treated like a variable. As long as you provide any variable as argument of sine, all is OK.

24-Ruby IV
June 23, 2016

It will be good to move this talk here Mathcad Mad House - Маткадовский дурдом

1-Visitor
June 23, 2016

You are welcome til move the talk.

1-Visitor
June 23, 2016

Several other functions than sine generate similar results:

Capture1.PNG       Capture2.PNG

/Henning

24-Ruby III
June 24, 2016

Hi,

can you send these worksheets to PTC support and request an explanation ?

MH

1-Visitor
June 24, 2016

Hi MH,

Well, I tried but I only have a Basic PTC.com Account and it seems that I have to upgrade to open a case. And to upgrade I need a Customer Number and a Service Contract Number etc. I have requested the necessary information from our IT department.

Do you know any alternative way to contact PTC Support?

/Henning

12-Amethyst
June 25, 2016

Amazing. Not the bug, there are so many, but the thousands of jobs where the bug can set bad calculations. Also amazing the time from the bug appear and the Henning discover. Well, it's engineering, not an exact science. Hope no buildings or aircraft or thermal engines wasn't be affected by this.


Just because with sin(6.0) can get the correct answer, and the general form of diff function in mupad is diff(function, var1, var2, var3, ...) I guess that the bug must to be related with the way in that mathcad handle exact/inexact numbers and the way for transform mupad's diff to mathcad's diff, which (I assume) much more similar to maple's: diff(function, var$n). For example, in mupad diff(f(x,y),x,,x,y) is in mathcad diff(diff(f(x,y),x,2),y). In the steps for making that is where the second arg for sin, ln, log, etc. could be appear.

Best regards.

Alvaro.

24-Ruby IV
June 25, 2016

21-Topaz II
June 26, 2016

Undoubtedly, the reliability of this software is compromised, although I did not ever  encounter (untapped) in such unexpected effects.

FM