Commutation between integrating and taking the minimal eigenvalue Let $S = (f_{ij})_{ij}$ be a $n \times n$ real symmetric matrix, with functions $f_{ij} \in L^1(\mathbb{R}^d,\mathbb{R})$ in it. We define $\left(\int u S \right)_{ij} = \int u S_{ij}$ as the elementwise matrix of integrals. What is a necessary and equivalent condition to
\begin{align*}
      \min \sigma \left( \int u S \right)\leq 0 \text{     for any $u \in L^{\infty}(\mathbb{R}^d,\mathbb{R})$}
 \end{align*}
in terms of $S$ only (without talking about $u$'s) ? Actually it implies
\begin{align*}
\min \sigma(S(x)) \leq 0 \leq \max \sigma(S(x)) \text{ a.e on } \mathbb{R}^d
 \end{align*}
by taking sequences $u_n$ converging to $\delta_x$, but the converse is not true thanks to Frederico's counterexample. This is a question raised in a quantum mechanics problem.
 A: [This is an answer to the first version of the question, which asked if $\min \sigma(S(x)) \leq 0 \leq \max \sigma(S(x)) \text{ a.e on } \mathbb{R}^d$ implies $\min \sigma \left( \int u S \right)\leq 0 \text{     for any $u \in L^{\infty}(\mathbb{R}^d,\mathbb{R})$}$]
I think the answer is no. A counterexample is simpler to construct if you first suppose that the domain is $[0,1]$ rather than $\mathbb{R}^d$; then you can take $S(x) \in \mathbb{R}^{n\times n}$ diagonal, with
$$
S(x)_{ii} = \begin{cases}
-1 & x\in [\frac{i-1}n, \frac{i}n),\\
1 & \text{otherwise}.
\end{cases}
$$
Then, integrating with weight $u(x) \equiv 1$ gives $\int_{[0,1]} S(x)_{ii} = \frac{n-2}n \geq 0$, but each $S(x)$ has an eigenvalue $-1$.
Now one can make a change of variable to transform the domain into $\mathbb{R}$, introducing a weight $u(x)$ in the process. Similarly, one can extend the function to $[0,1]^d$ by making it constant on the last $d-1$ dimensions, and then transform the domain into $\mathbb{R}^d$ with a change of variable.
