I'm reading a paper "An extrapolation theorem in the theory of $A_p$ weights", written by J. Garcia-Cuerva.
I want to show the following. Let $1<p<\infty $ and $1<q<p$. Let $\mu$ be a measure on $(X,\mu)$ which is $\sigma$-finite and let $f\in L^p(X)$. Then there is $g\in L^{(p/q)^\prime}(X)$ with $\Vert g \Vert_{L^{(p/q)^\prime}(X)} =1$ such that $$ \Vert f \Vert_{L^p(X)}^q = \Vert |f|^q\Vert_{L^\frac{p}{q}(X)}=\int_X |f|^q g d\mu. $$
Actually, the author's measure is $\mu =wdx$, $X=\mathbb{R}^n$ where $w\in A_{p/q}$.
I tried to use Riesz representation theorem with $l(f)=\Vert f \Vert_{L^\frac{p}{q}(X)}$. But this is not linear functional. How can I verify the above equality?
Set $$g=\left(\frac{|f|^q}{\||f|^q\|^{p/q}}\right)^{\frac{p}q-1}.$$
Observe that $(p/q)' (p/q-1)=p/q$ and check the desired properties.
Actually, $g$ is even unique with this property. This follows from the characterization of extremizers of H\"older's inequality.