# supremum of a function with integral

Let $$\mathcal F$$ be the set of continuous functions $$f:[0,1]\to \mathbb R$$ and $$max_{0\le x\le1} |f(x)|=1$$. Now let $$\mathcal I:\mathcal F\to R,\mathcal I(f)=\int_0^1f(x)dx-f(0)+f(1)$$. Firstly I had to show $$\mathcal I(f)<3,\forall f \in \mathcal F$$ and this is pretty easy. Now I have to determine $$\sup({\mathcal I(f)}|f\in \mathcal F)$$. Doesn't result that the supremum is $$3$$ from the statement before? I know that I am surely wrong. Can somebody give me some tips on how can I get the supremum, please?

The fact that $$\mathcal I(f)<3$$ implies that $$\sup\{\mathcal I(f)\mid f\in \mathcal F\}\le3$$. To show that the supremum is equal to $$3$$, you have to find for every $$\epsilon>0$$ a function $$f\in\mathcal F$$ such that $$\mathcal I(f)\ge3-\epsilon$$. This can be done for instance with functions like $$f_\delta(x)=\begin{cases} \dfrac{2}{\delta}\,x-1 & 0\le x\le\delta,\\ 1 & \delta

obvious part is that $$\forall f\in \mathcal F$$

$$|\mathcal I(f) | \leq |\int_0^1f(x)dx|+|f(0)|+|f(1)| \leq 1+1+1\leq 3$$ inequality here is not strict ( $$\leq$$ instead of $$<$$)

Thus, we have shown that $$\sup({\mathcal I(f)}|f\in \mathcal F) \leq 3$$ To prove that it is equal to 3 we need to find a function $$g$$ or a sequence $$g_n$$ of functions in $$\mathcal F$$, such that

$$\mathcal I(g) = 3; \quad or \quad lim_{n \rightarrow \infty} \mathcal I(g_n) = 3$$

(this would prove that $$\sup({\mathcal I(f)}|f\in \mathcal F) \geq 3$$, which would solve the problem)

First thing that comes to mind is the function $$g$$ defined as $$g(t) = 1, \; \forall t \in (0, 1]$$ and $$g(0)=-1$$. Then $$\mathcal I(g)$$ would be equal to 3, but function $$g$$ is not contionious. Only one step is left to complete the solution: approximate $$g$$ with a sequence $$g_n$$ of functions from $$\mathcal F$$ such that $$lim_{n \rightarrow \infty} \mathcal I(g_n) = 3$$