With what force will a mass $M$ distributed with uniform density over the circle $x^2 + y^2 = a^2$, $z = 0$ act on a mass $m$ located at the point $A(0,0,b)$.
I want to setup the problem as a line integral where $C:x^2+y^2 = a^2$. Parameterizing via $x = a \cos(\theta), y = a\sin(\theta)$
$$\int_C Fds = \int_{0}^{2\pi}\frac{Gm}{r^2}dM$$
The $r$ will always be $\sqrt{a^2+b^2}$. For a circle $dM = \frac{2\pi a}{M}ds = \frac{2\pi a}{M} a d\theta$. Thus resulting in:
$$\int_{0}^{2\pi} \frac{Gm}{a^2 + b^2}2\pi a^2 d\theta = \frac{4\pi^2a^2Gm}{a^2 + b^2}$$
Is this answer correct?
Update - Ok apparently the answer is $$ \frac{GMmb}{(a^2 + b^2)^{3/2}}$$
The force over mass $m$ at $(0, 0, b)$ by the mass $M$ uniformly distributed over the circle $r = a, z= 0$ can be written as,
$ \displaystyle \int_{0}^{2\pi}\frac{G \ m \cos\phi}{r^2} \ dM $
You missed $\cos\phi$ which is to consider force only along z-axis as the force along xy-plane will cancel out over the circle.
where $\cos\phi = \cfrac{b}{\sqrt{a^2+b^2}}$
$dM = \cfrac{M}{2\pi a} \ ds = \cfrac{M}{2\pi} \ d\theta$
So the integral is,
$ \cfrac{G \ m \ b}{(a^2+b^2)^{3/2}}\displaystyle \int_{0}^{2\pi} \cfrac{M}{2\pi} \ d\theta $
$ = \displaystyle \cfrac{G \ M \ m \ b}{(a^2+b^2)^{3/2}}$