Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


2 Pages12>
Options
Go to last post Go to first unread
Offline janclaeys  
#1 Posted : 16 August 2017 12:45:17(UTC)
janclaeys


Rank: Member

Groups: Registered
Joined: 05/10/2016(UTC)
Posts: 22
Man
Belgium

Was thanked: 2 time(s) in 2 post(s)
Dear all,

I am currently struggling with a basic function extreme problem

NOK.PNG

OK.PNG

NOK.sm (16kb) downloaded 27 time(s).

OK.sm (61kb) downloaded 31 time(s).

edit by mod: names of attachments are swapped, as mentioned below


In the first screenshot, the function derivative definition results in a warning message: "input string was not in a correct format"

In the last screenshot, I removed all parameters values that aren't related to the given formulas (not visible in the screenshot), and I get the right solution?! However, I don't see the root visually in the accompanying graph?


I thought it had something to do with the reservation of parameter "x", but this doesn't seem to be the case...


Thanks in advance for any feedback!

Kind regards from Belgium,

Jan

Edited by moderator 26 August 2017 13:16:56(UTC)  | Reason: added BTS ID

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline mkraska  
#2 Posted : 16 August 2017 13:32:22(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,986
Germany

Was thanked: 1124 time(s) in 721 post(s)
could you please attach the worksheet?
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline janclaeys  
#3 Posted : 16 August 2017 13:46:09(UTC)
janclaeys


Rank: Member

Groups: Registered
Joined: 05/10/2016(UTC)
Posts: 22
Man
Belgium

Was thanked: 2 time(s) in 2 post(s)
Hello Martin,

Thank you for your fast reply, I just added the files...
Offline Jean Giraud  
#4 Posted : 16 August 2017 14:41:19(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: janclaeys Go to Quoted Post
I don't see the root visually in the accompanying graph?

==============================
The root(s) won't appear by magic ! You must instruct the plot.
Click left/right on the 2nd plot ... enable "Display input data"

Welcome to Smath Community, Jean

Maths Golden Ratio jmG.sm (22kb) downloaded 19 time(s).

Offline janclaeys  
#5 Posted : 16 August 2017 14:49:37(UTC)
janclaeys


Rank: Member

Groups: Registered
Joined: 05/10/2016(UTC)
Posts: 22
Man
Belgium

Was thanked: 2 time(s) in 2 post(s)
Hello Jean,

What I meant was that the derivative graph doesn't cross the X-axis at x=3.29, this is where the original function P_c_hor(x) reaches it's maximum.
This is odd, since the root function indicates correctly a root at x=3.29 in the file NOK.sm (I switched the names the smath files, my mistake... ).

So my question remains: why does the solve function doesn't work in both attached files?

Kind regards,

Jan
Offline Jean Giraud  
#6 Posted : 16 August 2017 15:56:42(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: janclaeys Go to Quoted Post
So my question remains: why does the solve function doesn't work in both attached files?

======================================
Hey mon ami ! You have not attached any file .

Click on "Post reply" down the page.
You will see the icon line, click on the paper clip
"Insert an existing Attachment or upload a new file"
Browse for the file in your system, double click on the file name
You can add as many file as you wish [the limit is ~ 5 MB]

Jean


Offline janclaeys  
#7 Posted : 16 August 2017 15:59:23(UTC)
janclaeys


Rank: Member

Groups: Registered
Joined: 05/10/2016(UTC)
Posts: 22
Man
Belgium

Was thanked: 2 time(s) in 2 post(s)
True, I added them afterwards to my first message ;-)
FYI: I switched the names of the files, my mistake...

You'll see what I mean if you compare the files.
I used the last beta version of smath.
Offline Jean Giraud  
#8 Posted : 16 August 2017 18:18:09(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
It could probably be repaired by zapping the entire system.
Wait for Martin to check.
Offline janclaeys  
#9 Posted : 16 August 2017 18:20:48(UTC)
janclaeys


Rank: Member

Groups: Registered
Joined: 05/10/2016(UTC)
Posts: 22
Man
Belgium

Was thanked: 2 time(s) in 2 post(s)
Ok, what do you mean with zapping? Debugging? Re-compiling the source code?
Thanks for your feedback!
Offline Jean Giraud  
#10 Posted : 16 August 2017 19:18:46(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
... as it looks, the derivative as given is not accepted.
The mouse had problem digesting the elephant .
Done from infinitesimal analysis ... OK.

Maybe I open the wrong sheet ?

Jean

OK repaired.sm (64kb) downloaded 18 time(s).
Offline janclaeys  
#11 Posted : 17 August 2017 00:23:05(UTC)
janclaeys


Rank: Member

Groups: Registered
Joined: 05/10/2016(UTC)
Posts: 22
Man
Belgium

Was thanked: 2 time(s) in 2 post(s)
Good evening Jean,

No, you edited the right sheet ;-) (nok is ok and vice versa, I was too fast when I changed the filenames... )

Thank you for the work you put into this, I really appreciate this!
As far as I can see, the problem seems to be (amongst others?) the use of units, since you removed every unit?
I am aware that good old Mathcad (when it still belonged to Mathsoft, PTC made a mess of it...) also struggled with this.

However, it stays unclear why my approach works in sheet "nok.sm" and not in "ok.sm", while it's 100% the same in both cases?!
There seems to be something wrong underneath the smath "boot"?

I will study the sheet more in detail (and put every value into SI) tomorrow at my work, thanks again!

Kind regards,

Jan

p.s. As a BD (bande dessinée) fan, your name reminded me of this legend (aka Moebius) ;-)
https://en.wikipedia.org/wiki/Jean_Giraud

