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

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline Mroczak  
#1 Posted : 16 October 2018 11:23:51(UTC)
Mroczak

Rank: Newbie

Groups: Registered
Joined: 05/02/2018(UTC)
Posts: 7
Poland

Was thanked: 1 time(s) in 1 post(s)
Hello, please tell me what is wrong with this function?

Solve problem.jpg
Solve problem.sm (3kb) downloaded 24 time(s).

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

Offline PompelmoTell  
#2 Posted : 16 October 2018 12:38:47(UTC)
PompelmoTell


Rank: Advanced Member

Groups: Registered
Joined: 23/12/2011(UTC)
Posts: 319
Man
Italy
Location: italy

Was thanked: 109 time(s) in 93 post(s)
The solution method is numeric and depends on the search limits of the roots. By appropriately setting the limits to the nearest values (Tools->Options->Calculation->Roots (range)-10 + 10), you get the correct result. Downstream of a numerical solution, it is always necessary to proceed to the direct verification of the result (sanity check).

sergio
Offline Mroczak  
#3 Posted : 16 October 2018 12:43:10(UTC)
Mroczak

Rank: Newbie

Groups: Registered
Joined: 05/02/2018(UTC)
Posts: 7
Poland

Was thanked: 1 time(s) in 1 post(s)
Full reinstallation (including deletion of plugins) repaired this problem. But what was exact source?.. I don't know.

Edit:
I was writing post when You answered my problem... Change of the range of roots - this is the correct answer.

But now, there is a question: how to use this range? (cuz I remember that I had to increase it becouse there were no roots in my previous calculations and now I need to decrease it).
How to handle with it if it is defined globally for spreadsheet and not for exact calculation?

Edited by user 16 October 2018 12:48:52(UTC)  | Reason: Not specified

Offline Davide Carpi  
#4 Posted : 16 October 2018 12:57:11(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: Mroczak Go to Quoted Post
How to handle with it if it is defined globally for spreadsheet and not for exact calculation?


Use solve(4) instead of solve(2). The one with 2 arguments it's handly for calculations on the fly, but not reliable for structured calculations.

Edited by user 16 October 2018 12:58:44(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Razonar  
#5 Posted : 16 October 2018 13:08:50(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Originally Posted by: Mroczak Go to Quoted Post
Full reinstallation (including deletion of plugins) repaired this problem. But what was exact source?.. I don't know.


If you put some big range, you get wrong answers, like in this picture

Clipboard02.gif

Originally Posted by: Mroczak Go to Quoted Post

But now, there is a question: how to use this range? (cuz I remember that I had to increase it becouse there were no roots in my previous calculations and now I need to decrease it).
How to handle with it if it is defined globally for spreadsheet and not for exact calculation?


You can't. Solve with default range for search "all" the roots it's just a helper for some easy calculations. If it give the correct answer, good, but if not, there are not to much to do.

For that you must to use the solve with 4 arguments (or other numerical solver), and get the roots one by one.

Clipboard03.gif

Best regards.
Alvaro.
Offline Mroczak  
#6 Posted : 16 October 2018 13:18:02(UTC)
Mroczak

Rank: Newbie

Groups: Registered
Joined: 05/02/2018(UTC)
Posts: 7
Poland

Was thanked: 1 time(s) in 1 post(s)
Thank you for your answers! It helped me a lot.

Mroczak

Edited by moderator 16 October 2018 14:22:46(UTC)  | Reason: Not specified

Offline Jean Giraud  
#7 Posted : 16 October 2018 15:41:28(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: Mroczak Go to Quoted Post
Thank you for your answers! It helped me a lot.


That will help you more.

Solve roots.sm (26kb) downloaded 33 time(s).
Users browsing this topic
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.