Deriving the first moment of Collisionless Boltzmann Equation in Spherical Polar Coordinates I am following these notes: Dynamics and Astrophysics of Galaxies.
After equation 6.37, we have:
\begin{equation*}
    p_r\,\frac{\partial f}{\partial r} + \frac{p_\theta}{r^2}\,\frac{\partial f}{\partial \theta} +
    \frac{p_\phi}{r^2\,\sin^2\theta}\,\frac{\partial f}{\partial \phi}
    -\left(\frac{\mathrm{d} \Phi}{\mathrm{d} r}-\frac{p_\theta^2}{r^3}-\frac{p_\phi^2}{r^3\,\sin^2\theta}\right)\,\frac{\partial f}{\partial p_r}
    +\frac{p_\phi^2\,\cos\theta}{r^2\,\sin^3\theta}\,\frac{\partial f}{\partial p_\theta} = 0\,.\\
\end{equation*}
This is the Collisionless Boltzmann Equation in Spherical Polar Coordinates.
Then

We now multiply this by $p_r$ and integrate over all $(p_r,p_{\phi},p_{\theta})$ using
that $\mathrm{d}p_r\,\mathrm{d}p_\phi\,\mathrm{d}p_\theta = r^2\,\sin\theta\,\mathrm{d}v_r\, \mathrm{d}v_\phi\,\mathrm{d}v_\theta$ and using partial integration to deal
with the derivatives of f with respect to the momenta

\begin{align}\label{eq-spher-jeans-penult}
    \frac{\partial (r^2\,\sin\theta\,\nu\,\overline{v^2_r})}{\partial r} + \frac{\partial (\sin\theta\,\nu\,\overline{v_r\,v_\theta})}{\partial \theta} &amp; +
    \frac{\partial (\nu\,\overline{v_r\,v_\phi}/\sin\theta)}{\partial \phi}\\
    &amp;
    +r^2\,\sin\theta\,\nu\,\left(\frac{\mathrm{d} \Phi}{\mathrm{d} r}-\frac{\overline{v_\theta^2}}{r}-\frac{\overline{v_\phi^2}}{r}\right) = 0\nonumber\,.
\end{align}
I would like to arrive to this result myself. Multiplying the SPC CBE by $p_r$ &amp; going ahead with the suggested volume element, considering the first term in the above equation, not being worried about the integration limits gives us:
\begin{equation}
\int p_r \frac{\partial f}{\partial r} p_r r^2 \sin\theta \mathrm{d}v_r \mathrm{d}v_{\theta} \mathrm{d}v_{\phi}
=\int v_r^2 \frac{\partial f}{\partial r} r^2 \sin \theta \mathrm{d}v_r \mathrm{d}v_{\theta} \mathrm{d}v_{\phi}
=r^2 \sin \theta \int v_r^2 \frac{\partial f}{\partial r} \mathrm{d}v_r \mathrm{d}v_{\theta} \mathrm{d}v_{\phi}
\end{equation}
Using 6.32 from the mentioned notes,
\begin{equation}
\frac{\partial (r^2\,\sin\theta\,\nu\,\overline{v^2_r})}{\partial r} = \frac{\partial}{\partial r} \left( r^2 \sin\theta \int v^2_r f \mathrm{d}v_r \mathrm{d}v_{\theta} \mathrm{d}v_{\phi} \right)
\end{equation}
Which is not equal to what I have found just a line above.
What am I doing wrong?

Some question on Math.SE &amp; Physics.SE.
After correspondence with the author of those notes, I arrived at the following conclusion.
When we do $\frac{\partial f}{\partial r}$, we require that all other (other than $r$) variables which f is dependent on, are held constant. That is: $\theta, \phi, p_r, p_{\theta}, p_{\phi}$ are constants.
Note that:
$(p_r, p_{\theta}, p_{\phi})=(\dot{r}, r^2 \sin^2 \theta \dot{\phi}, r^2\dot{\theta})$
Keep in mind that:

$p_r$, ie $\dot{r}$ is held constant: it does not mean $r$ is held constant (in fact, we are differentiating with respect to $r$).

$p_{\theta}$, ie $r^2\sin^2\theta\dot{\phi}$ is held constant. This does not mean that either $r$, $\theta$ or $\dot{\phi}$ is held constant.

$p_{\phi}$, ie $r^2\dot{\theta}$ is held constant. We are not claiming this about $r$ or $\dot{\theta}$.


Writing the steps emphasizing this statement above:
$$\int d\vec{p} p_r \frac{\partial f}{\partial r}  p_r \Bigr|_{\theta, \phi, p_r, p_{\theta}, p_{\phi}}$$
Writing out explicitly what we mean by $d\vec{p}$:
$$=\int \mathrm{d}(p_r,p_{\theta},p_{\phi}) p_r \frac{\partial f}{\partial r}  p_r \Bigr|_{\theta, \phi, p_r, p_{\theta}, p_{\phi}}$$
We can move out the partial differentiation because all other term than $\frac{\partial f}{\partial r}$ is held constant: [THIS IS THE MAIN STEP]
$$=\frac{\partial}{\partial r}\int \mathrm{d}(p_r,p_{\theta},p_{\phi}) p_r^2 f \Bigr|_{\theta, \phi, p_r, p_{\theta}, p_{\phi}}$$
Changing from the $p$-nomenclature to the variables they represent:
$$\frac{\partial}{\partial r} \int \mathrm{d}(\dot{r}, r^2\dot{\theta}, r^2\sin^2\theta\dot{\phi})  v_r^2 f \Bigr|_{\theta, \phi, \dot{r}, r^2 \sin^2 \theta \dot{\phi}, r^2\dot{\theta}}$$
ie
$$\frac{\partial}{\partial r} \int \mathrm{d}(v_r, r \sin\theta v_{\phi},  r v_{\theta}) v_r^2 f \Bigr|_{\theta, \phi, \dot{r}, r^2 \sin^2 \theta \dot{\phi}, r^2\dot{\theta}}$$
This step I am unsure about (ie why I don't have a $dr$ and $d\theta$ term, for example), but we say:
$$\mathrm{d}(v_r, r \sin\theta v_{\phi},  r v_{\theta}) = r^2 \sin\theta \mathrm{d}v_r \mathrm{d}v_{\theta} \mathrm{d}v_{\phi}$$
Rewrite integral
$$\frac{\partial}{\partial r} \int r^2 \sin\theta \mathrm{d}v_r \mathrm{d}v_{\theta} \mathrm{d}v_{\phi} v_r^2 f$$
$$=\frac{\partial}{\partial r} r^2 \sin\theta \int \mathrm{d}v_r \mathrm{d}v_{\theta} \mathrm{d}v_{\phi} v_r^2 f$$
$$=\frac{\partial}{\partial r} \left( r^2 \sin\theta \nu \bar{v_r^2} \right)$$
As claimed by the notes.

Same answer on Math.SE &amp; Physics.SE.