Is there a way to invert the Stieltjes transform of a discrete distribution in Mathematica? IE, given $g(u)=\sum_{i=1}^\infty f(i) \frac{1}{u-f(i)}$, obtain $f(i)$
ClearAll["Global`*"];
f = x^-2;
g = Sum[ f/(u - f), {x, 1, \[Infinity]}] (* (Sqrt[u] - \[Pi] Cot[\[Pi]/Sqrt[u]])/(2 Sqrt[u]) *)
For a continuous distribution, the recipe is given by JimB here
Edit
it seems possible to invert by following the recipe here if there were a way to get all the singularities of $g$
ClearAll["Global`*"];
f = x^-2;
g = Sum[f/(u - f), {x,
1, \[Infinity]}] (*(Sqrt[u]-\[Pi] Cot[\[Pi]/Sqrt[u]])/(2 Sqrt[u])*)
singularities = Table[1/i^2, {i, 1, 10}];
Print["f=", f];
Print["g=", g];
Table[Residue[g, {u, u0}]/u0, {u0, singularities}]
f(i)if you know the singularities of g. But that's kind of obvious already, because the singularities are exactly thef(i)`. (3) You can isolate poles by rectangular subdivision, and use that to find all in some given rectangular range. – Daniel Lichtblau Jun 27 '23 at 18:21