Exercise: Let $p\in[1,\infty)$ and $\lambda$ be the Lebesgue measure on $\mathbb{R}$. Determine for which $\alpha \in\mathbb{R}$ one has $f\in L^p(\mathbb{R})$ when $f(x) = \mathbb{1}_{(0,1)}(x)x^\alpha$.
What I've tried:
$L^p(\mathbb{R})$ is defined as $L^p(\mathbb{R}) = \{f:\mathbb{R}\to\mathbb{K}: \text{ $f$ is measurable and}\int_S\left|f\right|^p d\lambda < \infty\}$, where $\mathbb{K} = \mathbb{R}$ or $\mathbb{K} = \mathbb{C}$, so I think I need to find out for which $\alpha$ we have that $\mathbb{1}_{(0,1)}(x)x^\alpha$ is measurable and that $\int_S\left|\mathbb{1}_{(0,1)}(x)x^\alpha\right|^p d\lambda < \infty$. For $\alpha\in (-\infty,\infty)$ I know that $f(x)$ is measurable because $f(x)$ is the product of the indicator function and a continous function. Now suppose we have $x_0\in(0,1)$. $f(x_0) = \mathbb{1}_{(0,1)}(x_0)x_0^\alpha = x_0^\alpha$. At least as long as $\alpha \in (-\infty,\infty)$ we have that $\int_S\mathbb{1}_{(0,1)}(x_0)x_0^\alpha d\lambda<\infty.$ Hence I would conclude that $f\in L^p(\mathbb{R})$ for $\alpha \in(0,1)$.
Question: Are my approach and conclusion correct? If not, what am I doing wrong?
Thanks in advance!
I am not sure whether my answer is correct or not. It would be good if someone can help me to check it.
Note that if $\alpha>0,$ then $\alpha p \neq -1$ and $\alpha p +1>0,$ which implies that $$\int_{-\infty}^\infty |f|^p\, d\lambda = \int_0^1 x^{\alpha p}\, dx = \frac{1-0}{\alpha p +1} = \frac{1}{\alpha p+1}.$$
If $\alpha=0,$ then $$\int_{-\infty}^\infty |f|^p\, d\lambda = \int_0^1 1\, dx = 1.$$
If $\alpha<0$ and $\alpha p=-1,$ then $$\int_{-\infty}^\infty |f|^p\, d\lambda = \int_0^1 x^{\alpha p}\, dx = \int_0^1 \frac{1}{x} \, dx = -\ln(0) = \infty.$$
If $\alpha<0$ and $\alpha p <-1,$ then $$\int_{-\infty}^\infty |f|^p\, d\lambda = \int_0^1 x^{\alpha p}\, dx = \frac{1 - 0^{\alpha p +1}}{\alpha p +1}=\infty.$$
If $\alpha<0$ and $\alpha p >-1,$ then $$\int_{-\infty}^\infty |f|^p\, d\lambda = \int_0^1 x^{\alpha p}\, dx = \frac{1}{\alpha p +1}.$$
Therefore, $f\in L^p(\mathbb{R})$ when $\alpha\geq 0$ or $\frac{-1}{p}<\alpha<0,$ that is, $\alpha>-\frac{1}{p}.$