As you suggest, let me consider the case $f \equiv 1$. Without loss of generality, assume also that $a = 0$ and $b = 1$. Let $\sigma := o(1)/o(0) \in (0,1)$. The problem becomes $$ \inf_{v \in C^1([0,1])} \int_0^1 v(x) \mathrm{d}x \quad \text{s.t.} \quad v(0)\leq \sigma v(1) \quad \text{and} \quad \sigma \leq v(x) \leq 1. $$$$ \sup_{v \in C^1([0,1])} \int_0^1 v(x) \mathrm{d}x \quad \text{s.t.} \quad v(0)\leq \sigma v(1) \quad \text{and} \quad \sigma \leq v(x) \leq 1. $$ First, note that I changed the minimummaximum to an infimuma supremum, since it is not clear a priori that the infimumsupremum will be achieved (it will turn out not to be the case). Second, note that the function $o(x)$ has disappeared from the problem, only remaining through the single real value $\sigma \in (0,1)$.
Since $v(x) \geq \sigma$$v(x) \leq 1$ on $[0,1]$, one has $\int_0^1 v \geq \sigma$$\int_0^1 v \leq 1$ for any admissible $v \in C^1([0,1])$. Let us check that $\sigma$$1$ is the value of the infimumsupremum, but that it is not achieved.
- If $v \in C^1([0,1])$ is such that $v(x) \geq \sigma$$v(x) \leq 1$ on $[0,1]$ and $\int_0^1 v = \sigma$$\int_0^1 v = 1$, then $v \equiv \sigma$$v \equiv 1$. But the constraint $v(0) \leq \sigma v(1)$ becomes $\sigma \leq \sigma^2$$1 \leq \sigma$, which fails because $\sigma \in (0,1)$. So the infimumsupremum cannot be achieved.
- For $n \in \mathbb{N}^*$, let $v_n(x) := \sigma$$v_n(x) := 1$ for $x \in [0,1-1/n]$$x \in [1/n,1]$ and $v_n(x) := \sigma+ (1-\sigma)n^2(x-(1-1/n))^2$$v_n(x) := 1 + (\sigma-1)n^2(x-1/n)^2$ for $x \in [1-1/n,1]$$x \in [0,1/n]$. Then $v_n \in C^1([0,1])$ because the junction at $x=1-1/n$$x=1/n$ is $C^1$, $\sigma \leq v_n \leq 1$ on $[0,1]$, and $\sigma = v(0) \leq \sigma v(1) = \sigma$ because $v(1) = 1$. Moreover, one checks that $\int_0^1 v_n \leq \sigma + 1/n$$\int_0^1 v_n \geq 1 - 1/n$. So the infimumsupremum is indeed equal to $\sigma$$1$.