# Finding $f\in L^{p}\left(\mathbb{R}\right)\setminus L^{q}\left(\mathbb{R}\right)$

Let $1\leqslant p<q\leqslant\infty.$ I know then that $L^{q}\left(\mathbb{R}\right)\subsetneq L^{p}\left(\mathbb{R}\right)$. How do I show that it is a proper subgroup? In other words, I am trying to find a function $f\in L^{p}\left(\mathbb{R}\right)\backslash L^{q}\left(\mathbb{R}\right)$.

Any help would be appreciated.

-
Try something along the lines of $\sum n \chi_{E_n}$, where $E_n$ are mutually disjoint sets such that $\mu (E_n) = 1/n^{p+1+\epsilon}$, for a suitably chosen $\epsilon$. – user27126 Jan 12 '13 at 3:36

The following example works: $$f(x) = \left\{ \begin{array}{ll} \dfrac{1}{x^{1/q}} & \text{if x \in (0,1] }; \\ 0 & \text{elsewhere}. \end{array} \right.$$
There are lots of functions, even arbitrarily smooth functions, in $L^p(\mathbb{R})$ not in $L^q(\mathbb{R})$. Below is an example of a continuous function in $L^p(\mathbb{R})$ not in $L^q(\mathbb{R})$. $$f(x) = \begin{cases} \dfrac1{x^{2/(p+q)}} & x \geq 1\\ x & x \in [0,1) \\ 0 & x<0 \end{cases}$$