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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

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

henningsogaard
1-Newbie

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

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 25

Observation ...

sin.png

MH


Martin Hanák

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

Stuart

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

LucMeekes
23-Emerald III
(To:StuartBruff)

Mathcad 11 is OK (as almost always).

In Mathcad 15 you can see the result switch between:

and

To try this, step your cursor into and out of the result and/or move the equation region.

That is really bad.

Luc

StuartBruff
23-Emerald II
(To:LucMeekes)

LucMeekes wrote:

Mathcad 11 is OK (as almost always).

In Mathcad 15 you can see the result switch between:

and

To try this, step your cursor into and out of the result and/or move the equation region.

That is really bad.

Richard Jackson wrote:

It's a weird bug! If I click in the result it changes to this:

If you read through the mupad files in the Mathcad 15 folder, you can see there are a number of workarounds for parsing issues with MuPad (whilst it was still being produced by SciFace).

Stuart

RichardJ
19-Tanzanite
(To:StuartBruff)

It's a weird bug! If I click in the result there is no multiplication operator between sin(6) and x. If I then click outside the result, it changes to this:

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

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

I think in Mathcad 11 and Maple all is OK:

My students sometime get so:

Do you know why?

Valery Ochkov wrote:

I think in Mathcad 11 and Maple all is OK:

It seems OK in MuPad itself ...

Stuart

A crazy beast.

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

Hi,

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

MH


Martin Hanák

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.

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

You are welcome til move the talk.

Several other functions than sine generate similar results:

Capture1.PNG       Capture2.PNG

/Henning

Hi,

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

MH


Martin Hanák

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

Hi,

I always use web page to create Support Case.

Info: You can find Customer Number and a Service Contract Number (in Contract column) in license file.

MH


Martin Hanák

I hope PTC reads this discussion.

And this

too.

Henning Søgaard wrote:

Several other functions than sine generate similar results:

Capture1.PNG       Capture2.PNG

Yes.  That's consistent with the results I posted earlier (Re: Why is differentation of const. times x giving const. (x)?)

The square root operator is interesting ... I don't know whether Mathcad implements a special square root / root algorithm or uses logs & exponents.  However, exponentiation does seem to be unaffected.

Stuart

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.

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

FM

Top Tags