We all know from school that density is defined as mass over volume $$\rho = \frac{m}{V}$$
I'm wondering what the mathematically correct definition of density is. I'm considering two options.
OPTION 1. Is density defined by the means of multiple integral? $$m = \iiint \rho \, \mathrm{d}x\,\mathrm{d}y\,\mathrm{d}z$$ This way density is $\rho = \cfrac{\partial^3 m}{\partial x \partial y \partial z}$.
OPTION 2. Is density defined by the means of volume integral? $$m = \int \rho \, \mathrm{d}V$$ This way density is $\rho = \cfrac{dm}{dV}$.
If Option 2 is correct, then what is volume integral? In my engineering calculus course, I learnt about multiple and curvilinear integrals. Curvilinear integrals include line integrals (of two types) and surface integrals (of two types). I assume that volume integral is a curvilinear integral, but I'm not sure.
If volume integral is a curviulinear integral, then what is the way of calculating it in Decart (Cartesian) coordinates? I mean that there are formulas to calculate line integrals in Cartesian coordinates (one formula for each type of the line integral) and there are formulas to calculate surface integrals in Cartesian coordinates (again, each type of the surface integral has a formula to calculate it in Cartesian coordinates); is there an analogous formula for the volume integral?
If both options 1 and 2 are not correct, then what is the mathematically rigorous way to define density?
P.S. I did read this post. But I do still have my question unanswered. Is density a mass derivative over volume or a third mass derivative over three Cartesian coordinates? In other words, I'm trying to figure out is there such a thing as a coordinate along a volume (I know about coordinate along a line - hence, line integral; I know about coordinate along a surface - hence, surface integral; but is there volume integral in the same sense ...)
ANSWERS
I found an answer to a half of my question here. I.e., the answer to the post I've cited basically validates that there's such a thing as volume integral and we can map it to Cartesian coordinates using Jacobian (the same way as we do for surface integrals).
There's a very interesting answer by @CyclotomicField. See two CyclotomicField's comments bellow.
The answer by @Othing calrifies it. Basically, the definition of density is $\rho = m / V$. Then I need to pick a MEASURE I want. The notion of measure is explained in the wikipedia article cited by @CyclotomicField.
The comment by herb steinberg is very interesting as well.
@Peek-a-boo comment is very good! Definitely, check the link provided in the comment.
Thank you very much for all your inputs!