Functions belonging to $L_p(X,S,\lambda)$ for a single value of $p\in (0,\infty )$ Let $X=(0,\infty),\ S=\Bbb B_{(0,\infty)},\ \lambda=Lebesgue\ measure$ and let $p\in (0,\infty)$ fixed. Then prove that exists $f_p:X\to \Bbb R$ continuous such that:
$$f_p\in L_q(\lambda) \Leftrightarrow q=p$$
I started with a special case, when $p=1$. 
So if $p=1$, lets consider 
$$ f_1(x)=\frac{1}{x(1+|ln(x)|)^2}$$. 
Then for this particular case I need to prove that: 
$$f_1\in L_q(\lambda) \Leftrightarrow q=1$$ 
But got stucked since I only got that:
$$f_1\in L_q(\lambda) \Leftrightarrow \int_{(0,\infty)} |f_1|^q d\lambda<\infty \Leftrightarrow \int_0^\infty \frac{1}{x^q(1+|ln(x)|)^{2q}} dx<\infty\ ;(f_1>0\ in\ (0,\infty))$$
 A: This is an example for $p=1$. It can be easily adapted to $p>1$.
$$
f(x)=\sum_{n=1}^\infty a_n\,(x-n)^{-\tfrac{n}{n+1}}\,\chi_{(n,n+1]}(x)
$$
where:


*

*$\chi_{(n,n+1]}$ is the characteristic function of the interval $(n,n+1]$

*$\{a_n\}$ is a sequence of positive numbers such that
$$
\sum_{n=1}^\infty a_n\int_n^{n+1}(x-n)^{-\tfrac{n}{n+1}}\,dx=\sum_{n=1}^\infty (n+1)\,a_n<\infty.
$$

A: I think I got it whole. 
Let $\ f_p(x)=\frac{1}{(x(1+|ln(x)|)^2)^{\frac{1}{p}}}\ \forall x\in X$

So for the ($\Leftarrow$) part it's clear that if $\ q=p$ then:
$$\int_{(0,\infty)}|f_p|^qd\lambda=\int_0^\infty\frac{dx}{(x(1+|ln(x)|)^2)^{\frac{q}{p}}}=\int_0^\infty\frac{dx}{x(1+|ln(x)|)^2}\\=\int_0^1\frac{dx}{x(1-ln(x))^2}+\int_1^\infty\frac{dx}{x(1+ln(x))^2}\\=\Big[\frac{1}{1-ln(1)}-\lim_{x\to 0}\frac{1}{1-ln(x)}\Big]-\Big[\lim_{x\to \infty}\frac{1}{1+ln(x)}-\frac{1}{1+ln(1)} \Big]\\=2-\lim_{x\to0}\frac{1}{1-ln(x)}+\lim_{x\to \infty}\frac{1}{1+ln(x)}\\=2-0+0=2<\infty$$ 
thus $\ f_p\in L_q(\lambda)$.

Now, for the ($\Rightarrow$) part we have that $\int_{(0,\infty)}|f_p|^qd\lambda<\infty$, so we need to show that $q=p$ follows. Lets assume that $q\ne p\ \Rightarrow\ q\in (0,p)\cup(p,\infty)$, so lets analyze it in two cases:

Case I: $q\in(0,p)$. Let $x\in(1,\infty)$

$$\text{It's clear that:}\ \lim_{x\to 1}x^{\frac{\epsilon}{p}}(1+|ln(x)|)^{\frac{2q}{p}}=1\quad \forall \epsilon>0\ \\
 \Rightarrow\ \exists M>0\ \text{such that}\; x^\epsilon(1+|ln(x)|)^{2q}\le M\quad \forall \epsilon>0 \\
\text{So for}\; \epsilon=q+p(>0),\; x^{\frac{q+p}{p}}(1+|ln(x)|)^{\frac{2q}{p}}\le M \\
\text{i.e.}\; x^{\frac{q}{p}}(1+|ln(x)|)^{\frac{2q}{p}}\le \frac{M}{x}\le x^2\frac{M}{x}=xM\\
\Rightarrow \frac{1}{xM}\le \frac{1}{x^{\frac{q}{p}}(1+|ln(x)|)^{\frac{2q}{p}}}\\
\Rightarrow \int_1^\infty \frac{dx}{xM}\le \int_1^\infty \frac{dx}{x^{\frac{q}{p}}(1+|ln(x)|)^{\frac{2q}{p}}}\\
\text{where}\quad \int_1^\infty \frac{dx}{xM}= \lim_{x\to \infty}ln(x)-ln(1)\to \infty\\
\Rightarrow \int_1^\infty \frac{dx}{x^{\frac{q}{p}}(1+|ln(x)|)^{\frac{2q}{p}}}=\int_1^\infty \frac{dx}{(x(1+|ln(x)|)^{2})^{\frac{q}{p}}}=\int_1^\infty |f_p(x)|^qdx\to \infty$$

Case II: $q\in(p,\infty)$. Let $x\in(0,1)$

$$\text{It's clear that:}\ \lim_{x\to 0}x^{\frac{\epsilon}{p}}(1+|ln(x)|)^{\frac{2q}{p}}=0\quad \forall \epsilon>0\ 
\\
 \Rightarrow\ \exists M>0\ \text{such that}\; x^\epsilon(1+|ln(x)|)^{2q}\le M\quad \forall \epsilon>0 \\
\text{So for}\; \epsilon=q-p(>0),\; x^{\frac{q-p}{p}}(1+|ln(x)|)^{\frac{2q}{p}}\le M \\
\text{i.e.}\; x^{\frac{q}{p}}(1+|ln(x)|)^{\frac{2q}{p}}\le xM\\
\Rightarrow \frac{1}{xM}\le \frac{1}{x^{\frac{q}{p}}(1+|ln(x)|)^{\frac{2q}{p}}}\\
\Rightarrow \int_0^1 \frac{dx}{xM}\le \int_0^1 \frac{dx}{x^{\frac{q}{p}}(1+|ln(x)|)^{\frac{2q}{p}}}\\
\text{where}\quad \int_0^1 \frac{dx}{xM}=ln(1)- \lim_{x\to 0}ln(x)\to \infty\\
\Rightarrow \int_0^1 \frac{dx}{x^{\frac{q}{p}}(1+|ln(x)|)^{\frac{2q}{p}}}=\int_0^1\frac{dx}{(x(1+|ln(x)|)^{2})^{\frac{q}{p}}}=\int_0^1|f_p(x)|^qdx\to \infty$$

So, Case I and Case II tell us that:
$$\int_{(0,\infty)} |f_p|^qd\lambda = \int_o^\infty |f_p(x)|^qdx=
\int_o^1|f_p(x)|^qdx + \int_1^\infty |f_p(x)|^qdx=\infty \qquad \forall q\ne p$$
which is a contradiction to the fact that $\int_{(0,\infty)} |f_p|^qd\lambda<\infty$
thus $q=p$.