Edited by user 17 August 2017 00:30:35(UTC)  | Reason: Not specified

Offline Jean Giraud  
#12 Posted : 17 August 2017 20:46:41(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: janclaeys Go to Quoted Post
However, it stays unclear why my approach works in sheet "nok.sm" and not in "ok.sm", while it's 100% the same in both cases?!
There seems to be something wrong underneath the smath "boot"?

========================================
Can't explain either. NO unit plots much smaller in magnitude and the function q(x) ends @ 3.5.
Infinitesimal analysis is a Lagrangian method that existed before "Symbolic engines".
Was effective for Excel to manage more advanced maths before Mathcad/Mathsoft... Maple.
It applies to 2nd derivative as well and integral. The 2nd derivative
starts producing noise [world is not perfect]. The Lagrangian methods extend
to point derivatives/integral ... very useful for point capture systems like
in Process Control & Instrumentation where have only values [accumulated values].

In the red, in the attached, I have isolated the Guilty ... Ah !
As it looks, with the unit system those "Guilty" may be smaller, thus less guilty.

Cheers, Jean

OK repaired.sm (145kb) downloaded 16 time(s).

Offline janclaeys  
#13 Posted : 22 August 2017 18:46:57(UTC)
janclaeys


Rank: Member

Groups: Registered
Joined: 05/10/2016(UTC)
Posts: 22
Man
Belgium

Was thanked: 2 time(s) in 2 post(s)
Hello Jean,

I made a revised version of my original document today, based on your remarks. Luckily, I managed to keep the units "on board": by doing so the document is more readable for my colleagues.
Every value is correctly evaluated now: yes!
Thank you for the hint about the infinitesimal derivative, let's hope that SMath's next version will have a flawless standard derivative function, since the actual one doesn't seem to work...

Kind regards,

Jan
Offline Jean Giraud  
#14 Posted : 22 August 2017 21:39:03(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Jan,

Please attach the document ... there may be ways to doctor your derivative ?
In Smath, the derivative is strictly symbolic from the rules. Often, the rules
are chained to deeply + limits in numerical evaluation.
Glad you rescued the unit system. Attach just the working essentials.

Jean
Offline Jean Giraud  
#15 Posted : 23 August 2017 02:21:09(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Jan,

Please attach the document ... there may be ways to doctor your derivative ?
In Smath, the derivative is strictly symbolic from the rules. Often, the rules
are chained to deeply limits in numerical evaluation.
Glad you rescued the unit system. Attach just the working essentials.

Jean

===============================

Here is a good example the derivative operator fails
but rescued from the incremental derivative.

Jean

Maths Special Polylog Application.sm (22kb) downloaded 16 time(s).

Offline janclaeys  
#16 Posted : 23 August 2017 12:39:26(UTC)
janclaeys


Rank: Member

Groups: Registered
Joined: 05/10/2016(UTC)
Posts: 22
Man
Belgium

Was thanked: 2 time(s) in 2 post(s)
Here the resulting file

Solution.sm (104kb) downloaded 15 time(s).
Offline Davide Carpi  
#17 Posted : 23 August 2017 12:56:17(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,647
Man
Italy
Location: Italy

Was thanked: 1329 time(s) in 875 post(s)
Originally Posted by: janclaeys Go to Quoted Post
NOK.sm (16kb) downloaded 27 time(s).

OK.sm (61kb) downloaded 31 time(s).


I can run both the worksheets without errors (both in SS 0.98.6398 and latest beta)
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline janclaeys  
#18 Posted : 23 August 2017 16:05:56(UTC)
janclaeys


Rank: Member

Groups: Registered
Joined: 05/10/2016(UTC)
Posts: 22
Man
Belgium

Was thanked: 2 time(s) in 2 post(s)
Hello Davide,

I run the latest beta (build 6437), and f(2) on the last page of "ok.sm" doesn't result in an answer (the standard smath derivative function doesn't work)? I run Windows 7 Pro.
"nok.sm" does work, the reason for this is unclear because exactly the same formulas are used, however the graph doesn't show the correct shape of the derivative function.

It would be very strange if your configuration would be errorless?
There has to be a program mistake somewhere?

Kind regards,

Jan
Offline Jean Giraud  
#19 Posted : 23 August 2017 16:49:12(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: janclaeys Go to Quoted Post
Here the resulting file

=================================
* no units are used here to facilitate the "solve" command

In the definition of f(x) for the incremental derivative,
the units in num/den do match and f(x) is pure unitless,
just function of "x". The way you have it works fine.
The curiosity is that if we isolate/export the symbolic
expansion of f(x) ... the system fails ... damned puzzling !

Jean

Solution Isolate_Fails.sm (23kb) downloaded 15 time(s).

Offline Davide Carpi  
#20 Posted : 23 August 2017 17:57:54(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,647
Man
Italy
Location: Italy

Was thanked: 1329 time(s) in 875 post(s)
Originally Posted by: janclaeys Go to Quoted Post
It would be very strange if your configuration would be errorless?
There has to be a program mistake somewhere?

It is strange indeed. Can you confirm that the error display on the uploaded file for you (download > open > error is shown; I mean, there were no issues while choosing the file to upload)
I run the same version as your, on Win7 home. It might be something related to some plugin (to check it you can rename your %APPDATA%\smath folder into something different, then you can load a new instance of SS studio and check if something is changed) or might be something else, I'll try to see if I can found a way to replicate it at least find the cause for that error message.

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Users browsing this topic
Guest
2 Pages12>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.