Question: Let $E$ be a measurable subset of real numbers and $1<p<\infty.$ Let $q$ be the conjugate of $p.$ Suppose that a function $g$ is integrable over $E$ and there is an $M \geq 0$ such that for each simple function $f \in L^p(E),$
$$\left| \int_E g \cdot f \right| \leq M \|f\|_p.$$ Prove that $g \in L^q(E)$ and $\|g\|_q \leq M.$
For this question, I do not know how to relate the integral $\int_E |g|^q$ to $\left| \int_E g\cdot f \right|.$ I tried Holder $$\int_E |g|^q \leq \left(\int_E |g|\right)^q \left( \int_E 1^\frac{1}{p} \right)^p = \left(\int_E |g|\right)^q (m(E))^p$$ but the inequality does not seem to help.
For a given $g\in L(E)$ define the linear functional $$L_g(f):=\int_Egf$$ Then we have $$|L_g(f)|\leqslant \int_E |gf|\leqslant \Big(\int_E g^q\Big)^{1/q}\Big(\int_E |f|^p\Big)^{1/p}=||g||_q\cdot ||f||_p$$ If $g\in L^q(E)$ then this is simply Holder's inequality since also $f\in L^p(E)$, if $||g||_q=+\infty$ the inequality holds trivially. On the other hand by assumption we have $$|L_g(f)|\leqslant M||f||_p$$ for all $f\in S\cap L(E)$ where $S$ is the set of all simple functions. Now by definition of the operator norm we obtain $$\sup_{f\in S\cap L(E) }\frac{|L_g(f)|}{||f||_p}:=||L_g||$$ From the Holder's inequality above it must be the case that $$||L_g||\leqslant||g||_q$$ The other direction is more involved but you can pick $0< \varepsilon< ||g||_q$ such that $$|L_g(f)|\geqslant (||g||_q-\varepsilon)||f||_p\hspace{0.2cm}\text{(One needs to work this out)}$$ Letting $\varepsilon\to 0$ then $||L_g||\geqslant ||g||_q$. All in all we have get $||L_g||=||g||_q$. On the other hand the inequality $|L_g(f)|\leqslant M||f||_p$ implies $$||L_g||\leqslant M$$ Since by definition of operator norm we must have $||g||_q$ is the least upper bound then it must be the case that $||g||_q\leqslant M<+\infty$. Of course this implies that $g\in L^q(E)$.