$\|f\|_{L^{p}({\bf R}^{n})}=\sup\left\{\left|\int_{{\bf R}^{n}}f(x)g(x)~dx\right|:\|g\|_{L^{q}({\bf R}^{n}~)}\le1\right\}$ Does this following equality hold
\begin{align}
\newcommand{\d}{\mathrm{d}}
\|f\|_{L^{p}({\bf R}^{n})}
=
\sup\bigg\{\bigg|\displaystyle\int_{{\bf R}^{n}}f(x)g(x)\,\d x\bigg|:\|g\|_{L^{q}({\bf R}^{n}~)}\le1\bigg\}\tag{1},
\end{align}
provided the integral $\displaystyle\int_{{\bf R}^{n}}f(x)g(x)\d x$ exists in extended Real numbers and $1\le p\le \infty.$ 
I know how to prove  $\|f\|_{L^{p}({\bf R}^{n})}=\sup\bigg\{\displaystyle\int_{{\bf R}^{n}}\bigg|\,f(x)g(x)\bigg| \,\d x:\|g\|_{L^{q}({\bf R}^{n}~)}\le1\bigg\}$, This one.
Here we don't restrict $f\in L^{p}({\bf R}^{n})$ and $f$ is real-valued.
Is $(1)$ true, in general, or we must give more restrictions?
Any valuable suggestion or command will be appreciated. Thanks for considering request.
 A: An answer for $p \in [1, +
\infty\rangle$ should be straightforward.
For any normed space $X$ holds that $$\|x\| = \sup_{\substack{f \in X^*\\ \|f\| \le 1}} |f(x)|$$
as a consequence of the Hahn-Banach Theorem.
Now, for $p \in [1, +
\infty\rangle$ and $\frac1p + \frac1q$ we have that $L^p(X)^* \cong L^q(X)$ whenever the measure on $X$ is $\sigma$-finite. Furthermore, all bounded linear functionals on $L^p(X)$ are of the form
$$F(f) = \int_X f(x)g(x)\,d\mu(x), \forall f \in L^p(X)$$
for some $g \in L^q(X)$, and we have $\|F\| = \|g\|_{L^q(X)}$.
In particular, for the question you asked:
$$\|f\|_{L^p(\mathbb{R}^n)} = \sup \left\{|F(f)| : F \in L^p(X)^*, \|F\| = 1\right\} = \sup \left\{\left| \int_{\mathbb{R}^n} f(x)g(x)\,dx\right| : g \in L^q(X), \|g\|_{L^q(\mathbb{R}^n)} \le 1\right\}$$
For $p = +\infty$ in general it's $L^\infty(X)^* \ne L^1(X)$ so I'm not sure the claim is true.
A: First assume that $f$ is real-valued a.e. Note that the reasoning for this case is also valid for complex-valued $f$, as one will see in the following.
Assume that $\|f\|_{L^{p}({\bf{R}}^{n})}=\infty$, and we are to prove the corresponding supremum is also infinite.
Let $S_{N}=\{x\in{\bf{R}}^{n}:|x|\leq N,~|f(x)|\leq N\}$ for fixed positive integer $N$. One already had the result that
\begin{align*}
\|f\|_{L^{p}(S_{N})}=\sup\left\{\left|\int_{S_{N}}f(x)g(x)dx\right|: \|g\|_{L^{q}(S_{N})}\leq 1\right\}.
\end{align*}
For any $g$ with $\|g\|_{L^{q}(S_{N})}\leq 1$, one extends $g$ canonically to the whole ${\bf{R}}^{n}$ with $\widetilde{g}(x)=g(x)\chi_{S_{N}}(x)$, one sees that
\begin{align*}
\sup\left\{\left|\int_{S_{N}}f(x)g(x)dx\right|: \|g\|_{L^{q}(S_{N})}\leq 1\right\}\leq\sup\left\{\left|\int_{{\bf{R}}^{n}}f(x)g(x)dx\right|: \|g\|_{L^{q}({\bf{R}}^{n})}\leq 1\right\}.
\end{align*}
Now we make use of the assumption that $|f|<\infty$ a.e. to deduce that $\lim_{N\rightarrow\infty}\|f\|_{L^{p}(S_{N})}=\|f\|_{L^{p}({\bf{R}}^{n})}$. This completes the proof of the first part.
We are ready to prove for the second part, that is, the case for $L:=\{x\in{\bf{R}}^{n}: |f(x)|=\infty\}$ with $|L|>0$ be as an assumption. Pick a ball $B$ with $K:=L\cap B$ such that $0<|K|<\infty$. Consider the $g$ defined by $g=\dfrac{\chi_{K}}{\|\chi_{K}\|_{L^{q}({\bf{R}}^{n})}}$, apparently $\|g\|_{L^{q}({\bf{R}}^{n})}\leq 1$. We observe that 
\begin{align*}
(f\chi_{K})^{+}&=\infty\cdot\chi_{S^{+}\cap B},\\ (f\chi_{K})^{-}&=\infty\cdot\chi_{S^{-}\cap B},
\end{align*}
where $S^{+}=\{x\in{\bf{R}}^{n}: f(x)=\infty\}$, $S^{-}=\{x\in{\bf{R}}^{n}: f(x)=-\infty\}$.
Since we have assumed that 
\begin{align*}
\int_{{\bf{R}}^{n}}f(x)g(x)dx
\end{align*}
exists in the extended real sense, so it cannot be the case that the following integrals are both infinite
\begin{align*}
\int_{{\bf{R}}^{n}}(f\chi_{K})^{+}(x)dx&=\infty\cdot|S^{+}\cap B|,\\
\int_{{\bf{R}}^{n}}(f\chi_{K})^{-}(x)dx&=\infty\cdot|S^{-}\cap B|.
\end{align*}
Say, $|S^{-}\cap B|=0$, then 
\begin{align*}
\left|\int_{{\bf{R}}^{n}}f(x)g(x)dx\right|=|\infty-0|=\infty.
\end{align*}
So the supremum in question is also infinite. This completes the proof of the second part.
Note that if we impose the stronger condition that 
\begin{align*}
\int_{{\bf{R}}^{n}}f(x)g(x)dx
\end{align*}
exists in the real sense instead of the extended real, such an $f$ cannot satisfy $|L|>0$, that is, it must be the case that $f$ is real-valued a.e. Indeed, one can examine the previous reasoning regarding the $S^{+}$ and $S^{-}$, one has both $|S^{+}\cap B|=|S^{-}\cap B|=0$, if not, the integral of $fg$ over ${\bf{R}}^{n}$ is infinite, which contradicts the assumption. Since the balls can be arbitrary large, then $|L|=\lim_{r\rightarrow\infty}|L\cap B_{r}|=0$. 
