The way I've been taught to apply calculus to physics problems is to consider a small element at a general position and write an equation for that element and then to integrate it.
To find the moment of inertia of this rod as a function of y, I write the equation for the moment of inertia of this element at a distance of y
$dI = dm y^2$ here $dm = \rho dy$ where $\rho$ is the density Then I integrate this from $y = 0$ to $y = y$ to sum up the moment of inertia of these little elements up til the distance = $y$ to get the moment of inertia as a function of y
But I've never really understood this "procedure." Isn't $dI$ the infinitesimal $change$ in the moment of inertia function $I(y)$ for a change of $dy$ rather than the moment of inertia of this tiny element? Isn't what we should be trying to do is find the rate of change of $I(y)$ and integrate it w.r.t $y$ to the original function?
How can we just treat it as the moment of inertia of the tiny element and then sum these up using integration?