It's a strange way to describe things. The calculation involving a finite ##dx## is an approximation. You effectively take the mass element from ##x## to ##x + dx## all to be at position ##x##. As ##dx## gets smaller, the approximation gets better. The limit ##dx \rightarrow 0## is the integral.