I'm currently trying to figure out a 3D function which follows the "inverse square law" along any given ray drawn from 0,0,0 coordinates, but whose -inf..inf integral over all arguments converges.
Such function is great, but it does not converge: $$\frac{1}{1+x^2+y^2+z^2}$$
The closest function that converges I've found is: $$\frac{1}{1+(x^2+y^2+z^2)^2}$$ But it's "inverse quad law" or something.
Not sure it's possible to find such function, but asking won't hurt I guess...
I don't know about the general case, but if you want your function to be of the form $f(r)$ with $r=\sqrt{x^2+y^2+z^2}$, then it's not possible. Proof:
$$ \int_{\mathbb{R}^3} F(x, y, z) = 4\pi \int_0^\infty f(r)r^2\ dr $$
If you want this to converge, then $f(r)r^2$ must go as $r^{-(1+p)}$, with $p>0$. But this implies that $f(r)$ must go as $r^{-(3+p)}$.