Integration by parts for indicator of a sphere to indicator of a ball Broadly speaking, I have a radial distribution on $\mathbb R^n$, i.e., the pdf only depends on the $\ell_2$-norm of the argument. I would like to obtain an expression for the pdf in the form $\int_{w=0}^\infty h(w) \cdot 1_{w \mathbb B^n} \ dw$ with $h(w) \geq 0$, where $w \mathbb B^n = \{\mathbf x \in \mathbb R^n:|\mathbf x|_2 \leq w\}$ is the radius $w$ ball and $1_{w \mathbb B^n}$ is the indicator function for this set. I would like to know if there is a theory that justifies the sort of argument I outline below: in particular, is there a sense in which one can integrate over parametrized families of distributions, and further apply some variant of integration by parts? Below, I will describe my problem more specifically, as well as my "heuristic guess" for the right answer.
The pdf of a $n$-dimensional Gaussian vector $N(\mathbf{0},I_n)$ (i.e., each coordinate is an independent $N(0,1)$) is $ f(\mathbf x) = \frac{1}{(2\pi)^{n/2}} \exp\left(-|\mathbf x|_2^2\right)$. This can be written as
$$f(\mathbf x) = \frac{1}{(2\pi)^{n/2}}\int_{w=0}^\infty \exp\left(-w^2\right) \cdot 1_{w\mathbb S^{n-1}}(\mathbf x) \ dw,$$
where $w\mathbb S^{n-1} = \{\mathbf x \in \mathbb R^n:|\mathbf x|_2 = w\}$ and $1_{w \mathbb S^{n-1}}$ denotes the indicator function for this set.
Intuitively, this can be viewed as a convex combination for $f$ in terms of indicator functions for spheres. Instead, I would like to obtain an expression for $f$ as a convex combination of indicator functions for balls, i.e., an expression like
$$f(x) = \int_{w=0}^{\infty} h(w) \cdot  1_{w \mathbb B^n}(\mathbf x) \ dw $$
where $h(w)$ is a nonnegative function.
My approach is to try to use a sort of "integration by parts". Heuristically, if $u_S$ denotes the uniform distribution over a set $S \subseteq \mathbb R^n$, it seems reasonable to me that an expression like
$$ u_{w\mathbb B^n} = \frac{n}{w^n} \int_{v=0}^w v^{n-1} \cdot u_{v \mathbb S^{n-1}} \ dv$$
should hold. As justification, consider the random variable $X$ defined by sampling a uniformly random point from the ball of radius $w$ and then outputting its norm: we have $\Pr[X \leq v] = \frac{v^n}{w^n}$ so the pdf is $\frac{n}{w^n} \cdot v^{n-1}$. Thus, if we define a function $b(w) = \frac{w^n} n u_{w \mathbb B^n}$ (whose output is a function on $\mathbb R^n$) something like the Fundamental Theorem of Calculus should imply $b'(w) = v^{n-1} u_{v \mathbb S^{n-1}}$. However, as the set $\mathbb S^{n-1}$ has measure $0$, this seems sketchy to me.
In any case, if one is willing to accept this reasoning, we could also try to write
$$ f(\mathbf x) = \int_{v=0}^{\infty} \phi(v) u_{v \mathbb S^{n-1}} \ dv,$$
where $\phi(v)$ denotes the pdf of a $\chi_2$-distribution with $n$ degrees of freedom. (Again, the idea is to think of sampling a Gaussian by first sampling its norm and then outputting a uniformly random point from the sphere of that radius.) Then by defining $a(x) := \phi(v)/v^{n-1}$ we could differentiate $a(v)$ and then by some version of integration by parts arrive at an expression like
$$ f(\mathbf x) = \int_{v=0}^{\infty} a'(v) \frac{v^n}{n} u_{v \mathbb B^n} \ dv.$$
I am wondering if it is possible to make this sort of approach rigourous. Ideally, I would like to know if there is any general theory explaining how to apply integration by parts to parametrized families of distributions, where the integration is over the parameter of the families.
 A: $\newcommand\R{\mathbb R}$Let $f$ be a radial pdf on $\R^n$, so that
$$f(x)=g(|x|)\tag{1}\label{1}$$
for some function $g\colon[0,\infty)\to\R$ and all $x\in\R^n$, where $|x|:=|x|_2$. Then your desired respresentation
$$f(x)=\int_0^\infty h(w) \cdot 1_{w \mathbb B^n} \ dw\tag{2}\label{2}$$ with $h\ge0$ can be rewritten as
$$g(|x|)=\int_0^\infty dw\,h(w)\,1(|x|\le w)$$
for all $x\in\R^n$ and then further as
$$g(u)=\int_u^\infty dw\,h(w)$$
for all real $u\ge0$, with $h\ge0$.
So, your desired representation \eqref{2} for $f$ as in \eqref{1} holds if and only if $g$ is a nonincreasing absolutely continuous function such that $g(u)\to0$ as $u\to\infty$. Moreover, then $h=-g'$ almost everywhere.

The formula
$$f(\mathbf x) = \frac{1}{(2\pi)^{n/2}}\int_{w=0}^\infty \exp\left(-w^2\right) \cdot 1_{w\mathbb S^{n-1}}(\mathbf x) \ dw\tag{3}\label{3}$$
for $ f(\mathbf x) = \frac{1}{(2\pi)^{n/2}} \exp\left(-|\mathbf x|_2^2\right)$ in the very beginning of your argument is incorrect. Indeed, the integral in \eqref{3} is in fact
$$\int_0^\infty \exp\left(-w^2\right) \,1(w=|\mathbf x|_2) \, dw=0\ne f(\mathbf x).$$
