# What is the definition of density as a function?

(Before I start, I don't know which tag is suitable for this post. Please retag my post if it bothers you.)

Let's say there is a string on $[0,1]$ with a mass given by $m(x)$. ($m(x)$ means the mass contained in the interval $[0,x]$.)

Then the inertia momentum of this string is given by,

$$\int_0^1 x^2 dm(x).$$

(This is a Riemann Stieltjes Integral.)

If $m$ is differentiable on $[0,1]$, this is exactly the same as $\int_0^1 x^2 m'(x) dx$.

I thought the definition of 'density at a point' is given by 'derivative of mass', but I think this definition is not sufficient for many cases.

Is there a precise definition of density at a point?

-

As far as I know, there are a lot of kinds of density - you mentioned volume density, but there is linear density (amount of mass for unit of length), for example. If your string is very-very thin, there is no sense in definition that density = mass / volume, cause very thin string doesn't have volume and you should use linear density = mass / length or $\frac{dm}{dl}$.
So, what I wanted to say - the definition depends on purpose, but the main meaning is that density of something in the point is $\frac{d(mass/charge/whatever)}{d(unit\,of\,measurement)}$.