1

How can I solve the transcendental equation:

$$\frac{\zeta'(\alpha)}{\zeta(\alpha)}=-\frac{1}{n}\sum_{i=1}^n\ln x_i,$$

where $\displaystyle\zeta(\alpha)=\sum_{m=1}^\infty m^{-\alpha}\;\;\;?$ The values $x_i \in \{1, 2, 3, ..., 63, 64\}$ are given so the solution we are looking for, is $\alpha^*$ that satisfies this equation. This equation is from Clauset's et al paper: "Power-law distributions in empirical data". In other words the problem is: Solve $\alpha$ that satisfies:

$$\frac{\zeta'(\alpha)}{\zeta(\alpha)}=C,$$

where $C$ is constant.

What methods / algorithms should I use? I've been told this should be solved numerically, but I don't explicitly know what method I should use. This equation arises from solving the parameters of discrete power-law distribution.

jjepsuomi
  • 8,619
  • @Winther I updated the post. We want to solve $\alpha$, that satisfies the equation. The $x_i$:s are given. You are right, I copied this formula exactly as it is in Clauset's et al power-law paper. – jjepsuomi Dec 15 '15 at 13:20
  • @Winther we are looking for the value of $\alpha$ that satisfies this relation. – jjepsuomi Dec 15 '15 at 13:22
  • @Winther okay, thank you. I will make my post more clear :) – jjepsuomi Dec 15 '15 at 13:26
  • 1
    Any root finding method would do, for example bisection, i.e. you solve $F(x) = 0$ where $F(x) = \frac{\zeta'(x)}{\zeta(x)} - C$. Since $\zeta'/\zeta$ is monotone on $(1,\infty)$ so there is only one real root for all $C<0$. – Winther Dec 15 '15 at 13:30
  • Thank you @Winther :) appreciate it, maybe you could post your comment as answer? – jjepsuomi Dec 15 '15 at 13:33
  • I'm on my way to work now, but if nobody has answered you when I get back I will write up some notes on how to do this. – Winther Dec 15 '15 at 13:34
  • Excellent, thank you very much! No hurry :) – jjepsuomi Dec 15 '15 at 13:36
  • What tools do you want to use? What kind of value do you expect $C$ to be? I would guess that the $x_i$s are all between $0$ and $1$ making $C$ positive, but I'm not certain. If so, the convexity of the function on $(0,1)$ indicates that Newton's method should work well. Thus, Mathematica's FindRoot should knock it out easily. Alternatively, Brent's method (which is implemented as Matlab's fzero and as Scipy's brentq) should work well, too. – Mark McClure Dec 15 '15 at 14:03
  • Hi @MarkMcClure Matlab is the environment where I'm doing my analysis. The values of $x_i$ are integers taking values from set: ${1, 2, 3, ..., 63, 64}$ :) Thank you! – jjepsuomi Dec 15 '15 at 14:20

1 Answers1

2

There are no analytical solution to your equation so you must use some numerical scheme. There are many methods to find roots of a function. The simplest one (and usually good enough for most purposes) are

  1. Bisection
  2. Newton's method / Secant method

I explained the bisection method and Newton's method in this answer. If you are to implement a root finding method yourself then I would suggest you start with bisection: it's the easiest one to implement and there is little that can go wrong (less chance for making mistakes).

If you are allowed to use mathematical software there are many built-in methods (implementing methods like the ones mentioned above). Always use built-in methods if you can. Below are some examples for how you can find a root of a function in some of the most common packages Matlab, Mathematica and Maple. The example is finding the root of $\sin(x)$ close to $x=x_0=3$ (which should give $x=\pi$).

Mathematica's FindRoot:

f     = Sin[x];
x0    = 3;
FindRoot[f[x] == 0, {x, x0}]

MatLab's fzero:

f     = @sin;
x0    = 3;
fzero(f, x0)

Maple's fsolve:

f    := sin(x);
fsolve(f = 0, x, 2..4);

For your spesific question: The function $-\frac{\zeta'(x)}{\zeta(x)}$ is positive and monotonely decreasing on $(1,\infty)$ and asymptotes to $0$ so the function $F(x) = -\frac{\zeta'(x)}{\zeta(x)}-C$ has only one root for any $C > 0$ (see plot below). Any of the methods mentioned above should work to find this root. Using the asymptotics of the $\zeta$-function we can derive approximate solutions for the roots in the limit $C\gg 1$ and $C\ll 1$.

Since $\zeta(x) \approx \frac{1}{x-1}$ close to $x=1$ we get that the root is approximately $$x \approx \frac{1}{C}~~~~~~\text{for}~~~~~~C\gg 1$$

For large $x$ we have $\zeta(x) \approx 1 + \frac{1}{2^x}$ which gives us that the root is approximately $$x \approx \frac{\log\left(\frac{1}{C}\right)}{\log(2)}~~~~~~\text{for}~~~~~~C\ll 1$$

Winther
  • 24,478
  • I have a problem with the numerical solution: I know how to evaluate $\zeta(z)$ effectively using Euler-Maclaurin summation or rational approximations. Do you know of a similar method for $\zeta'(z)$ (including error estimates)? – gammatester Dec 16 '15 at 11:49
  • @gammatester If you can calculate $\zeta$ then you can take numerical derivatives to get $\zeta'$. I would probably compute the function on a fine grid between $[1,X_{\rm max}]$ and then spline it up. From the spline you can easily extract derivatives (I have a c++ implementation of cubic splines here). It might be better to compute $(x-1)\zeta(x)$ (and $(x-1)\frac{\zeta'}{\zeta} = \frac{1}{\zeta}\frac{d[(x-1)\zeta]}{dx} - 1$) as this removes the singularity at $x=1$. – Winther Dec 16 '15 at 12:07
  • Thank you very much for the hints and links. In addition I would like some analytical expression. I just learned from http://math.stackexchange.com/questions/1576985/is-there-a-special-value-for-frac-zeta2-zeta2 that the logarithmic derivative can be computed with the von Mangold function $$\frac{\zeta'(s)}{\zeta(s)} = -\sum_{n>0} \Lambda(n) n^{-s}$$ And may be this form is also useful for the original question. – gammatester Dec 16 '15 at 12:27
  • Excellent answer! Thank you @Winther +1 – jjepsuomi Dec 16 '15 at 12:32
  • @gammatester I'm sure that would work fine, however I don't think its needed. If you are doing it numerically it does not matter that much what you use as long as you can ensure numerically accuracy. The mangold function is an extra complexity which will make it slower to compute and I don't think you will gain to much in accuracy. I would suggest to keep it as simple as possible: use a direct computation combined with asymptotical expressions (like for $x\gg 1$ and a Taylor series expansion close to $x=1$) and then use numerical derivatives. I'm sure that will be accurate enough. – Winther Dec 16 '15 at 13:25