Metrics are often formulated by appealing to the square of an infinitesimal quantities. Examples of such are:
$$ (ds)^2=(dx)^2+(dy)^2 $$
or
$$ ds^2=dx^2+dy^2 $$
or
$$ d(s^2)=d(x^2)+d(y^2) $$
or
$$ (\Delta s)^2=(\Delta x)^2+(\Delta y)^2 $$
What is the difference between each of these relations.
Finally, how does one integrates $(dx)^2$ (both as an indefinite and a definite integral)?
Given a Riemaniann manifold $(M, g)$, the line element is defined as: $$ \phi\colon T^*M\times T^*M\to \mathbb{C}, \quad ds^2 = g(du, du). $$ This is consistent with the original idea of calculating line lengths by extending the Pythagorean theorem and therefore in the literature one states that $ds^2 = dx^2 + dy^2 +\ldots$.
The notation $d(s^2)$ represents, on the other hand, the exterior derivative (or whatever derivative you have at hand) of the function $s^2$, $s$ being calculated as $$ s = \int_{\gamma} ds $$ with consistent understanding of the symbol above; as such, it follows that $d(s^2) = 2s\, ds$.
The finite element $\Delta s^2$ is defined through $$ \Delta s = \int^A_B ds $$ along a line $\gamma$. Using the definition of $ds$ in terms of metric tensor one can show that the integral can be split into the sum of individual pieces along each direction, therefore the single components $\Delta x^2$ and $\Delta y^2$, respectively.