If I want to find the mass of a rod of length l and density $\rho = kx$ where $x$ is the distance from one end.
If I want to find the gravitational potential due to a hollow sphere at a distance x from the center
I want to know how to set up a Riemann sum for physics problems.
I know for a Riemann sum we need to sum up $\Sigma f(x_i)Δx$ from $i = 1$ to $∞$ where $Δx ->0$ turning this into an integral.
But I don't know how to set it up. For example, in the first part, I've tried $$M =\Sigma \Delta m =\Sigma (kx) \Delta x$$ where $\Delta x$ is a small(finite) length but I don't know how to set up the index and sum it from 0 to l