$\|f\|_{L^{p}}=\sup\left\{\int_{{\bf R}^{n}}|f(x)g(x)|~dx:\|g\|_{L^{q}}\le1\right\}$ 
Show that 
  $$\|f\|_{L^{p}}=\sup\bigg\{\bigg|\int_{{\bf R}^{n}}f(x)g(x)~dx\bigg|:\|g\|_{L^{q}}\le1\bigg\}=\sup\bigg\{\int_{{\bf R}^{n}}|f(x)g(x)|~dx:\|g\|_{L^{q}}\le1\bigg\}$$
  provided that $f\in L^{p}({\bf R}^{n})$ for each $1\le p\le\infty$ and $\frac{1}{p}+\frac{1}{q}=1$

Here is my working :
For each $1\le p\le \infty~$,one has by Hölder's inequality that 
$$\bigg|\int_{{\bf R}^{n}}f(x)g(x)~dx\bigg|\le\int_{{\bf R}^{n}}|f(x)g(x)|~dx\le\|f\|_{L^p}\|g\|_{L^q}$$  
and hence that 
$$\sup\bigg\{\bigg|\int_{{\bf R}^{n}}f(x)g(x)~dx\bigg|:\|g\|_{L^{q}}\le1\bigg\}\le\sup\bigg\{\int_{{\bf R}^{n}}|f(x)g(x)|~dx:\|g\|_{L^{q}}\le1\bigg\}\le \|f\|_{L^{p}}$$
Conversely, we may assume $f\ne0$ a.e. on ${\bf R}^{n}$ otherwise, our result holds easily.Next , we will proceed by discussing three following cases.
Before start , we define $\ sgn(f)=f\cdot|f|^{-1}$ if $f\ne0$ and  $\ sgn(f)=0$ if $f=0 ,$ keep in mind that here $f$ may be complex-valued.
Case i) : Consider$~~p=1$.
Thus $q=\infty$ and take $g=\overline{\ sgn(f)} $ and then $|g|=1$ a.e. on ${{\bf R}^{n}}$, so , $\|g\|_{L^{\infty}}=1$ on ${{\bf R}^{n}}$.
So, 
$$\|f\|_{L^{1}}=\int_{{\bf R}^{n}}|f(x)|~dx=\int_{{\bf R}^{n}}f(x)g(x)~dx$$
Therefore ,
$$\|f\|_{L^{1}}\le \sup\bigg\{\bigg|\int_{{\bf R}^{n}}f(x)g(x)~dx\bigg|:\|g\|_{L^{\infty}}\le1\bigg\}\le\sup\bigg\{\int_{{\bf R}^{n}}|f(x)g(x)|~dx:\|g\|_{L^{\infty}}\le1\bigg\}.$$
Case ii) : Consider $1<p<\infty.$ 
Observe that $$fh=f\cdot|f|^{p-1}\overline{\ sgn(f)}=|f|^{p}=|h|^{q}$$
,where $h = |f|^{p-1}\overline{\ sgn(f)}$ and $\frac{1}{p}+\frac{1}{q}=1.$
But then , $h\in L^{q}$ and obtain $\|h\|_{L^{q}}=\|f\|_{L^{p}}^{\frac{p}{q}}~.$ 
Let $g=h/\|h\|_{L^{q}}$ so that $\|g\|_{L^{q}}=1$ and we have 
$$\int_{{\bf R}^{n}}f(x)g(x)~dx=\int_{{\bf R}^{n}}|f(x)g(x)|~dx=\int_{{\bf R}^{n}} \frac{|f(x)h(x)|}{\|f\|_{L^{p}}^{p/q}}=\frac{\|f\|_{L^{p}}^{p}}{\|f\|_{L^{p}}^{p/q}}=\|f\|_{L^{p}}$$
Therefore, 
$$\|f\|_{L^{p}}\le\sup\bigg\{\bigg|\int_{{\bf R}^{n}}f(x)g(x)~dx\bigg|:\|g\|_{L^{q}}\le1\bigg\}\le\sup\bigg\{\int_{{\bf R}^{n}}|f(x)g(x)|~dx:\|g\|_{L^{q}}\le1\bigg\}$$
Case iii) : Consider $p=\infty$
For every $k\in {\mathbb{N_{>0}}}$ , define $E_{k}=\bigg\{x\in {{\bf R}^{n}} : |f(x)|>\|f\|_{L^{\infty}}-\frac{1}{k}\bigg\}$ . Then each $|E_{k}|>0$ since by the very definition of essential supremum $\|f\|_{L^{\infty}}~.$
Furthermore, for every $k\in\mathbb{N_{>0}}$ we let $g_{k}=\frac{1}{|A_{k}~|}\chi_{A_{k}}\overline{\ sgn(f)}$, where $A_{k}$ is measurable subset of $E_{k}$ such that $0<|A_{k}|<\infty$.The existence of $|A_{k}|$
 assures by $A_{k}=E_{k}\cap B(0,R)$ for some sufficiently large $R>0$.
