## Branching

Multiple kinds of branching here. First, the motorsport content has been moved to formula7.blog. Two blogs? Well, it became clear that my Stack Exchange activity, already on hiatus since 2018, is not going to resume (context: January 14, January 15, January 17). But typing words in boxes is still a hobby of mine.

There may be yet more branching in the knowledge market space, with Codidact and TopAnswers attempting to rise from the ashes of Stack Exchange. (I do not expect either project to have much success.)

Also, examples of branching in complex analysis are often limited to the situations where any two branches differ either by an additive constant like ${\log z}$ or by a multiplicative constant like ${z^p}$. But different branches can even have different branch sets. Consider the dilogarithm, which has a very nice power series in the unit disk:

${\displaystyle f(z) = \sum_{n=1}^\infty \frac{z^n}{n^2} = z + \frac{z^2}{4} + \frac{z^3}{9} + \frac{z^4}{16} + \cdots}$

The series even converges on the unit circle ${|z|=1}$, providing a continuous extension there. But this circle is also the boundary of the disk of convergence, so some singularity has to appear. And it does, at ${z=1}$. Going around this singularity and coming back to the unit disk, we suddenly see a function with a branch point at ${z=0}$, where there was no branching previously.

What gives? Consider the derivative:

${\displaystyle f'(z) = \sum_{n=1}^\infty \frac{z^{n-1}}{n} = -\frac{\log (1-z)}{z}}$

As long as the principal branch of logarithm is considered, there is no singularity at ${z}$ since ${\log(1-0) = 0}$ cancels the denominator. But once we move around ${z=1}$, the logarithm acquires a multiple of ${2\pi i }$, and so ${f'}$ gets an additional term ${cz^{-1}}$, and integrating that results in logarithmic branching at ${z=0}$.

Of course, this does not even begin the story of the dilogarithm, so I refer to Zagier’s expanded survey which has a few branch points itself.

Thus the dilogarithm is one of the simplest non-elementary functions one can imagine. It is also one of the strangest. It occurs not quite often enough, and in not quite an important enough way, to be included in the Valhalla of the great transcendental functions—the gamma function, Bessel and Legendre- functions, hypergeometric series, or Riemann’s zeta function. And yet it occurs too often, and in far too varied contexts, to be dismissed as a mere curiosity. First defined by Euler, it has been studied by some of the great mathematicians of the past—Abel, Lobachevsky, Kummer, and Ramanujan, to name just a few—and there is a whole book devoted to it. Almost all of its appearances in mathematics, and almost all the formulas relating to it, have something of the fantastical in them, as if this function alone among all others possessed a sense of humor.

## Lattice points in a disk

The closed disk of radius ${72}$ has area ${\pi \cdot 72^2\approx 16286}$. But it happens to contain only ${16241}$ points with integer coordinates. Here is a picture of one quarter of this disk.

The radius ${72}$ is somewhat notable is that the discrepancy of ${45}$ between the area and the number of integer points is unusually large. Here is the plot of the absolute value of the difference |area-points| as a function of integer radius ${n}$. The curve in red is ${y = 1.858 r^{0.745}}$, which is an experimentally found upper bound for the discrepancy in this range of ${n}$.

On the scale up to ${n=1000}$, the upper bound is ${4.902 r^{0.548}}$, and the radii bumping against this bound are ${449}$ and ${893}$. The exponent ${0.548}$ begins to resemble the conjectural ${0.5+\epsilon}$ in the Gauss circle problem.

Finally, over the interval ${1000\le n\le 3000}$ the upper bound comes out as ${6.607n^{0.517}}$. The exponent ${0.517}$ looks good.

This little numerical experiment in Matlab involved using the convex hull function convhull on log-log scale. The function identifies the vertices of the convex hull, which is a polygon. I pick the side of the polygon lying over the midpoint of the range; this yields a linear upper bound for the set of points. On the normal scale, this line becomes a power function. Matlab code is given below; it’s divided into three logical steps.

##### Find the difference between area and the number of lattice points
a = 1000;
b = 3000;
R = a:b;
E = [];
for n = a:b
[X,Y] = meshgrid(1:n, 1:n);
pts = 4*n + 1 + 4*nnz(X.^2+Y.^2<=n^2);
E = [E, max(1,abs(pts - pi*n^2))];
end
##### Pick a suitable side of log-log convex hull
ix = convhull(log(R), log(E));
k = numel(ix);
while (R(ix(k))<(a+b)/2)
k = k-1;
end
##### Plot the result and output the parameters of the upper bound
R1 = R(ix(k)); E1 = E(ix(k));
R2 = R(ix(k+1)); E2 = E(ix(k+1));
b = log(E1/E2)/log(R1/R2);
a = E1/R1^b;
plot(R, E, '.');
hold on
plot(R, a*R.^b , 'r-');
axis tight
hold off
fprintf('a = %.3f, b = %.3f\n', a, b);

## Structure of the 3n+1 stopping time

Returning to the stopping time of the ${3n+1}$ process (first part here):

Here is the plot of the stopping time embellished with a few logarithmic functions.

This structure is explained by looking at the number of ${3x+1}$ operations that a number experiences before reaching ${1}$.

No ${3x+1}$ operations. Such number are obviously of the form ${2^m}$, with stopping time ${m}$. These creates the points ${(2^m,m)}$ which lie on the curve ${y=\log_2 x}$.

One ${3x+1}$ operation. To find such numbers, follow their orbit backward: a series of multiplication by ${2}$, then ${(x-1)/3}$ operation, then more multiplications by ${2}$. This leads to numbers of the form ${2^n \dfrac{2^{m}-1}{3}}$ where ${m}$ must be even in order for ${2^m-1}$ to be divisible by ${3}$. The stopping time is ${n+m+1}$. Since ${2^n \dfrac{2^{m}-1}{3} \approx \dfrac{2^{n+m}}{3}}$, the corresponding points lie close to the curve ${y=1+\log_2(3x)}$. Also notice that unlike the preceding case, clusters appear: there may be multiple pairs ${(n,m)}$ with even ${m}$ and the same ${n+m}$. The larger the sum ${n+2m}$ is, the more such pairs occur.

Two ${3x+1}$ operations. Tracing the orbit backwards again, we find that these are numbers of the form

${2^p\dfrac{2^n \dfrac{2^{m}-1}{3} -1}{3}}$

It is straightforward to work out the conditions on ${(m,n)}$ which allow both divisions by ${3}$ to proceed. They are: either ${n}$ is odd and ${m \equiv 4 \mod 6}$, or ${n}$ is even and ${m\equiv 2 \mod 6}$. In any event, the stopping time is ${m+n+p+2}$ and the number itself is approximately ${2^{m+n+p}/9}$. On the above chart, these points lie near the curve ${y=2+\log_2(9x)}$. Clustering will be more prominent than in the previous case, because we now deal with triples ${(n,m,p)}$ that will be nearby each other if ${n+m+p}$ is the same.

k) ${k}$ operations of ${3x+1}$ kind. These yield the points near the curve ${y=k+\log_2(3^k x)}$, or, to put it another way, ${y=k\log_2 6+\log_2(x)}$. The plot above shows such curves for ${k=0,1,\dots,11}$.

## Express A in terms of B

It’s a long weekend here. Too nice to do Calculus. Let’s do pre-calculus instead.

Example: Express $\displaystyle \log\frac{1}{x^2}$ in terms of $\log x$.

The textbook (in its 13th edition) proceeds thus.

$\displaystyle \log\frac{1}{x^2}=\log x^{-2}=-2\log x$. Here we have assumed that $x>0$. Although $\log(1/x^2)$ is defined for $x\ne 0$, the expressions $-2\log x$ is defined only if $x>0$. Note that we do have $\displaystyle \log\frac{1}{x^2}=\log x^{-2}=-2\log |x|$ for all $x\ne 0$.

This leaves me doubly confused. Which of two answers is a student supposed to give? And what does “express A in terms of B” really mean?

Concerning the latter, I can only suppose it means: exhibit a function $F$ such that $A=F\circ B$ (using the composition notation, since $A$ and $B$ are functions themselves). With this interpretation, the correct answer should be: it is impossible to express $\displaystyle \log\frac{1}{x^2}$ in terms of $\log x$.