How can one test a condition on an expression throughout a range? My true expression is rather complicated, but consider this minimal example:
Is the function $2 - x^2$ positive throughout the range $0<x<1$?
I thought this might work:
Assuming[0<x<1,
Positive[2 - x^2]]
but it just returned Positive[2 - x^2] when the solution I seek is True.
The best I've been able to find is:
Simplify[Sign[2-x^2], 0<x<1]
which might suffice for simple functions, but doesn't for my complicated one (which involves hypergeometric functions).
My function is, incidentally:
1/2 y (Sqrt[(1+2 (-1+y) y)/(-1+y)^2]+(3-6 y) Hypergeometric2F1[-(1/2),1/4,5/4,-(y^2/(-1+y)^2)])
There are lots of ugly hacks, such as trying to FindInstance that the function is ever negative in that range, trying to Solve for the value being $0$, and so on, but I'm sure there's a more elegant solution.
The linked similar problems are very helpful (thanks @Nasser), but they do not work on my real problem:
Reduce[ForAll[y, 0 <= y <= 1 \[Implies] 1/2 y (Sqrt[(1+2 (-1+y) y)/(-1+y)^2]+(3-6 y) Hypergeometric2F1[-(1/2),1/4,5/4,-(y^2/(-1+y)^2)])> 0]]
ClearAll[x] f[x_] := 2 - x^2; Reduce[ForAll[x, 0 < x < 1, f[x] > 0]]gives True. see duplicate question where this is shown. – Nasser Jul 04 '21 at 06:15f[y] = (1/ 2 y (Sqrt[(1 + 2 (-1 + y) y)/(-1 + y)^2] + (3 - 6 y) Hypergeometric2F1[-(1/2), 1/4, 5/4, -(y^2/(-1 + y)^2)])); Minimize[{f[y], 0 <= y <= 1}, y]– cvgmt Jul 04 '21 at 07:33