I bet I know why : we can trick mathematical sofware in various ways,...,but why should we ? find_root is "numerical" function to get approximate real root of function in interval....when we know ( "theorically") the root exists !! the function can be implemented in various ways, and for example, if using a Newton tangent algorithm, it needs only the function to be continuous and with derivative, to get, in finite steps, a better approximate as the one given
In http://www.sagemath.org/doc/reference/numerical/sage/numerical/optimize.html the help doc gives xtol=1.e-12 (default) and the algorithm terminated when new approximate x_n is in range [pi/2 - xtol, pi/2 + xtol] for your function For me, "find_root_approximate" would have been better name than find_root On Sunday, 3 May 2015 00:50:55 UTC+2, Paul Royik wrote: > > Don't know why but find_root(x*tan(x), -1, 5) gives me 1.570796 which is > incorrect, since it is pi/2, the value at which tangent doesn't exist. > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
