Let $B = \{ x \in \mathbb{R}^n:|x|<R\}$ be a ball of radius $R \in (0,\infty)$ centered at the origin. Let $C$ be a positive constant. Suppose $f$ is a measurable function on $\mathbb{R}^n$ with
$$|f(x)| \leq \frac{C}{|x|^p} \text{ whenever } |x|<R$$
I want to show $f$ is integrable on $B$ for $p<n$.
Suppose we also know that for the one-dimensional case
$$\int_0^1 \frac{1}{y^p} = \begin{cases}
\frac{1}{1-p}, & \text{if $p < 1$} \\
\infty, & \text{if $p \geq$ 1}
\end{cases} $$
Is the following proof correct?
Suppose the conditions above.
Then,
$$\int_B|f(x)|dx \leq C \int|x|^{-p}\chi_{B}(x)dx \\
=C \sigma(S^{n-1}) \int_0^Rr^{-p}r^{n-1}dr \\
=C \sigma(S^{n-1}) \int_0^R\frac{1}{r^{p-n+1}}dr \\
=C \sigma(S^{n-1})\begin{cases}
\frac{R^{n-p}}{n-p}, & \text{if $p-n+1 < 1$} \\
\infty, & \text{if $p-n+1 \geq$ 1}
\end{cases}\\
=\begin{cases}
\frac{C\sigma(S^{n-1})R^{n-p}}{n-p}, & \text{if $p < n$} \\
\infty, & \text{if $p \geq$ n}
\end{cases}$$
So, $\int_B|f(x)|dx < \infty$ for $p<n$.