I'm having troubles understanding the connection between the Riemann and Lebesgue integral and the role that the measure function plays in this.
Let's say I have a measurable space and a measure $\mu$ on it. Then I can integrale a function $f$ and the integral with respect to the measure is defined as
$$ \int_X f d\mu = sup \left\{ \int_X s d\mu : 0 \leq s \leq f, s \:\: \text{simple} \right\} $$
So taht I should find a simple function that approaches my $f$, integrate the simple function, and then take the sup.
Now I'd like instead to take an alternative way and use the Riemann integral to evaluate $ \int_X f d\mu$.
What I'm having troubles with is, given the measure $\mu$, what are the variables I have to integrate with respect to in the Riemann integral.
So, given the measure $\mu$, how do I explicitly continue the equation
$$ \int_X f d\mu = ... $$
passing to the Riemann integral?
Alternatively, as an example, let's say that I have the usual integral "with the measure on a sphere":
$$ \int_{S^2} f(r, \theta, \phi) r^2 \sin(\theta) dr d\theta d\phi $$
What I always hear is that $$ r^2 \sin(\theta) dr d\theta d\phi $$ is the measure. But what exactly does this mean? I know that a measure takes a set as input and gives a positive number as a result. Now, it's evident that $r^2 \sin(\theta) dr d\theta d\phi$ cannot take a set as an argument.
So which exactly is the measure $\mu$ and how can I formally complete the equation
$$ \int_{S^2} f d\mu = ... = \int_{S^2} f(r, \theta, \phi) r^2 \sin(\theta) dr d\theta d\phi $$
Thanks in advance!
$1.$ If $f$ is Riemann integrable, then it's Lebesgue integrable, as well, wrt the Lebesgue measure.
$2.$ Since you're only integrating over the sphere, you just perform a change of variables (formula holds for both integrals).
$3.$ $drd\theta d\phi$ is a measure in the same way as $dxdydz$ is.
So, say we have a Riemann integrable function. Then, for bounded $X\subseteq \mathbb{R}^n$ $$\int\limits_X fdm=\int\limits_X f dx,$$ where $m$ denotes the Lebesgue measure (and $x$ the Jordan). If we stick with Lebesgue measure (you may be more comfortable), the statement $dm(X_j)$ does not make sense, as $dm$ is not a measure; $m$ is. However, you do calculate the measure of sets when integrating simple functions, which influences the integral of an arbitrary integrable function. So, the integral notation naturally reflects this.
Indeed, if $s=\sum\limits_{j=1}^n c_j\chi_{X_j},$ where $X_j\subseteq X$ Lebesgue measurable, then $$\int\limits_X s \, dm = \sum\limits_{j=1}^n c_jm(X_j).$$
For your original question, if $\mu$ is the Lebesgue measure, then $$\int\limits_{S^2} f\, d\mu=\int\limits_{S^2} f(x,y,z)\, dxdydz=\int\limits_0^\pi\int\limits_{0}^{2\pi} f(\theta,\phi)\, \sin\phi\, d\theta d\phi.$$ If you want to integrate over the entire ball, then
$$\int\limits_{B_1(0)} f\, d\mu=\int\limits_{B_1(0)} f(x,y,z)\, dxdydz=\int\limits_0^\pi\int\limits_{0}^{2\pi}\int\limits_0^1 f(r,\theta,\phi)\, r^2\sin\phi\, dr d\theta d\phi.$$