Let $p, q$ be positive real numbers that satisfy $\frac{1}{p} + \frac{1}{q} = 1.$
I want to show that, if $\color{magenta}{\mathbf{f \in L^p}}$
$||f||_p = \sup \displaystyle \int f \cdot g$,
where the $\sup$ is taken over all $g$ such that $||g||_q \leq 1$.
$\bf{Attempt:}$
For one inclusion, I have that
$\int f \cdot g \leq |\int f\cdot g| \leq \int |f \cdot g| \, {\color{red}\leq} \, ||f|| \cdot ||g|| \, {\color{blue} \leq } \, ||f||_p$,
where I have highlighted the use of ${\color{red}{\mathrm{Holder}}}$ and the fact that ${\color{blue}{||g|| \leq 1}}$.
How do I show the reverse inclusion?
It is enough to prove that if $\|f\|_{L^p} = 1$, then $\mathcal I(f):=\sup_{\|g\|_{L^q} = 1 } \int fg = 1$. Indeed, if this holds, and $ f\neq 0$, then applying this to $\tilde f := f/\| f\|_{L^p}$ in the general case, we obtain $$ 1 = \sup_{\|g\|_{L^q} = 1 }\int \tilde f g = \| f\|_{L^p}^{-1} \sup_{\|g\|_{L^q} = 1 } \int fg.$$ So without loss of generality, set $\|f\|_{L^p} = 1$. We already know that $\mathcal I(f)\le 1$ by Holder's inequality, so set $g = |f|^{p-1} \operatorname{sgn} f$ as in my earlier comment. Then note that $pq-q=p$, so that $$ \|g\|^q_{L^q} = \int |f|^{pq-q} = \|f\|_{L^p}^p = 1.$$ This implies that $$ \mathcal I(f) \ge \int fg = \int |f|^p = 1.$$
PS - one could take a supremum of the absolute value of the integrals as well (see next comment)
PPS - this is almost a duplicate of Prove that $||f||_p=\sup|\int fg d\mu|$ . In fact, I would say that this is a mildly simpler version of that question.