Then 
$$\|g_{k}\|_{L^{1}}=\int_{{\bf R}^{n}}|g_{k}(x)|~dx=\int_{A_{k}}\frac{1}{|A_{k}|} ~dx=1$$
and 
$$\int_{{\bf R}^{n}}|f(x)g_{k}(x)|~dx=\int_{{\bf R}^{n}}|f(x)||\frac{|\chi_{A_{k}}(x)\overline{\ sgn(f(x))}|}{|A_{k}|}dx=\int_{A_{k}}\frac{|f(x)|}{|A_{k}|}dx\le\|f\|_{L^{\infty}}<\infty.$$
Therefore, for each $k\in\mathbb{N_{>0}}$ , we have 
\begin{align}
\bigg|\int_{{\bf R}^{n}}f(x)g_{k}(x)~dx~\bigg|&\ge\int_{{\bf R}^{n}}f(x)g_{k}(x)~dx\\
&=\int_{{\bf R}^{n}}\frac{f(x)}{|A_{k}|}\chi_{A_{k}}(x)\overline{\ sgn(f(x))}~dx\\
&=\int_{A_{k}}\frac{|f(x)|}{|A_{k}|}~dx\\
&\ge\|f\|_{L^{\infty}}-\frac{1}{k}
\end{align}
Consequently,
$$\sup\bigg\{\int_{{\bf R}^{n}}|f(x)g(x)|~dx:\|g\|_{L^{1}}\le1\bigg\}\ge\sup\bigg\{\bigg|\int_{{\bf R}^{n}}f(x)g(x)~dx\bigg|:\|g\|_{L^{1}}\le1\bigg\}\ge \|f\|_{L^{\infty}}-\frac{1}{k}$$
Whence , our conclusion follows if we take $k\longrightarrow \infty.$
If you have the time , please checking the proof for validity, or , just ignore it that is okay. Any valuable suggestion will be appreciated . Thanks for your patiently reading and considering my request.
 A: Yes, it goes through. Actually, whether or not $f\in L^{p}({\bf{R}}^{n})$, we still have 
\begin{align*}
\|f\|_{L^{p}({\bf{R}}^{n})}=\sup\left\{\int_{{\bf{R}}^{n}}|f(x)g(x)|dx: \|g\|_{L^{q}({\bf{R}}^{n})}\leq 1\right\},
\end{align*}
in the sense of $\infty$ both sides if such a case $f\notin L^{p}({\bf{R}}^{n})$ happens. Of course, one cannot write $\displaystyle\int_{{\bf{R}}^{n}}f(x)g(x)dx$ because this integral does not necessarily exist even in the extended real sense.
Indeed, for $S_{N}=\{x: |x|\leq N, |f(x)|\leq N\}$, $N=1,2,...$, one can check the idea of your proof that the ambient space ${\bf{R}}^{n}$ is not crucial, so it is still valid that
\begin{align*}
\|f\|_{L^{p}(S_{N})}&=\sup\left\{\int_{S_{N}}|f(x)g(x)|dx: \|g\|_{L^{q}(S_{N})}\leq 1\right\}.
\end{align*}
For all $g\in L^{q}(S_{N})$ such that $\|g\|_{L^{q}(S_{N})}\leq 1$, extends $g$ canonically to the whole ${\bf{R}}^{n}$ by $\widetilde{g}(x)=g(x)\chi_{S_{N}}(x)$, we have $\|\widetilde{g}\|_{L^{q}({\bf{R}}^{n})}\leq 1$ and 
\begin{align*}
\int_{S_{N}}|f(x)g(x)|dx=\int_{{\bf{R}}^{n}}|f(x)\widetilde{g}(x)|dx,
\end{align*}
so the former supremum is actually controlled by
\begin{align*}
\sup\left\{\int_{{\bf{R}}^{n}}|f(x)g(x)|dx: \|g\|_{L^{q}({\bf{R}}^{n})}\leq 1\right\},
\end{align*}
by taking $N\rightarrow\infty$ (here I assume that $f$ is a.e. finite, if not, a standard technique still can yield the very result), we get the desired result. Note that we really have $\|f\|_{L^{\infty}({\bf{R}}^{n})}=\lim_{N\rightarrow\infty}\|f\|_{L^{\infty}(S_{N})}$.
