There are two functions for polynomials with coefficients in RingQQ()
:
HasRealRoot3(f)
tests quickly and heuristically whether f
has real roots; a return result of uncertain3
means f
may or may not have real roots
RealRadical(f)
computes a multiple of the real radical of f
The function HasRealRoot3
is reliable for univariate polynomials.
Implementation is relatively straightforward.
It is a shame that RealRadical
has to use factorization; is there a better way?
Perhaps better heuristics for the multivariate case can be added: maybe test whether the multivariate can be mapped down to univariate with real roots (by setting all-but-1 indets to -1, 0 or +1)?