# A problem of maximization in Banach spaces

Let $X$ be a Banach space and $K\subset X$ compact. Let $C(K)$ be the set of continuous function in $K$ and $\mu\in (C(K))^\star$ a non-negative measure.

Assume that $f:K\to X^\star$ is a continuous function and $C(K;X)$ the space of continuous functions $k: K\to X$. We have that $$\sup_{k\in C(K;X),\ \|k\|\leq 1}\langle \mu,\langle f(\cdot),k(\cdot)\rangle \rangle\leq\int_K\|f(t)\|d\mu \tag{1}$$

Now I want to prove that

$$\sup_{k\in C(K;X),\ \|k\|\leq 1}\langle \mu,\langle f(\cdot),k(\cdot)\rangle \rangle=\int_K\|f(t)\|d\mu \tag{2}$$

To prove $(2)$, I am trying the following argument: Given $\delta>0$, for each $t\in K$, there exist $k_\delta(t)$, with $\|k_\delta(t)\|\leq 1$, such that $$|\|f(t)\|-\langle f(t),k_\delta(t)\rangle|<\delta\tag{3}$$

Now to finish my argument, I would like to show that it is possible to choose $k_\delta$ in such a way that $k_\delta$ is continuous.

Question: Is my argument good? Can I finish it? Or someone know a better argument?

Remark 1: If anyone knows a better title, please feel free to change it.

Update: I whink I have a answer, I will post here, please verify if it is correct.

Fix $t\in K$ and for $\delta_1>0$ choose $k: K\to X$ continuous such that $(3)$ is valid ofr $t$ and $\delta_1$. Note that $$|\|f(s)\|-\langle f(s), k(s)\rangle |\leq |\|f(s)\|-\|f(t)\| +|\|f(t)\|-\langle f(t),k(t)\rangle |+ \\ +|\langle f(t),k(t)\rangle - \langle f(s), k(s)\rangle \tag{4}|$$

Because $f$ is continuous, we can take a small ball $B$ centered in $t$ such that $(4)$ implies $$|\|f(s)\|-\langle f(s), k(s)\rangle |\leq 3\delta_1,\ \forall\ s\in B\tag{5}$$

Now we do this this for all $t\in K$, to obtain a open cover of $K$. We choose a finite open cover $B_1,...,B_n$ and we associate to those finite open cover a parition of unity $\varphi_1,...,\varphi_n$.

Define $k_\delta (t)=\sum_{i=1}^n \varphi_i(t)k_i(t)$. Note that $$|\|f(t)\|-\langle f(t),\sum_{i=1}^n \varphi_i(t)k_i(t)\rangle|\leq \sum _{i=1}^n \varphi_i(t)|\|f(t)\|-\langle f(t),k_i(t)\rangle|\leq 3\delta_1$$

To conclude, we take $\delta_1=\delta/3$.

-