Suppose we are given a rod of constant density $\rho$ and a particle of mass $m$. The distance of the particle from the rod is $d > 0$. Also, suppose $a < b$. What I want to achieve is to compute the gravitational pull between the particle and the part of the rod for which $x \in [a, b]$. We set the $x$-axis such that the closest point on the rod to the particle occurs at $x = 0$.
Below is my best attempt.
\begin{aligned} F &= \sum \frac{m \; \Delta m^\prime}{L(x)^2} \\ &= \sum \frac{m\rho \Delta x}{L(x)^2}, \end{aligned} where $L(x) = \sqrt{d^2 + x^2}$.
The above may (?) be interpretted as a Riemann integral, which leads us to \begin{aligned} F &= \int_a^b \frac{m\rho}{d^2 + x^2} \mathrm{d}x \\ &= \frac{m\rho}{d} \Bigg[ \arctan\Bigg(\frac{x}{d}\Bigg) \Bigg]_{x = a}^{x = b}. \end{aligned}
Now, if we take $a \rightarrow -\infty$ and $b \rightarrow \infty$, we have \begin{aligned} F &= \frac{m\rho}{d} \Bigg[ \frac{\pi}{2} - \Bigg( -\frac{\pi}{2} \Bigg) \Bigg] \\ &= \frac{\pi m\rho}{d}. \end{aligned}
Question: is that calculation correct? If $d \rightarrow 0+$, $F \rightarrow \infty$?