Given $n \in \Bbb{N}$, let $m^n$ denote the $n$ dimensional Lebesgue measure on $\Bbb{R}^n$. Fix $p>0$ and show if $B_r(0) \subset \Bbb{R}^n$, then if $f(x)=\vert \vert x \vert \vert^{-p}$, where $\vert \vert \cdot \vert \vert$ denotes standard Euclidean norm
$$\vert \vert x \vert \vert = \sqrt{x_1^2+x_2^2 + ...+ x_n^2}.$$
Prove (a)
$$\int_{B_r(0)} f dm^n < \infty \space \space \space \text{if and only if $p<n.$}$$
and (b)
$$\int_{B_r(0)^c} f dm^n < \infty \space \space \space \text{if and only if $p>n.$}$$
I have an idea for the first if and only if:
Let $x \in \Bbb{R}^n$, then $$x=(x_1,...,x_n).$$ (a) Suppose $$\int_{B_r(0)} f dm^n < \infty.$$ This holds if and only if $$\infty > \int_{B_r(0)}\vert \vert x \vert \vert^{-p} dm^n = \int_0^\infty m^n(\{x \in B_r(0) : \vert \vert x \vert \vert^{-p} \geq y\}) dy.$$ Thus we have if $x=(x_1,...,x_n)$, then $$\vert \vert x \vert \vert^{-p} \geq y$$ if and only if $$\vert \vert x \vert \vert \leq y^{-\frac{1}{p}}$$ which holds if and only if $$\frac{1}{n}< \frac{1}{p}$$ which holds if and only if $$p<n.$$ For the backwards, we have
$$\infty > \int_{B_r(0)^c} \vert \vert x \vert \vert^{-p}dm^n = \int_0^\infty m^n(\{x \in B_r(0)^c: \vert \vert x \vert \vert^{-p}\geq y\})dy$$
But if $x \in \Bbb{R}^n \setminus B_r(0)$ and the integral is finite doesnt this imply $\frac{1}{n}< \frac{1}{p}$? Any hints corrections or suggestions welcome :) !!!
(a) Let $r(i) = r 2^{-i}$ and let $A_i$ denote the set $$ A_i = B_{r(i)}(0) \setminus B_{r(i+1)}(0).$$ Then (up to a null set) $$ B_r(0) = \bigcup_{i=0}^\infty A_i$$ (this is called a "dyadic decomposition".)
Moreover, the linear change of variables $y = 2^n x$ gives that $$ \int_{A_i} |x|^{-p} dm^n(x) = 2^{i(p-n)}\int_{A_0} |x|^{-p} dm^n(x) $$ (this property follows from the scaling $m^n(\lambda A) = \lambda^n m^n(A)$.) Summing, $$ \int_{B_r(0)} |x|^{-p} dm^n(x)= \left(\sum_{i=0}^\infty 2^{i(p-n)}\right)\int_{A_0} |x|^{-p} dm^n(x)$$ The integral term $\int_{A_0} |x|^{-p} dm^n(x)$ is clearly finite, and the sum converges iff $p<n$, as required.
(b) is entirely analogous and I'll leave it to you.