Given a function $f: R^d \rightarrow R$, I am trying to figure out under what conditions on the function and the set X we have the following: $$ \inf_{x \in X} f(x) = \frac{1}{\sup_{x \in X} f(x)}. $$
So far taking
$$ f(x) = \begin{cases} 1 & x = 1 \\ -1 & x = -1 \\ \infty &\text{otherwise} \end{cases} $$
is a counter example that I have found, so I think either strict positivity or negativity of a function is a requirement. I think we might also need lower semi continuity but I am not sure. Any ideas?