I want to prove the following corollary of Hölder's inequality:
$f\in L^p \Longrightarrow \Vert f \Vert_p=\sup_{\{g\::\:\Vert g\Vert _q=1\}}\int fg$
where $\frac{1}{p}+\frac{1}{q}=1$. I have already proved that $\Vert f \Vert_p \geq \sup_{\{g\::\:\Vert g\Vert _q=1\}}\int fg$, using Hölder's inequality when $\Vert g\Vert _q=1$ and then taking the supreme. However, I am having a lot of trouble proving the other inequality. Can someone help me?
Pick $g = sign(f) \times \frac{1}{\|f^{p-1}\|_q} |f|^{p-1}$ where $sign(f)(x) = 1$ if $f(x) > 0$ and $sign(f)(x) = -1$ if $f(x)\leq 0$.
It is straighforward that $\|g\|_q = 1$. Let us now simplify $\int f g$. First, note that $\|f^{p-1}\|_q = \|f\|_p^{p-1}$, and observe that $sign(f) \times f = |f|$. Thus
\begin{align} \int f g = \frac{1}{\|f\|_p^{p-1}} \int |f|^{p} = \|f\|_p \end{align}