![LordMike LordMike](/forum/resource.ashx?u=408) ![](/forum/Images/Ranks/Advanced-Member.png) Rank: Advanced Member Groups: Registered
Joined: 24/10/2009(UTC) Posts: 52 ![Man Man](/forum/Themes/yafvision/male.gif) Location: Denmark
|
Hey, Consider this: ![](http://www.myupload.dk/showfile/r354137581fa.JPG) Shouldn't it at least be able to solve "t+1=0, t" to "t=-1"? It complains with: "No real roots"
|
|
|
|
![Andrey Ivashov Andrey Ivashov](/forum/resource.ashx?u=4) ![](/forum/Images/Ranks/Administration.png) Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 ![Man Man](/forum/Themes/yafvision/male.gif) ![Russian Federation Russian Federation](/forum/Content/images/flags/RU.png) Was thanked: 1978 time(s) in 666 post(s)
|
Please, check if Tools > Options > Calculation > Roots (range) has values range (-20, 20).
|
|
|
|
![LordMike LordMike](/forum/resource.ashx?u=408) ![](/forum/Images/Ranks/Advanced-Member.png) Rank: Advanced Member Groups: Registered
Joined: 24/10/2009(UTC) Posts: 52 ![Man Man](/forum/Themes/yafvision/male.gif) Location: Denmark
|
smath wrote:Please, check if Tools > Options > Calculation > Roots (range) has values range (-20, 20). I tweaked it to -200 to 200... Isn't larger range better (Slower.. But more versatile).. ? (Works now.. :/)
|
|
|
|
![omorr omorr](/forum/resource.ashx?u=274) ![](/forum/Images/Ranks/Administration.png) Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 ![Man Man](/forum/Themes/yafvision/male.gif) ![Serbia Serbia](/forum/Content/images/flags/SP.png) Was thanked: 318 time(s) in 268 post(s)
|
I think there were few posts devoted to "solve" function. Please look at the picture ![](http://smath.info/?file=738892&type=image) A numerical algorithm is behind the scene of "solve". Numerical nonlinear solver is always a "tricky" task. I think there might be some general advice concerning "solve" realized in SMath Studio. 1. Plot the function first and locate the roots. 2. It might be more advisable to use the third and fourth argument (range) were the roots are located 3. It is not advisable to use large ranges. Actually, "solve" might fail in that case. 4. If it fails, then try to locate the roots one by one with an appropriate range search. I am not sure about all of it, but it works. Regards, Radovan EDIT: For polynomials use polyroots. This will give you all the roots (real and complex) of a polynomial (zeros of polynomial equation). Edited by user 03 November 2009 02:23:33(UTC)
| Reason: Not specified |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
![LordMike LordMike](/forum/resource.ashx?u=408) ![](/forum/Images/Ranks/Advanced-Member.png) Rank: Advanced Member Groups: Registered
Joined: 24/10/2009(UTC) Posts: 52 ![Man Man](/forum/Themes/yafvision/male.gif) Location: Denmark
|
I'm not at all sure I understand why roots are relevant for solve.
I know that I will always have to keep my normal calculator by, to solve those SMath can't do. Makes me wonder though, if my calculator can, why can't SMath.. Ofc, it's not coded so, but why not?.. :P
|
|
|
|
![omorr omorr](/forum/resource.ashx?u=274) ![](/forum/Images/Ranks/Administration.png) Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 ![Man Man](/forum/Themes/yafvision/male.gif) ![Serbia Serbia](/forum/Content/images/flags/SP.png) Was thanked: 318 time(s) in 268 post(s)
|
LordMike wrote:I'm not at all sure I understand why roots are relevant for solve. Sorry Mike, did not get your point. LordMike wrote:I know that I will always have to keep my normal calculator by, to solve those SMath can't do. Makes me wonder though, if my calculator can, why can't SMath.. Ofc, it's not coded so, but why not?.. :P It is in principal a one-man project and depends on the author's spare time to work on it (it is not a payed job ). Therefore, it is quite understandable that lots of things in SMath are missing or not working in the way we would like to. I think SMath will be much more powerful if some more people would participate in its development. As I mentioned before, "plugins" might be a driving force in that direction. Regards, Radovan |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
![jas0nuk jas0nuk](/forum/images/noavatar.gif) ![](/forum/Images/Ranks/Member.png) Rank: Member Groups: Registered
Joined: 15/03/2009(UTC) Posts: 12 Location: UK
|
LordMike wrote:I'm not at all sure I understand why roots are relevant for solve.
I know that I will always have to keep my normal calculator by, to solve those SMath can't do. Makes me wonder though, if my calculator can, why can't SMath.. Ofc, it's not coded so, but why not?.. :P Your calculator presumably uses the quadratic formula for quads and Cardano's formula for cubic equations. SMath, on the other hand, uses bruteforce. This has the advantage that it allows roots of any equation to be found by trial and error, but it means only roots within the range can be found. So increasing the range means more roots can be found but might take a few milliseconds longer. I think changing the range to something like -1000 and 1000 would be fine.
|
|
|
|
![Andrey Ivashov Andrey Ivashov](/forum/resource.ashx?u=4) ![](/forum/Images/Ranks/Administration.png) Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 ![Man Man](/forum/Themes/yafvision/male.gif) ![Russian Federation Russian Federation](/forum/Content/images/flags/RU.png) Was thanked: 1978 time(s) in 666 post(s)
|
jas0nuk, you are absolutely right. Thanks.
After the last alpha version release anyone can create a better version of solve function, so, I hope someone will do it (and I'm ready to help). My goal for some time is to create a powerful platform for third-party developers and I'm working on this now.
|
|
|
|
![LordMike LordMike](/forum/resource.ashx?u=408) ![](/forum/Images/Ranks/Advanced-Member.png) Rank: Advanced Member Groups: Registered
Joined: 24/10/2009(UTC) Posts: 52 ![Man Man](/forum/Themes/yafvision/male.gif) Location: Denmark
|
Ok.. Uhm...
If it doesn't find any roots then.. Why not have it ask if it should increase the range?
|
|
|
|
![jakobg jakobg](/forum/images/noavatar.gif) ![](/forum/Images/Ranks/Member.png) Rank: Member Groups: Registered
Joined: 20/03/2009(UTC) Posts: 21 ![Man Man](/forum/Themes/yafvision/male.gif) Location: Vienna, AUSTRIA
|
LordMike wrote:Ok.. Uhm...
If it doesn't find any roots then.. Why not have it ask if it should increase the range? Well I'm not really sure how the solve function is implemented, but for sure it is some kind of Newton scheme to calculate the roots. Thus bigger ranges could introduce some convergence problems (maximum allowed iteration steps, maximum error estimator). Therefore it is not really a "good" solution to increase the range. Much better and often announced is to localize to roots and set a appropriate range. These are ordinary numerical problems and would not show up if the solve function works symbolically (which is not always possible). Jakob
|
|
|
|
![LordMike LordMike](/forum/resource.ashx?u=408) ![](/forum/Images/Ranks/Advanced-Member.png) Rank: Advanced Member Groups: Registered
Joined: 24/10/2009(UTC) Posts: 52 ![Man Man](/forum/Themes/yafvision/male.gif) Location: Denmark
|
I believe it would be solved if it was intrododuced as such:
1. Try current roots range 2a. If failed 2a3. Ask user for permission, try again with larger range
2b. If success 2b3. Success
Then keep going, till result is found or user quits.
|
|
|
|
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.