# Justify scalar for a weighted integral.

A thin open cylindrical shell of mass $M$ and length $2s$ and circular section radius $r$ lies with its axis along the $x-$axis, centred at $x=0$, extending from $x=-s$ to $x=+s$. I wish to calculate the gravitational effect of the cylinder mass on a target particle of mass $\mu$ at position $x=d$ remote from the shell.

I can divide the shell into $N$ identical, very narrow circular rings whose radii are perpendicular to the $x-$axis and whose unspecified widths and masses are $\delta x$ and $\delta m$. It follows that $\delta x = 2s/N$, $\delta m = M/N$ and $\delta m /\delta x = M/2s$.

The net gravitational force on the target due to a single ring$(i)$ is directed along $x$ towards the cylinder and has magnitude $\delta m .g_i$. Here $g_i$ is the magnitude of the net force exerted on the target by a ring $i$ of unit mass.The formula for $g_i$ , is, I think, not important for this question, but for completeness is given by:- $$g_i = \frac{K.1.\mu}{l_i^2}*\frac{(d-x_i)}{l_i}$$ where $K$ is a constant and $l_i =\sqrt{(d-x_i)^2+r^2}$ is the slant distance from any point on ring$_i$ to the target.

The magnitude of the total force $F$ exerted by the cylinder on the target can be approximated by a discrete sum:- $$F = \sum_{i=1}^{N} \delta m. g_i.$$

Next I wish to obtain an integral expression (which can subsequently be solved to give an exact formula for the gravitational force in terms of $M$ and $s$). Please note that my question is about the formulation of the integral expression, not about it's solution.

My (limited) intuition suggests the following integral formula obtained by taking the constant value $\delta m$ outside the integral:-

$$F = \delta m * \int_{-s}^{+s} g(x) \text{d}x.$$

But that is unsatisfactory because $\delta m$ is unspecific. Instead I have obtained the following integral expression which seems, to me, to be appropriate because (a) it is specific and (b) it gives reasonable-looking answers:- $$F = \frac{M}{2s}\int_{-s}^{+s} g(x) \text{d}x.$$ The constant scalar term $\frac{M}{2s}$ is equivalent to $\delta m/\delta x$ but I don't know how to justify (in mathematical terms) using it in this position.

Please (assuming it is correct) could someone provide such a mathematical justification?

Yes, your final expression seems correct. Your penultimate expression, though, where you just took $\delta m_i$ outside an integral over $x$, is not correct.
This is a common procedure in converting physical problems into a mathematical expression: setting up an integral as a sum of differentially small contributions. The key step is converting the discrete sum over mass elements $\delta m_i$ into a sum over position elements $\delta x_i$, which then becomes an integral over $x$: $$F = \sum_{i=1}^N \delta m_i g_i = \sum_{i=1}^N \frac{\delta m}{\delta x} \delta x_i \, g_i$$ You already wrote the necessary relation $$\frac{\delta m}{\delta x} \rightarrow \frac{d m}{d x} = \frac{M}{2s}$$ and we can write $g_i=g(x_i)$, so the sum becomes $$F = \sum_{i=1}^N \left(\frac{M}{2s}\right) \delta x \, g(x_i) = \int_{-s}^s \left(\frac{M}{2s}\right) \, g(x) \, dx$$ since we can take all the intervals $\delta x$ to be the same. This is the definition of a Riemann integral, involving the limit $\delta x\rightarrow 0$. In this particular case, the derivative $dm/dx=(M/2s)$ is a constant and can be taken outside the integral, leaving you to tackle $\int_{-s}^s g(x) dx$. In more general cases, the conversion from $\delta m$ to $\delta x$ might give you a derivative $dm/dx$ which is a function of $x$, in which case you would have to keep it inside the integral.