Let $f: \Bbb R \to \Bbb R$ be a bounded function and let $S \subset \Bbb R$. Suppose that the set $$A=\{x \in S : |f(x)|\leq |\inf_S f|\}$$ is non empty.
Question: Is $\sup_A |f(x)| = |\inf_S f|$?
I was just able to prove that $\sup_A |f(x)|\leq |\inf_S f|$, since $|f(x)|\leq |\inf_S f|$ for all $x \in A$, but I can't get the reverse inequality.
Yes.
If $\inf_S f = \min_S f$ then you also have $\sup_A |f| = \max_A |f| = |\min_S f|$, just by considering a point $x^*\in S$ such that $f(x^*)=\min_S f$.
Otherwise for all $x$ in $S$, you have $f(x) > \inf_S f$. Then for $A$ to be non-empty, you must have $\inf_S f < 0$.
Therefore there exists a negative decreasing sequence $f(x_n)$ converging to $\inf_S f$. It follows that $x_n \in A$ and $|f(x_n)|$ converges to $|\inf_S f|$.
Thus $\sup_A |f| = |\inf_A f|$.