Is every $dm$ piece unequal when using integration of a non-uniformly dense object? When we want to find the total charge of an object or total mass, usually we start off with a setup such as:
$$ m = \int dm \:\;\:\text{or} \:\;\:q = \int dq$$
in which we then use (and to keep it simple lets imagine the object is a rod) a substitution using linear mass/charge density for our differential:
$$ dm = \lambda dx \:\;\:\text{or} \:\;\:dq = \lambda dx$$
That's all totally fine with me and calculations are no problem. But I usually like to over analyze things and then I started to question the $dm$ and $dq$. Is each $dm$ and $dq$ piece even if the rod has a density that is non-uniform? In calculus, when integrating something like $dx$, each piece can be regarded as infinitesimally sized but they should all be the same width no matter which piece you pick. But for $dm$, for example, I started to have the thought that each piece of $dm$ are unequal to each other. Since we can change $dm \to \lambda dx$, we can imagine taking a small piece of $x$ ($dx$) and analyzing $\lambda$ at that point. And if the rod has its mass non-uniformly distributed wouldn't that mean that all $dm$ pieces are uneven as $\lambda dx$ will output a different value each time or rather, $\lambda dx$ will output a different value of $dm$ each time.
And I figured that's maybe one of the reasons why we make the density substitution as we need to integrate something that has even pieces like $dx$.
This might be me overthinking it and maybe its more of a math question but any opinion if this is logical thinking would be of great help.
 A: $\newcommand{\d}[1]{\mathrm{d}{#1}}$In general you can use a change of variables, to write
$$\d{m} = \frac{\d{m}}{\d{x}}\d{x}=:\rho(x) \d{x},$$
where $\rho(x)$, defined as $\frac{\d{m}}{\d{x}}$, is the mass density and is doing precisely what you mean when you say "taking a small piece of $x$ ($\d{x}$) and analysing $\lambda$ at this point".
So the total mass of the rod, will be
$$m = \int \d{m} = \int \rho(x) \d{x}.$$
When $\rho(x)=\lambda=\text{constant}$, you are in the case of uniform density. But in general, you can have any $\rho(x)$ you like/your system tells you, so long as it is a positive-definite function (usually with finite support, if you have a finite rod/system).
A: The $ dm = \rho(x) dx $ expression tells us that $ m $ and $ x $ do not have generally equal binnings. When you integrate according to $ dm $, it is uniform w.r.t. mass, but not w.r.t. length, and vice versa.
At some situations it is important to know such an inequality of the binnings. Look e.g. at peaks of black-body radiation w.r.t. frequency and wavelength. They differ exactly due to the unequal binnings.
A: I don't quite get the question, but yes, every piece of $dm$ has unequal mass, but equal length. And when you write $ dm = λdx $, the $λ$ you are writing is called the local linear mass density.
In case of a uniformly dense rod, the local linear mass density is same everywhere, but in the case of a non uniformly dense rod, the local linear mass density is different. Therefore, $ dm = λdx $ will give you different results, and that is not because of $dm$ being of unequal length, but because of $λ$ varying along the length of the rode.
Due to this, you need to have an expression of now $λ$ varies with x, before you can integrate.
A: the answer to your question: not necessarily.  depends upon your choice of variables you wish to evaluate dm with
$$M= \int dm$$
$$M = \int \lambda dx$$
Let:
$$x= t^2$$
$$dm = [\lambda 2t dt]$$
Consider the density function:
$$\lambda = \frac{1}{2\sqrt{x}}$$
$$\lambda = \frac{1}{2t}$$
$$dm = dt$$
And thus dm is constant with respect to the value  of t you choose, despite the density function varying with respect to position.
In general dv doesn't need to be constant, you can always choose variables that make it constant however, as long as you can get it in a form that has  fixed size differentials, you can integrate. By fixed size I mean the actual e.g $dr d\theta d\phi$ part of the whole "dv" element,
In cartesian coordinates:
$$dm = \rho(x,y,z) dv$$
$$dv=dx dy dx$$
This dv element is constant and does not depend upon position. It is of a fixed size.
This means the only way the value of dm changes with respect to position [evaluated with the variables $x,y,z$], is if the density function $\rho$ depends upon position.
If $\rho$ varies with position, it follows that dm must therefore vary with position.
Non cartesian coordinates
Can a constant $\rho$ cause a dm value that does vary with respect to position?
If you evaluate the dm element with respect to the variables x,y,z then no. But what about the variables $r,\theta,\phi$?
In spherical coordinates
$$dv = r^2sin(\theta) dr d\phi d\theta$$
Here, the size of the dv element, does depend on the position at which you evaluate it as it depends upon r and $\theta$. And thus the dm element for a constant mass density still does depend on position. This is reflected in the fact that the volume between e.g r: 0-1, and 1-2 are different
A: There are several possible answers to this question depending on the framework you use.
The way you are thinking about "dm" suggests you are thinking about Riemann integral. In this integral, you make a finite partition ($x_i$) of the interval over which you integrate and you compute upper and lower Darboux sum for the given partition.
$$\sum_i\inf_{t\in[x_i,x_{i+1}]}f(t)(x_{i+1}-x_i)\equiv\sum_i\inf_{t\in[x_i,x_{i+1}]}f(t)\Delta x_i$$
$$\sum_i\sup_{t\in[x_i,x_{i+1}]}f(t)(x_{i+1}-x_i)\equiv\sum_i\sup_{t\in[x_i,x_{i+1}]}f(t)\Delta x_i$$
After this, you make a refinement of the partition and repeat the process. You get a sequence of numbers and you ask what is the limit of this assuming the maximum length of $\Delta x_i=x_{i+1}-x_i$ goes to zero.
The important thing is that the result should not depend on the partitioning, otherwise the integral is not well defined. So what "dm" means is entirely up to you and ease of your computation.
When you are computing integral $m=\int_0^m dm$, you can in principle partition it to have all $\Delta m_i$ constant. In that case $\Delta m_i=m/N$. You can make refinment by, say, doubling N in each iteration and then looking how the sums coverge. The problem is, you need to know the result of the integral in order to compute it. So this is useless. But if you know density distribution $\lambda(x)$, you can partition it into $\lambda(x) \Delta _i$ with $\Delta x_i = X/N$, assuming you know how long (X) the string is. If you do not know this, then you need to seek yet another partition that makes use of information that you actually have at your disposal.
The point is, $dm$ in this framework has no value. It is just notation, telling you that you are partitioning interval of m to whatever you need and then computing some sums and their limits.
In another framework $dm$ can be seen as 1-form field in space that you integrate over some domain. Here it certainly is not a "piece", but it is well defined object on its own, unlike in the previous case. To use cartesian coordinates, you can write $dm = \lambda dx$. Since cartesian coordinates have special place in Euclidean geometry, we can claim $dm$ is constant if $\lambda$ is constant. But again, in this framework $dm$ is not a "piece", its a 1-form field.
No doubt there are also other frameworks and interpretations.
A: The correct answer is "it depends".
In calculus the area under a curve $y=f(x)$ is usually approximated using sections $\delta x$ that are the same size, and the limit is taken as the size shrinks to zero. However the integral can be done having increments of different size; it is just that having sections of the same size usually makes doing the integral a lot easier to understand and to do.
With an integral such as $$\int f(m) dm $$ we usually expect the $dm$ increments to be the same size. On the other hand, with $$\int dm $$ we often expect $m$ to depend on something else, so we expect the $dm$ increments to vary in size.
If $m$ depends in some known way on another variable, say $x$, then we often write $$\int dm=\int \frac{dm}{dx}dx=\int\lambda(x) dx.$$
Here $\lambda$ would be the linear density of the rod and $m$ would be the total mass from $x=0$ up to the current value of $x$.
When this is calculated it is the $dx$ increments that would normally be the same size, while the $dm$ increments are likely to be different sizes from each other.
A: Mass is seen as a scalar. In differential geometry, it's volume or density forms that are integrated. So even mass would be seen to have a directional character given by the density form. Nevertheless, physically speaking, it does not have a directional character, this is why it is described as a scalar field conventionally. However, you can mathematically model mass as having a directional character - the question then would be, given we are talking physics, what physical or theoretical motivation does this have?
An analogue to do with orientation are Cosserat solids. These have an intrinsic orientation at a point, even though points cannot have orientation. They were theoretically devised at the early part of the 20C by the Cosserat brothers and their properties investigated by them. Theoretically now, we can see that they are instances of principal bundles with gauge structure group $SO(n)$ or rather their associated vector bundles. Such theoretical constructions are intrinsic to the geometric reformulation of gauge theory.
