Duality of $L^p$ spaces Let $p,q\in(1,\infty)$ be such that $1/p+1/q=1$ and let $(\Omega, \mathcal A,\mu)$ be a $\sigma$-finite measure space.

Claim: The map $$\phi:L^q(\Omega)\to \left(L^p(\Omega) \right)^*,\quad \phi(g)(f)=\int_\Omega fgd\mu$$ is an isometric isomorphism.

Proving that $\phi$ is well-defined, linear and continuous was not too difficult. I also proved that $\|\phi(g)\|_{(L^p)^*}\leq \|g\|_{L^q}$ holds, but failed at showing the reverse inequality. This leads me to
Question 1: What would be a function $f\in L^p(\Omega)$ with $$\int_{\Omega} fgd\mu=\|g\|_{L^q}\quad ?$$
To prove that $\phi$ is an isomorphism, it suffices to prove that it is bijective. I can prove injectivity but not surjectivity, hence
Question 2: Why is $\phi$ surjective?

Let $f(x)=0$ when $g(x)=0.$ Let $f(x)=|g(x)|^{q-2}\cdot \overline {g(x)}$ when $g(x)\ne 0.$ Since $|f(x)|=|g(x)|^{q-1}$ and $p(q-1)=q,$ we have $|f(x)|^p=|g(x)|^q$ and $f(x) g(x)=|g(x)|^q.$
We have $\psi (g)(f)=\|g\|^q_q$  and $\|f\|_p=\|g\|_q^{q/p}=\|g\|_q^{q-1}$.  So $$ \psi (g)(f)=\|g\|_q^q=\|g\|_q\cdot \|g\|_q^{q-1}=\|g\|_q\cdot \|f\|_p.$$ And $g\ne 0\implies f\ne 0.$
When $g\geq 0$ we can simply write $f=g^{q-1}.$
