I would like to test whether a function is positive over a given interval. Say I have f[x_] = -x^3 + x^2 + 7*x
and wanted to know whether it is positive for all x
in the interval [0,4]
?
It can easily seen by plotting the function that it is not, but I would like to have a more formal test in the form of "TrueForAll[f[x] > 0, {x,0,4}]
".
It is probably a trivial problem, but I haven't managed to figure it out myself. So I am grateful for any advice.
Reduce[ForAll[x, 0 <= x <= 4 \[Implies] -x^3 + x^2 + 7*x > 0]]
? (OrFullSimplify
instead ofReduce
.) $\endgroup$Implies
here:Reduce[ForAll[x, x <= 0 <= 4, f[x] > 0]]
$\endgroup$ForAll
.... $\endgroup$