# Integral over a ball.

How can we calculate the following integral? $$\int_{0}^r\frac{1}{s^n}\int_{B(s)}f(x)dxds$$ Here $B(s)$ is the ball of radius $s$ centered at the origin.

I think that this can be computed by $$\int_{0}^r\frac{1}{s^n}\int_{B(s)}f(x)dxds =\int_{0}^r\frac{1}{s^n}\int_{0}^s\int_{\partial B(t)}f(x)dxdsdt$$ But I am stuck at this point. Any help is more than welcome.

-
If you don't know what is $f$, there's no point in actually trying. This expression is perfectly suitable for arbitrary $f$ as "the value of the integral". If you want to compute it, work with an explicit function! –  Patrick Da Silva Oct 9 '12 at 7:15
You are right. I had an explicit function in my mind but I thought there would be a formula... –  Thom M Oct 9 '12 at 8:22
How about you show us the explicit function? –  Patrick Da Silva Oct 9 '12 at 14:06

## 1 Answer

You can apply Fubini at this step \begin{align*} \int_0^r s^{-n}\int_{B_s} f(x)\;dx\,ds &= \int_0^r s^{-n}\int_0^s \int_{\partial B_t} f(x)\;dS(x)\,dt\,ds\\ &= \int_0^r \int_t^r s^{-n}\int_{\partial B_t} f(x)\;dS(x)\, ds\, dt\\ &= \int_0^r \int_{\partial B_t} f(x)\; dS(x) \cdot \int_t^r s^{-n}\, dt\, ds\\ &= \int_0^r \int_{\partial B_t} f(x)\; dS(x) \cdot \frac{t^{1-n} - r^{1-n}}{n-1}\, ds\\ &= \int_0^r \int_{\partial B_t} \left(\frac{|x|^{1-n} - r^{1-n}}{n-1}\right)f(x)\; dS(x)\, dt\\ &= \int_{B_r} \left(\frac{|x|^{1-n} - r^{1-n}}{n-1}\right)f(x)\; dx\, dt\\ \end{align*}

-
I am still confused. What didi you do from first line to the second line? Sorry but, I am not familiar with Fubini's theorem. –  Thom M Oct 9 '12 at 8:27
@ThomM I exchanged the order of integration. We are integrating over $\{(s,t) \mid 0 \le t \le s \le r\}$, right? There are to possibilities to integrate over this domain: First $t$, then $s$, i. e. $\int_0^r\int_0^s \cdots \; dt\,ds$ or first $s$ then $t$, i. e. $\int_0^r \int_t^r\cdots\; ds\, dt$. –  martini Oct 9 '12 at 8:32