Let the space $C([a,b],\mathbb{R})$ with the metric $d_{∞}$.
a) Prove that the following set $U=(f \in C([a,b],\mathbb{R}) / \int_{a}^{b} f(x) \partial x >0 )$ is open in $C([a,b],\mathbb{R})$
b) Prove that the following set $U=(f \in C([a,b],\mathbb{R}) / \int_{a}^{b} f(x) \partial x \geq 0 )$ is closed in $C([a,b],\mathbb{R})$
My attempt
For a)
Let $f \in U$ some fixed functio. We have to prove that $f$ is an interior point of $U.
Let's take $\epsilon=min_{a\leq x \leq b}\int_{a}^{b} f(x) \partial x >0$, for which $B_{∞}(f,\epsilon) \subset U$. Thus $g\in B_{∞}(f,\epsilon)$, then $d_{∞}(f,g)<\epsilon$. Then for every $x \in [a,b]$, we have $|\int_{a}^{b} f(x) \partial x-\int_{a}^{b} g(x) \partial x| \leq max_{a\leq x \leq b} |\int_{a}^{b} f(x) \partial x-\int_{a}^{b} g(x) \partial x| < min_{a\leq x \leq b}\int_{a}^{b} f(x) \partial x \leq \int_{a}^{b} f(x) \partial x$. Then $|\int_{a}^{b} f(x) \partial x-\int_{a}^{b} g(x) \partial x| < \int_{a}^{b} f(x) \partial x$. That is \int_{a}^{b} g(x) \partial x >0, and this means $g \in U$.
For b)
We have a sequence $(f_{n})_{n \in \mathbb{N}}$ in $C$ with $\lim_{n \rightarrow ∞} f_{n} = f$ with $d_{∞}$. We have to prove that $f \in C$.
By property we have that for every $x \in [a,b]$, $\lim_{n \rightarrow ∞} \int_{a}^{b} f_{n}(x) \partial x = \int_{a}^{b} f(x) \partial x$.
Given that $f_{n} \in C$ for every $n$, we have that $\int_{a}^{b} f_{n}(x) \partial x \geq$ for every $x \in[a,b]$, and that is $\int_{a}^{b} f(x) \partial x \geq$ for every $x \in[a,b]$. Finally, this implies $f \in C$.
To handle both parts together, it is useful to consider the (linear) map $\varphi \colon C[0,1] \rightarrow \mathbb{R}$ given by
$$ \varphi(f) = \int_0^1 f(x) \, dx $$
and show that it is a continuous map. Then $f^{-1}((0,\infty))$ will be open and $f^{-1}([0,\infty))$ will be closed. To see that $\varphi$ is continuous, it is enough to show that it is bounded which follows from
$$ |\varphi(f)| = \left| \int_0^1 f(x) \, dx \right| \leq \int_0^1 |f(x)| \, dx \leq \int_0^1 ||f||_{\infty} = ||f||_{\infty}.$$