$L^{p}$ norm in terms of dense subsets Let's look at the equality 
$\|f\|_{L^{p}({\bf{R}}^{n})}=\sup\left\{\displaystyle\int_{{\bf{R}}^{n}}\left|f(x)g(x)\right|dx: \|g\|_{L^{q}({\bf{R}}^{n})}\leq 1, g\in C_{0}^{\infty}({\bf{R}}^{n})\right\}$
for $1\leq p\leq\infty$ and $q$ is the conjugate for $p$, that is, $\dfrac{1}{p}+\dfrac{1}{q}=1$. Of course, this equality is true whenever $f\in L^{p}({\bf{R}}^{n})$. And I wonder if this is true for $f\notin L^{p}({\bf{R}}^{n})$ especially for the case that $f$ is NOT real-valued function almost everywhere, that is, what if $f$ attains the value $\infty$ on a certain subset of ${\bf{R}}^{n}$ which is not of measure zero?
One of a theorems in the book of N. Dinculeanu, Integration on Locally Compact Spaces suggests that the above equality holds. What if we change $C_{0}^{\infty}({\bf{R}}^{n})$ to another dense subset of $L^{p}({\bf{R}}^{n})$? Here, we are interested in dealing with the case $f\notin L^{p}({\bf{R}}^{n})$ only.
Of course, throughout this discussion, we assume that $f$ is an extended real-valued measurable function on ${\bf{R}}^{n}$, and we use the conventional operation that $0\cdot\infty=\infty\cdot 0=0\cdot-\infty=-\infty\cdot 0=0$.
And I wonder what if we are dealing with 
$\|f\|_{L^{p}({\bf{R}}^{n})}=\sup\left\{\left|\displaystyle\int_{{\bf{R}}^{n}}f(x)g(x)dx\right|: \|g\|_{L^{q}({\bf{R}}^{n})}\leq 1, g\in C_{0}^{\infty}({\bf{R}}^{n})\right\}$ for $f\notin L^{p}({\bf{R}}^{n})$? To be precise, since $f\notin L^{p}({\bf{R}}^{n})$, it does not always make sense to write $\displaystyle\int_{{\bf{R}}^{n}}f(x)g(x)dx$ for $g\in C_{0}^{\infty}({\bf{R}}^{n})$, so the indicated supremum runs through for all $\displaystyle\int_{{\bf{R}}^{n}}f(x)g(x)dx$ whenever it exists.
 A: Here I found a partial answer to my question. First of all, I would like to quote the following theorem from the book of Gerd Grubb, Distributions and Operators: 
(Page 22)
Theorem 2.13. Let $M$ be a subset of ${\bf{R}}^{n}$, let $\epsilon>0$, and set $M_{k\epsilon}=\overline{M}+\underline{B}(0,k\epsilon)$ for $k>0$. There exists a function $\eta\in C^{\infty}({\bf{R}}^{n})$ which is $1$ on $M_{\epsilon}$ and is supported in $M_{3\epsilon}$, and which satisfies $0\leq\eta(x)\leq 1$ for all $x\in{\bf{R}}^{n}$.
So, if we are dealing with non-almost everywhere finite function $f$, let $F=\{x\in{\bf{R}}^{n}: |f(x)|=\infty\}$ and assume that $|F|>0$, so some $n_{0}\in{\bf{N}}^{n}$ is such that $E=F\cap[-n_{0},n_{0}]^{n}$, $|E|>0$, so the $g$ is chosen such that having compact support in $E_{3}$ and which is $1$ on $E_{1}$, hence $\displaystyle\int_{{\bf{R}}^{n}}|f(x)g(x)|dx\geq\displaystyle\int_{F}|f(x)|\cdot1dx=\infty$. 
With the same virtue, if $f$ is almost everywhere finite, for each $N$, let $E_{N}=\{x\in{\bf{R}}^{n}: |f(x)|\leq N\}$ and $g_{N}\in C_{0}^{\infty}({\bf{R}}^{n})$ such that $g_{N}=1$ on $E_{N}$, then $\displaystyle\int_{{\bf{R}}^{n}}|f(x)g(x)|dx\geq\displaystyle\int_{E_{N}}|f(x)|dx$, taking $N\rightarrow\infty$, the result follows.
A: Now, if we denote $M_{1}=\sup\left\{\left|\displaystyle\int_{{\bf{R}}^{n}}f(x)g(x)dx\right|: \|g\|_{L^{q}({\bf{R}}^{n})}\leq 1, g\in C_{0}^{\infty}({\bf{R}}^{n})\right\}$ to be the supremum taken for all the integrals exist as finite, still, we could have $M_{1}<\infty$ and $\|f\|_{L^{p}({\bf{R}}^{n})}=\infty$. Consider the function $f=\infty$ everywhere, then for such $g\in C_{0}^{\infty}({\bf{R}}^{n})$ with $\displaystyle\int_{{\bf{R}}^{n}}f(x)g(x)dx$ exists, one must have $g=0$ almost everywhere, so $M_{1}=0$.
One may loose the condition from integrable into semi-integrable, that is, either $\displaystyle\int_{{\bf{R}}^{n}}(fg)^{+}(x)dx$ or $\displaystyle\int_{{\bf{R}}^{n}}(fg)^{-}(x)dx$ exists as finite, still, it fails to hold. Indeed, assume that $\displaystyle\int_{{\bf{R}}^{n}}(fg)^{+}(x)dx$ exists as finite, where we let $f=\infty$ on $[0,\infty)\times{\bf{R}}^{n-1}$ and $f=-\infty$ on $(-\infty,0)\times{\bf{R}}^{n-1}$, as both $\displaystyle\int_{[0,\infty)\times{\bf{R}}^{n-1}}(fg)^{+}(x)dx$ and $\displaystyle\int_{(-\infty,0)\times{\bf{R}}^{n-1}}(fg)^{+}(x)dx$ are finite, one may check that their integrals are zero as well.
A: Now we claim that $\|f\|_{L^{p}({\bf{R}}^{n})}=M:=\sup\left\{\left|\displaystyle\int_{{\bf{R}}^{n}}f(x)g(x)dx\right|: \|g\|_{L^{q}({\bf{R}}^{n})}\leq 1, g\in X\right\}$ holds for every dense subset $X$ of $L^{q}({\bf{R}}^{n})$. We assume that $\|f\|_{L^{p}({\bf{R}}^{n})}=\infty$. Using the result just obtained, choose a sequence $(g_{N})$ of $C_{0}^{\infty}({\bf{R}}^{n})$ functions such that $\displaystyle\int_{{\bf{R}}^{n}}|f(x)g_{N}(x)|dx>N$ for each $N=1,2,...$ Since $g_{N}$ belongs to $L^{q}({\bf{R}}^{n})$, choose some sequence $(h_{k,N})$ of functions belong to $X$ such that $h_{k,N}$ converges pointwise almost everywhere to $g_{N}$ (this is a consequence of $L^{q}$ convergent implies almost everywhere pointwise convergent for some subsequence). By Fatou's Lemma, we have $N<\displaystyle\int_{{\bf{R}}^{n}}|f(x)g_{N}(x)|dx=\displaystyle\int_{{\bf{R}}^{n}}\lim_{k}|f(x)h_{k,N}(x)|dx\leq\liminf_{k}\displaystyle\int_{{\bf{R}}^{n}}|f(x)h_{k,N}(x)|dx\leq M$. Taking $N\rightarrow\infty$ yields the result.
