# $\int_{B_n}fdx = v_{n-1}\int_{-1}^{1}g(t)(1-t^2)^{\frac{n-1}{2}}dt$

$$B_n$$ is the unit ball in $$n$$ dimensions and $$v_n$$ is its volume.

$$f:\mathbb R^n \to \mathbb R$$ is a function that is only dependent on its first variable, meaning $$f(x_1,x_2, \dots, x_n) = g(x_1)$$ where $$g: \mathbb R \to \mathbb R$$.

We wish to show that $$\int_{B_n}f(x)dx = v_{n-1}\int_{-1}^{1}g(t)(1-t^2)^{\frac{n-1}{2}}dt$$

And we are given a hint: If $$B \subset \mathbb R^n$$ is a ball with radius $$R$$, then its volume is $$R^nv_n$$.

I tried calculating the integral using hyperspherical transformation but I failed, I also tried induction but that doesn't seem to be the way.

I don't see how to use the hint.

The intersection of $$B_n$$ with the plane $$x_1 = t$$ is well defined for all $$t \in (-1,1)$$, and we have that $$B_n \bigcap \{x \in \mathbb R^n| x_1 = t\} = \{x \in \mathbb R^n| x_2^2+x_3^2 + \dots + x_n^2 \leq 1-t^2\}$$ which is an $$n-1$$ dimensional ball with radius $$\sqrt{1-t^2}$$.
$$\int_{B_n}f(x)dx = \int_{B_n}g(x_1)dx = \int_{-1}^{1}\int_{B^*}g(t)dx_2dx_3\dots dt = \int_{-1}^{1}g(t)\int_{B^*}1dx_2dx_3\dots dt=\int_{-1}^{1}g(t)v_{n-1}(\sqrt{1-t^2})^{n-1}dt = v_{n-1}\int_{-1}^{1}g(t)(1-t^2)^{\frac{n-1}{2}}$$
Where $$B^*$$ is an $$n-1$$ dimensional ball with radius $$\sqrt{1-t^2}$$ centered at zero.