On Wed, 22 May 2024 at 00:23, Ani J <anij...@gmail.com> wrote: > > The polynomial 4x^2 - 9 has rational roots, whereas the output of the print > statement is: [((-2, -1), 1), ((1, 2), 1)] > All intervals here are of length more than 0. > It would be great if in general it is possible that the endpoints of > different intervals are never the same. Because, > in my use case, I would like to use the points between the endpoints of two > consecutive intervals and not inside any > interval to find out the sign of the polynomial. For example., with the > above two intervals (-2,-1), (1,2) , I would use > the points -3,0,3 note that all points are outside the intervals and lie in > particular regions not in the intervals. > I would like to use these points to find out the sign of the polynomial > (4x^2-9) in my use case. It would be great if > the tool itself gives separate intervals.
See the function _find_poly_sign_univariate in https://github.com/sympy/sympy/issues/26177 That function finds points where a univariate polynomial is nonzero that separate all roots. -- Oscar -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAHVvXxQXbbCkQKPDzPCHvp_FHY2WtjPXF_w3Oq7Hd24qU9oZmw%40mail.gmail.com.