SMath Studio Forum
»
SMath Studio
»
Samples
»
Solution of equations (find the roots)
Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
SMath Studio supports a built-in function to find the roots of equations. There are two ways to use it. Write your equation on the page of SMath Studio, select the variable of the equation by the mouse or stylus and then press 'Calculation' > 'Solve' menu-item from the main menu.
Write your equation into the first argument of built-in solve() function and a variable of this equation as a second argument. To get the result just press '=' (equal to) button.
Note, that you can define the right part of the equation (using boolean equal from Boolean Panel) or not in both cases above.Edited by user 18 February 2009 05:24:09(UTC)
| Reason: Not specified
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 24/06/2009(UTC) Posts: 2 Location: Germany
|
Hello together,
why does SMath say "x - not defined" to sqrt(x-7)+sqrt(17-x)= ?
I can't even enter the 4 at the end of the expression.
Is there a small tutorial for pupils? Some curve discussion for example.
Regards from Germany
Sascha
|
|
|
|
Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
Hello, Sascha. If you want to specify right part of the equation, you need to use boolean "equal to" operator from Boolean Panal.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 24/06/2009(UTC) Posts: 2 Location: Germany
|
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 08/06/2009(UTC) Posts: 7
|
smath wrote:Hello, Sascha. If you want to specify right part of the equation, you need to use boolean "equal to" operator from Boolean Panal.
ONE SIMPLE EQU SUCH AS: x-20=5 (I have used the Boolean Equ=) calc it, then "NO REAL ROOT found" alert. why?
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
There is a problem with different Regional Settings. If you have Russian Regional settings you will have to use -comma "," for the decimal separator (Although in the Arithmetic palete the tooltip will say "Decimal point" ) -semicolumn ";" for the argument separator For instance res←solve(x-20≡5;x)res=25solve(x*20≡5;x)—1/4solve(x*20≡5;x)=0,25If you use the English Reginal settings you will have to use -point "." for the decimal separator -comma "," for the argument separator (Can not be displayed here with "MATH" BBcode tag) Please take a look at the Arithmetic palete or your Reginal Settings. I do not know what yoy did, actually? By the way, both Reginal settings will solve your simple equation for me in Smath v0.8, but if I want to upload the file with these equation into "Live" SMath mode I've got the same error as you do: "No real roots" but only for the first (simple) equation. The other two "solve" will give the correct result ??? I've been told by the SMath author that some problems are to be resolved with this Settings and the "Live" mode. Here are the pictures: Russian and similar settings English and similar settings "Live" mode on this site Regards, Radovan Edited by user 03 July 2009 00:50:50(UTC)
| Reason: Not specified |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Newbie
Groups: Registered
Joined: 08/06/2009(UTC) Posts: 7
|
thanks your hint for regional setting,
whereas i chage to russian or english and change func type(euro or world), the same result with it:
no real root
IS IT A BUG?
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Have you checked the Roots(range) option? For instance, this will work but this will not (25 is outside the range[-20,20]) By the way, Roots(range) might effect on the results, especially when there are more than one result. It might be a problem where searching the roots of different equations. I suppose this would be changed in the next SMath version. On the other hand, it seems that solve is not a symbolical but only a numerical solver at the moment. Regards, Radovan |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Newbie
Groups: Registered
Joined: 08/06/2009(UTC) Posts: 7
|
Thanks very much,
solve(x-20=5,x) SOLVED OK IF I SET THE OPTION-ROOT RANGE:-100 TO 100
however, i found another BUG perhaps here:
when i set -1000 to 1000, no any msg alert me but the result role back to: no real root
i have tried many times, the root range seems like limited -100 to 100 HARDLY.
|
|
|
|
Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
Hello. omorr wrote:On the other hand, it seems that solve is not a symbolical but only a numerical solver at the moment. It's absolutely true. Solve function includes a simple iteration mechanism. Smfan wrote:the root range seems like limited -100 to 100 HARDLY. No. Iteration algorithm has hardcoded step (with ratio to the range - this means that number of steps - constant), that's why answer will be more accuracy if the range will be smaller. And if range will be tot big, then step can be just too big and it can simply jump across the roots. Edited by user 04 July 2009 01:35:33(UTC)
| Reason: Not specified
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Yes, you are right. Something was wrong here. Even with the range [-101,101] will not work, but with [-100,100] will work. Very strange! I even tried with some simple quadratic and cubic equations. Range [-100,100] will work but [-101,101] will, again, not. On the other hand the range is limited to [-1000,1000] In my opinion, as this is a numerical algorithm, the most useful way is to plot the function and to see which range to use. It is better to use some narrow range in which the roots are present. On the other hand some playng with range migh be needed. As we know, even then the results are not guarantied. Therefore, every solve function must have the possibilitie to change the range searching roots. Regards, Radovan P.S. I did not see the Andrey's answer. We must have writen it at the same time. Edited by user 04 July 2009 00:44:55(UTC)
| Reason: Not specified |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
omorr, thank you for your posts. They has many useful information for the SMath Studio users.
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
You are welcome , considering that I am using it just more than a week. By the way, we had some comments about the range for solve. Is there maybe any possibilitie to put the range as a third parameter in the solve function, or something else? It seems that there is no good solution to put it in the Options dialog box. Of course, it is up to you to decide Regards, Radovan |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
omorr wrote:Is there maybe any possibilitie to put the range as a third parameter in the solve function, or something else? It seems that there is no good solution to put it in the Options dialog box. Of course, it is up to you to decide Good idea! Will be implemented in the release then (in couple of days).
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 08/06/2009(UTC) Posts: 7
|
smath wrote:omorr wrote:Is there maybe any possibilitie to put the range as a third parameter in the solve function, or something else? It seems that there is no good solution to put it in the Options dialog box. Of course, it is up to you to decide Good idea! Will be implemented in the release then (in couple of days). Expected Hottly.
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
smath wrote:omorr wrote:Is there maybe any possibilitie to put the range as a third parameter in the solve function, or something else? It seems that there is no good solution to put it in the Options dialog box. Of course, it is up to you to decide Good idea! Will be implemented in the release then (in couple of days). Thank you Andrey As we know, the problematic equations for root finding could be the equations with small slope at the solutions. Here is a simple example. SMath solved that quite good (look at the error - order of magnitude 1e-17). But, the inconvenience could be if we try to locate the roots by plotting. I am not sure, but the scaling of the 2D plot could not be done separately on x and y axis. I think we can not locate the rots because of simultaneous scaling of both x and y axis. I spent some time trying (moving and scaling) to locate either one of the roots, but with no success. I do not know if I am right? Regards, Radovan |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
Done! Function solve(..) with 4 arguments implemented: And here is SMath Studio 0.82 for tests. If it is stable enough, then this version will be released today in the evening (06 July 2009): Update 07.07.09: TEST LINKS REMOVED (0.82 release will be available soon)Please, test it and post any serious bugs info here, if any... Hope, we could find critical errors before release will be published. Thanks in advance. Best regards, Andrey Ivashov. Edited by user 07 July 2009 19:20:29(UTC)
| Reason: Not specified
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Thank you Andrey for your efforts, I supose that Roots(range) from the Options menu will be used with solve when the third and fourth argument (range) is not present. Very good, thank you. I must be annoying but here are few of my findings. I do not think these are critical errors, but just to be for your attention. Please look at the image: I did the same as last time - moved the regions up. I expected to se empty placeholder at the numerical evaluation of the matrix inverse? This one I've already mentioned on the Private Massage. I hope I made myself understood about it. It might be just confusing and prone to errors. (I did see that I mixed ";" and "," as argument separators - it is Ok, just a typo in the text) I am on my vacation from tomorow and I will not bother you for about two weeks Best Wishes, Radovan |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
Thanks.
First one is rather serious, will fix. It's really hard to make 0.82 release, too many complex code changes...
I wish you all the best in your vacation.
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Thank you, Best wishes to you too Radovan |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
SMath Studio Forum
»
SMath Studio
»
Samples
»
Solution of equations (find the roots)
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.