roots() bug with a simple linear system of equations

roots() bug with a simple linear system of equations - roots() returns "not real roots" - Messages

#1 Posted: 6/23/2013 9:15:46 PM
Diego Jarrín

Diego Jarrín

7 likes in 14 posts.

Group: User

Trying to solve a simple linear system of equations (2 equations) using the roots() function gave me the error message "No real roots", but changing the order of the elements of one of the equations, solved it.
roots() rare behavior

I know this is not so important, but it was interesting to see how SMath`s functions behaves.
Ecuadorian Electronic engineer and MBA student at Salesian Polytechnic University.
2 users liked this post
Davide Carpi 6/24/2013 5:52:00 AM, ioan92 6/24/2013 4:24:00 AM
#2 Posted: 6/24/2013 1:28:09 AM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Confirmed,

It seems some bug is here.

FindRoot() from Nonlinear Solvers plugin will work well here


[MATH=eng]FindRoot(mat(A+B-108,2*A-3*B-156,2,1),mat(A≡0,B≡0,2,1))=mat(96,12,2,1)[/MATH]

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
2 users liked this post
Davide Carpi 6/24/2013 5:52:00 AM, ioan92 6/24/2013 4:24:00 AM
#3 Posted: 6/25/2013 4:06:19 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Symbolic optimization fails to recognize the difference of the equivalent expresions to zero in one step. If the result is taken and again symbolically optimized, then zero is identified. Perhaps an internal workaround for such problems could be to repeatedly apply symbolic optimization until there are no more changes.
roots.sm (17 KiB) downloaded 90 time(s).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
3 users liked this post
Radovan Omorjan 6/25/2013 7:28:00 AM, Davide Carpi 6/25/2013 8:07:00 AM, ioan92 6/29/2013 7:44:00 AM
  • New Posts New Posts
  • No New Posts No New Posts