I am following Luenberger's book "Optimization by Vector Space Methods". The author's solution to Example 2 on Page 124 obviously has utilized the following result on the characteristic of alignment between $L_1[0,1]$ and $L_\infty[0,1]$.
Let $y\in L_1[0,1]$ and $u\in L_\infty[0,1]$. Then
$$\int_0^1 y(t)u(t)dt = \|y\|_{L_1}\cdot \|u\|_{L_\infty}$$
holds iff $u(t) = \text{sgn}(y(t))\cdot M$ for some constant $M$ for a.e.
I am wondering how to prove this result? Thank you!
PS: As pointed out by both answerers, I should add the condition that $y(t)$ can only be zero on a set of measure zero.
This clearly isn't true if $y = 0$ on a set of positive measure since we can set $u$ to be equal to any constant $\le \|u\|_{L^\infty}$ there and it won't affect the value of the integral. Therefore assume $y \ne 0$ a.e.
We have \begin{align} 0 &\le \int_0^1 |y(t)|\big(\|u\|_{L^\infty} - u(t)\operatorname{sgn}(y(t))\big)\,dt \\ &= \|u\|_{L^\infty}\left(\int_0^1 |y(t)|\,dt\right) - \int_0^1 |y(t)|u(t)\operatorname{sgn}(y(t))\,dt \\ &= \|u\|_{L^\infty}\|y\|_{L^1}-\int_0^1 y(t)u(t)\,dt\\ &= 0 \end{align}
so $|y(t)|\big(\|u\|_{L^\infty} - u(t)\operatorname{sgn}(y(t))\big) =0$ a.e. This implies $u(t)\operatorname{sgn}(y(t)) = \|u\|_{L^\infty}$ a.e., or $$u(t) = \|u\|_{L^\infty} \operatorname{sgn}(y(t)) \,\text{ a.e.}$$