let $C[0,1]$ be the set of continuous functions $f:[0,1]\rightarrow\mathbb R$
and let $A\subset C[0,1]$ be the sub set of twice differentiable functions in $C[0,1]$ which satisfies: $\forall f\in A\space f(0)=f'(0)=1\space,\space \sup_{x\in [0,1]}|f''(x)|\leq 2$.
prove that for the functional $a:C[0,1]\rightarrow \mathbb R\space :\space a(f)=f(1/2)-\int_0^1f(x)dx$ exists $f_1,f_2\in \bar A$(aka the closure of $A$) such that $a(f_1)=\min_{f\in\bar A} a(f)$ and $a(f_2)=\max_{f\in\bar A} a(f)$
Let $A \in \mathcal{C}\big( [0,1] \big)$ be the subset defined by :
$$ A = \left\{ f \in \mathcal{C}^{2}\big( [0,1] \big), \; f(0)=f'(0)=1 \quad \mathrm{and} \quad \Vert f'' \Vert_{\infty} \leq 2 \right\}$$
where $\Vert \cdot \Vert_{\infty}$ denotes the norm on $\mathcal{C}\big( [0,1] \big)$ defined by : $\displaystyle \forall f \in \mathcal{C}\big( [0,1] \big), \; \Vert f \Vert_{\infty} = \sup \limits_{x \in [0,1]} \vert f(x) \vert$.
The idea here is that a continuous real-valued functional defined on a compact space is bounded and attains its bounds. So, we need to prove that :
For the first point, note that $a$ is linear. Moreover, for all $f \in \mathcal{C}\big( [0,1] \big)$,
$$\begin{align*} \vert a(f) \vert &= {} \Bigg\vert f\bigg(\frac{1}{2}\bigg) - \int_{0}^{1} f(t) \, \mathrm{d}t \Bigg\vert \\[2mm] &\leq \Bigg\vert f\bigg(\frac{1}{2} \bigg) \Bigg\vert + \int_{0}^{1} \vert f(t) \vert \, \mathrm{d}t \\[2mm] &\leq 2 \Vert f \Vert_{\infty} \end{align*} $$
So $a$ is continuous on $\mathcal{C}\big( [0,1] \big)$ and therefore on $\overline{A}$.
For the second point, the idea is to use the Arzelà-Ascoli theorem :
Let's prove that $A$ is equicontinuous. Using Taylor's theorem, for all $f$ in $A$, we can write :
$$ \forall x \in [0,1], \, f'(x) = f'(0) + \int_{0}^{x} f''(s) \, \mathrm{d}s = 1 + \int_{0}^{x} f''(s) \, \mathrm{d}s $$
Therefore, for all $f$ in $A$ : $\displaystyle \forall x \in [0,1], \, \vert f'(x) \vert \leq 1+x\Vert f'' \Vert_{\infty} \leq 3$. As a consequence, all the functions in $A$ are Lipschitz continuous with a Lipschitz constant $\leq 3$. It proves that $A$ is equicontinuous at each point.
$A$ is also bounded because for all $f$ in $A$, we have :
$$ \forall x \in [0,1], \, f(x) = f(0) + \int_{0}^{x} f'(s) \, \mathrm{d}s = 1 + \int_{0}^{x} f'(s) \, \mathrm{d}s $$
It follows that : $\displaystyle \forall f \in A, \, \Vert f \Vert_{\infty} \leq 4$. As a consequence : $A$ is bounded.
It follows from Arzelà-Ascoli theorem that the closure $\overline{A}$ of $A$ in $\mathcal{C}\big( [0,1] \big)$ is compact. The functional $a$ being continuous on the compact $\overline{A}$, it attains its bounds on $\overline{A}$, which means that there exists $(f_{1},f_{2}) \in \overline{A}^{2}$ such that :
$$ a(f_{1}) = \max \limits_{f \in \overline{A}} a(f) \quad \mathrm{and} \quad a(f_{2}) = \min \limits_{f \in \overline{A}} a(f) $$