Prove that $$M = \left\{ f \in \textit{C}([0,1],\mathbb{R})\ |\ \int_{0}^{1/2}f(t)dt - \int_{1/2}^1f(t)dt = 1\right\} \subset \textit{C}([0,1],\mathbb{R}) $$ is closed. $$$$ By way of contradiction, suppose that M is not closed. So $\forall \{f_k\}_{k \in \mathbb{N}} \subseteq M, \text{such that} f_k \rightarrow f \in \textit{C}([0,1],\mathbb{R}) \wedge f \notin M$.
Now, we have, for that $f \notin M$, $\int_{0}^{1/2}f(t)dt - \int_{1/2}^1f(t)dt \not= 1$, so $$\int_{0}^{1/2}\lim_{n \to \infty} f_n(t)dt - \int_{1/2}^1\lim_{n \to \infty} f_n(t)dt \not= 1 \Rightarrow \lim_{n \to \infty}\left(\int_{0}^{1/2}f_n(t)dt - \int_{1/2}^1f_n(t)dt\right) \not= 1\ \textbf{(1)}$$ but for all naturals numbers we have $\int_{0}^{1/2}f_n(t)dt - \int_{1/2}^1f_n(t)dt = 1$. Reaching the contradiction.
Am i allow in (1) to bring out the limit? This is my only concern. Although, my reasoning is that $n$ does not depend on the integral sign. If its okey, why is that the case?
Continuous functions on compact set are bounded and convergence is uniform, So $|f_n(x)| \leq B$, $\forall x \in [0,1]$ and $n$ and $g(x) = B$ is integrable and hence you can apply dominated convergence theorem to bring limit in and out of integral. Check dominated convergence theorem.
Check: https://en.wikipedia.org/wiki/Dominated_convergence_theorem