Exercise 12.5 from *Modern Condensed Matter Physics* (Girvin and Yang, 2019) asks to construct a Gaussian wave packet in the lowest Landau level in the Landau gauge, such that it is localized as closely as possible around some point $\mbf R\ceq\p{R_x,R_y}$.

Actually, we can prove that the smallest wave packet is a Gaussian wave packet. Here is the derivation.

First, for readers who are not familiar with the Landau levels, here is a brief introduction. For an electron confined in the $xy$ plane under a magnetic field $\mbf B=B\bhat z$, its Hamiltonian is $H=\fr1{2m_e}\p{p_x^2+\p{p_y-\fr{eB}cx}^2}$ under the Landau gauge $\mbf A=Bx\bhat y$. Its eigenstates in the position representation are $\fc{\psi_{nk}}{x,y}=\e^{\i ky}\fc{H_n}{\fr xl-kl} \e^{-\p{x-kl^2}^2/2l^2}$ labeled by $n\in\bN$ and $k\in\bR$, where $H_n$ is the Hermite polynomial of degree $n$ and $l\ceq\sqrt{\hbar c/eB}$. States with the same $n$ are degenerate in energy ($E_n=\p{n+1/2}\hbar eB/m_ec$) and make up the $n$th Landau level. The Landau level with $n=0$ is called the lowest Landau level.

The problem, now, is this optimization problem: $\begin{align*} \min_{a_k}\quad&\mel{\Psi}{x^2+y^2}{\Psi}\\ \st\quad&\braket{\Psi}{\Psi}=1,\\ &\mel{\Psi}{x}{\Psi}=R_x,\\ &\mel{\Psi}{y}{\Psi}=R_y \end{align*}$ (optimizing $\a{x^2+y^2}$ is equivalent to optimizing $\sgm_x^2+\sgm_y^2$ because $\a x$ and $\a y$ are both fixed), where $\ket\Psi$ is defined as the state whose position representation is $\fc\Psi{x,y}=\int\d k\,a_k\e^{\i ky}\e^{-\p{x-kl^2}^2/2l^2}.$

Consider the moment-generating function $\begin{align*} \fc M{u,v}&\ceq\mel{\Psi}{\e^{ux+vy}}{\Psi}\\ &=\iint\d x\d y\,\e^{ux+vy} \int\d k\,a_k^*\e^{-\i ky}\e^{-\fr1{2l^2}\p{x-kl^2}^2} \int\d k'\,a_{k'}\e^{\i k'y}\e^{-\fr1{2l^2}\p{x-k'l^2}^2}\\ &=\iint\d k\d k'\,a_k^*a_{k'}\int\d x\,\e^{ ux-\fr1{2l^2}\p{x-kl^2}^2-\fr1{2l^2}\p{x-k'l^2}^2 }\underbrace{\int\d y\,\fc\exp{vy+\i\p{k'-k}y}}_{2\pi\fc\dlt{k'-k-\i v}}\\ &=2\pi\int\d k\,a_k^*a_{k+\i v}\underbrace{\int\d x\,\fc\exp{ ux-\fr1{2l^2}\p{x-kl^2}^2-\fr1{2l^2}\p{x-\p{k+\i v}l^2}^2 }}_{l\sqrt\pi\fc\exp{\fr14l^2\p{4ku+u^2+2\i uv+v^2}}}\\ &=2\pi^{3/2}l\fc\exp{\fr14l^2\p{u^2+2\i uv+v^2}} \int\d k\,a_k^*a_{k+\i v}\e^{kl^2u}\\ &=2\pi^{3/2}l\int\d k\,a_k^*\left( a_k+kl^2a_ku+\i a_k'v+\fr14l^2\p{1+2k^2l^2}a_ku^2 \right.\\&\qquad\qquad\qquad\qquad\left. {}+\fr14\p{l^2a_k-2a_k''}v^2 +\fr\i2l^2\p{a_k+2ka_k'}uv+\cdots \right), \end{align*}$ where $a_k'\ceq\d a_k/\d k$ and $a_k''\ceq\d^2a_k/\d k^2$. On the other hand, we have $\fc M{u,v}=\mel{\Psi}{1+ux+uy+\fr12u^2x^2+\fr12v^2y^2+uvxy+\cdots}{\Psi}.$ Compare the expansion coefficients, and we have $\begin{align*} \braket{\Psi}{\Psi}&=2\pi^{3/2}l\int\d k\,a_k^*a_k,\\ \mel{\Psi}{x}{\Psi}&=2\pi^{3/2}l^3\int\d k\,a_k^*ka_k,\\ \mel{\Psi}{y}{\Psi}&=2\i\pi^{3/2}l\int\d k\,a_k^*a_k',\\ \mel{\Psi}{x^2}{\Psi}&=\fr12\pi^{3/2}l^3\int\d k\,a_k^*\p{1+2k^2l^2}a_k,\\ \mel{\Psi}{y^2}{\Psi}&=\fr12\pi^{3/2}l\int\d k\,a_k^*\p{l^2-2a_k''}a_k. \end{align*}$

Define $\fc\vphi k\ceq a_k\sqrt{2\pi^{3/2}l}$. Define fictitious position and momentum operators acting on $\vphi$ as $\Xi\vphi:k\mapsto k\fc\vphi k,\quad \Pi\vphi:k\mapsto-\i\fc{\vphi'}k.$ Using the constraints of the original optimization problem and abusing the bra–ket notation on $\vphi$, we have $\braket{\vphi}{\vphi}=1,\quad\mel\vphi\Xi\vphi=\fr{R_x}{l^2},\quad \mel\vphi\Pi\vphi=-R_y.$ The objective function then becomes $\mel{\Psi}{x^2+y^2}{\Psi}=\fr12l^2+\mel{\vphi}{\mcal H}{\vphi},$ where $\mcal H\ceq \Pi^2/2+l^4\Xi^2/2$ is a fictitious Hamiltonian, which is the Hamiltonian of a harmonic oscillator with mass $1$ and angular frequency $\omg\ceq l^2$.

The optimization problem can now be re-stated in terms of $\ket\vphi$ as $\begin{align*} \min_{\ket\vphi}\quad&\mel\vphi{\mcal H}{\vphi}\\ \st\quad&\braket\vphi\vphi=1,\quad\mel\vphi\Xi\vphi=R_x/\omg,\quad\mel\vphi\Pi\vphi=-R_y. \end{align*}$ Physically, this means that we want to find the state of a harmonic oscillator with the given expectation values of position and momentum and the lowest energy. To find it, we can use Hisenberg’s uncertainty principle: $\begin{align*} \a{\mcal H}&=\fr12\a{\Pi^2}+\fr12\omg^2\a{\Xi^2}\\ &=\fr12\p{\a\Pi^2+\sgm_\Pi^2}+\fr12\omg^2\p{\a{\Xi^2}+\sgm_\Xi^2}\\ &=\fr12\sgm_\Pi^2+\fr12\omg^2\sgm_\Xi^2+\fr12R_y^2+\fr12 R_x^2\\ &\ge\omg\sgm_\Pi\sgm_\Xi+\fr12R^2 \ge\fr12\omg+\fr12R^2. \end{align*}$ The equality in the first “$\ge$” is achieved when $\sgm_\Pi=\omg\sgm_\Xi$, and that in the second “$\ge$” is achieved when the uncertainty principle is saturated. As we know from quantum mechanics, the coherent state of a harmonic oscillator satisfies both conditions. The wavefunction of this state is $\fc\vphi k=\p{\fr\omg\pi}^{1/4} \fc\exp{-\fr12\omg\p{k-\fr{R_x}{\omg}}^2-\i R_yk}.$ Express the final result in terms of $a_k$: $a_k=\fr1{\sqrt2\pi}\e^{-\i kR_y}\e^{-\fr1{2l^2}\p{R_x-kl^2}^2}.$ We may work out the integral to get the wave function of the wave packet: $\fc{\Psi}{x,y}=\fr1{\sqrt{2\pi}l}\fc\exp{-\fr1{4l^2}\p{ \p{x-R_x}^2+\p{y-R_y}^2-2\i\p{x+R_x}\p{y-R_y} }}.$ This is a Gaussian wave packet centered at $\mbf R$ with covariance matrix $\opc{Diag}{l^2,l^2}$.

The optimal wave packet is indeed Gaussian. This makes me curious about whether this is a coincidence or not.

Another thing worth noting is that this result is actually the Dirac delta wave function peaking at $\mbf R$ projected into the lowest Landau level. This was actually my first idea to solve the problem. I was like: well, isn’t the Dirac delta the smallest possible wave packet by all means? If the basis is complete, I can surely combine them into a Dirac delta, and it would be very easy to work out $a_k$ in this case. Then, I was like: nah, merely a single Landau level is not complete, so I cannot do that anyway. I then did not even bother to proceed with this approach and went on to trying other methods. It turns out that this approach is actually correct—at least it gives the same result as the correct approach.

]]>The unit system used in this article is Hartree atomic units: $m_\mrm e=k_\mrm B=\hbar=4\pi\veps_0=e=1$, where $m_\mrm e$ is the electron mass.

In this unit system, the Bohr radius is $a_\mrm B=1$, which is of angstrom order. Therefore, I will use $10^{10}$ as the order of macroscopic lengths. The Rydberg unit of energy is $\mrm{Ry}=1/2$, which is of electronvolt order. Therefore, I will use $10^3$ as the order of inverse room temperature.

One can adjust the units to get results for the cases of other hydrogen-like atoms: use $Z^2/4\pi\veps_0=1$ instead of $4\pi\veps_0=1$, where $Z$ is the atomic number.

In this article, I also assume that the mass of the nucleus is infinite. If you want more accuracy, you can use $m_\mrm Nm_\mrm e/\p{m_\mrm N+m_\mrm e}=1$ instead of $m_\mrm e=1$, where $m_\mrm N$ is the mass of the nucleus.

I will mainly be working with the inverse temperature $\beta\ceq1/k_\mrm BT$, where $T$ is the temperature. However, I will still use “temperature” often to give some physical intuition. To avoid confusion in the context of using $\beta$ and in appearance of negative temperature, I would avoid using phrases like “high temperature” and “low temperature”. Instead, here are some terminologies that I am going to use:

- “Cold (positive) temperature” means $\beta\to+\infty$.
- “Hot positive temperature” means $\beta\to0^+$.
- “Cold negative temperature” means $\beta\to0^-$.
- “Hot negative temperature” means $\beta\to-\infty$.

The energy levels of a hydrogen atom are (ignoring fine structures etc.) $E_n=-1/2n^2$, with each energy level labeled by $n\in\bZ^+$, and each energy level has $g_n\ceq n^2$ degeneracy (ignoring spin degeneracy, which merely contributes to an overall factor of the partition function). The partition function is $\fc Z\beta\ceq\sum_{n=1}^\infty g_n\e^{-\beta E_n} =\sum_{n=1}^\infty n^2\e^{\beta/2n^2},$$\p{1}$ which diverges for any $\beta\in\bC$ (of course, normally we can only have $\beta\in\bR$, but the point of saying that it diverges for any complex $\beta$ is that there is no way we can analytically continue the function to get a finite result). Does this mean that statistical mechanics breaks down for this system? Not necessarily. Actually, there are multiple ways we can tackle this divergence.

One should notice that, although this article concentrates on regularizing partition functions and that of the hydrogen atom in particular, all the methods are valid for more general divergent sums.

Here is a sentence that is quoted by many literatures on diverging series, so I want to quote it, too:

It translates to “Divergent series are in general deadly, and it is shameful that anyone dare to base any proof on them.”

A physicist always tell you that one should not be afraid of infinities. Instead, one should look at where the infinity comes out from the seemingly physical model, where there is something sneakily unphysical which ultimately leads to this unphysical divergence. In our case, the divergence comes from high energy levels. It is then a good time to question whether those high energy levels are physical.

There is a radius associated with each energy level in the sense of the Bohr model: $r_n=n^2$. When $r_n\sim L\ceq10^{10}$ (which happens at $n\sim\Lmd\ceq10^5$), the orbit is really microscopic now, and the interaction between the electron and the “box” that contains the whole experimental setup is now having significant effects. Or, if there is not a box at all, we can use the size of the universe instead, which is about $r_n\sim L\ceq10^{36}$ ($\Lmd\ceq10^{18}$). Use the model of particle in a box for energy levels higher than $n=\Lmd$, and we have $Z=\sum_{n=1}^\Lmd n^2\e^{\beta/2n^2} +\sum_{n_x,n_y,n_z=1}^\infty\fc\exp{-\beta\fr{\p{n_x^2+n_y^2+n_z^2}\pi^2}{2L^2}},$ where $L$ is the side length of the box (assuming that the box is cubic). If $L$ is very large, we can approximate the second term as a spherically symmetric integral over the first octant to get $L^3\p{2\pi\beta}^{-3/2}$.

This is actually the result for Boltzmann ideal gas, so it should be familar, but I still write down the calculation here for completeness.

We can approximate $\sum_{n_x,n_y,n_z=1}^\infty\fc\exp{-\beta\fr{\p{n_x^2+n_y^2+n_z^2}\pi^2}{2L^2}} \approx I\ceq\int_0^\infty\d^3n\,\fc\exp{-\beta\fr{\p{n_x^2+n_y^2+n_z^2}\pi^2}{2L^2}},$ where $\int_0^\infty\d^3n$ means $\int_0^\infty\int_0^\infty\int_0^\infty\d n_x\,\d n_y\,\d n_z$. We can then change the integral to spherical coordinates: $I=\int_0^\infty\fr184\pi n^2\,\d n\,\fc\exp{-\beta\fr{n^2\pi^2}{2L^2}} =\fr{L^3}{4\pi^2\beta^{3/2}}\int_{-\infty}^\infty\d n\,n^2\e^{-n^2/2},$ where the factor of $1/8$ is because we only integrate in the first octant, and the second step utilizes the symmetry of the integrand and redefines the integrated variable. This integral is than a familiar Gaussian integral of order unity. The value of it is not important for later discussion because all the arguments that follow only uses orders of magnitude, but I tell you it is $\sqrt{2\pi}$, which can be evaluated by integrating by parts once and utilizing the famous $\int_{-\infty}^{\infty}\e^{-n^2/2}\,\d n=\sqrt{2\pi}$. The final result is $I=L^3\p{2\pi\beta}^{-3/2}$.

Is this an overestimation or underestimation? It is actually an overestimation. Draw a picture of $\e^{-n^2/2}$ to convince yourself of this. We do not need to estimate how large the error is, though, because we will see that we only need an upper bound to get the arguments we need.

For the first term, we need to consider how the magnitude of the summand changes with $n$. The minimum value of the summand is at $n=\sqrt{\beta/2}$. At room temperature, we have $\beta\sim10^3$, so $\sqrt{\beta/2}$ is well between $1$ and $\Lmd$. Therefore, the largest term is either $n=1$ or $n=\Lmd$. The former is $\e^{\beta/2}$, which is of order $10^{217}$, while the latter is $\Lmd^2$, which is of order $10^{36}$ for the case of the size of the universe. We may then be interested in the $n=2$ term $4\e^{\beta/8}$, which is of order $10^{54}$. This is much larger than the $n=\Lmd$ term but much smaller than the $n=1$ term, so it is second largest term in the sum.

An upper bound of the summation is given by replacing every term except the largest term by the second largest term, which gives $Z<\underbrace{\e^{\beta/2}}_{10^{217}} +\underbrace{\p{\Lmd-1}4\e^{\beta/8}}_{10^{72}}+\underbrace{L^3\p{2\pi\beta}^{-3/2}}_{10^{48}}\approx\e^{\beta/2}.$ Therefore, the $n=1$ term dominates the entire partition function. This means that the hydrogen atom is extremely likely to be in the ground state (despite the seeming divergence of the partition function). This is intuitive. The probability of the system not being in the ground state is of order $10^{-55}$ for the size of the universe and $10^{-158}$ for a typical macroscopic experiment.

The usage of the model of particle in a box for energy levels $n>\Lmd$ gives good enough arguments and results, but one may want to question whether this is appropriate.

What happens if you actually put a hydrogen atom in a box (for simplicity, make the box spherically symmetric)? More accurately, consider the quantum mechanical problem in spherically symmetric potential $V$ such that $V\sim-r^{-1}$ for small $r$ but grows fast and high enough at large $r$ so that the partition function for bound states is convergent. This is called a confined hydrogen atom. A book chapter The Confined Hydrogen Atom Revisited discusses this problem in detail and cited several papers that did the calculations about the energy levels.

By analyzing the orders of magnitude, we see that we actually do not lose much if we just simply cut off the sum at $n=\Lmd$. This corresponds to a regularization method called the simple cutoff: it replaces the infinite sum by a finite partial sum. This can be generalized a little by considering a more general cutoff function $\chi$ such that $\lim_{x\to0^+}\fc \chi x=1$. Then, an infinite sum $\sum_{n=1}^\infty\fc fn$ can be written as $\sum_{n=1}^\infty\fc fn=\lim_{\lmd\to0^+}\sum_{n=1}^\infty\fc fn\fc\chi{\lmd n}.$ The simple cutoff is then the case where $\fc \chi x\ceq\fc\tht{1-x}$ and $\lmd\ceq1/\Lmd$, where $\tht$ is the Heaviside step function. For converging series, this gives the same result as the original sum thanks to the dominated convergence theorem.

For diverging series, this may give a finite result. For example, for $\fc fn\ceq\p{-1}^nn^k$, this method gives $-\fc\eta{-k}$ for any complex $k$ and any smooth enough $\chi$, where $\eta$ is the Dirichlet eta function. Here is a check for the special case $\fc\chi x\ceq\e^{-x}$ (equivalent to the Abel summation). By definition of the polylogarithm, we have $\sum_{n=1}^\infty\p{-1}^nn^k\e^{-\lmd n}=\fc{\mrm{Li}_{-k}}{-\e^{-\lmd}}.$ Now, substitute $\lmd=0$, and utilizing the identity $\fc{\mrm{Li}_s}{-1}=-\fc\eta s$, we have the result $-\fc\eta{-k}$.

You may wonder what is the case for $\fc fn\ceq n^k$, which is also a diverging series, and it looks much like the case above. However, the limit at $\lmd\to0^+$ simply does not exist when $\Re k\ge-1$ (i.e., when the series diverges). This is because we have $\fc{\mrm{Li}_s}1=\fc\zeta s$ only for $\Re s>1$, where $\zeta$ is the Riemann zeta function, but it is undefined for other values of $s$. If you analytically continue the result, you will get the famous Rieman zeta function.

However, although this series may converge for any positive $\lmd$, the limit as $\lmd\to0^+$ may not exist. If it diverges because $\fc fn$ grows too fast (or decays too slowly) as $n\to\infty$, then we should expect that the sum also tends to infinity as $\lmd\to0^+$. Assume that we can characterize this divergence by a Laurent series: $\sum_{n=1}^\infty\fc fn\fc\chi{\lmd n} =\sum_{k=-\infty}^\infty\gma_k\lmd^k.$$\p{2}$ If the $\lmd\to0^+$ limit converge, we would expect $\gma_{k<0}$ to be zero, and then the result is simply $\gma_0$. Therefore, we may also want only $\gma_0$ when the limit does not exist. To pick out $\gma_0$, utilize the residue theorem: $\sum_{n=1}^\infty\fc fn=\fr1{2\pi\i}\oint\fr{\d\lmd}\lmd \sum_{n=1}^\infty\fc fn\fc\chi{\lmd n},$$\p{3}$ where the domain of $\lmd$ is now analytically continued from $\bR^+$ to a deleted neighborhood of $0$. Equation 3 is then a generalized version of Equation 2.

Notice that I have been super slippery in math in the discussion. For example, the Laurent series may not exist at all, and the analytic continuation may not be possible at all; even if they exist, the $\lmd\to0^+$ limit may also be different from $\gma_0$. However, I may claim that we should be able to select smooth enough $\chi$ for all of these to work, and the results will be independent of the choice of $\chi$ as long as Equation 3 works in this form.

Particularly, one can rigorously prove that for $\fc fn\ceq n^k$, the sum obtained by this precedure is $\fc\zeta{-k}$, where $\zeta$ is the Riemann zeta function, as long as $x^k\fc\chi x$ has bounded $\p{k+2}$th derivative and the sum converges. This is proven in an interesting blog article.

In some cases, one may discover that $\sum_n\fc fn\fc\chi{\lmd n}$ is not analytic when $\lmd\to0^+$ so that the Laurent series expansion is not possible. An example is $E_n\ceq\ln\ln n$ (for $n\ge2$) with no degeneracies (this system also has a diverging partition function for any complex $\beta$). In this case, if you try to use the cutoff function $\fc\chi x\ceq\e^{-x}$, the sum goes like $\p{-\ln\lmd}^{-\beta}/\lmd$ instead of analytically when $\lmd\to0^+$. Proving this is simple. We have $Z_\lmd=\sum_{n=2}^\infty\e^{-\lmd n}\p{\ln n}^{-\beta} \approx\int_2^\infty\e^{-\lmd n}\p{\ln n}^{-\beta}\d n =\fr1{\lmd\p{-\ln\lmd}^\beta}\int_{2\lmd}^\infty \fr{\e^{-x}\,\d x}{\p{1-\ln x/\ln\lmd}^\beta},$ where the last step uses the substitution $x\ceq\lmd n$. Using the binomial theorem, we have $Z_\lmd\approx\fr1{\lmd\p{-\ln\lmd}^\beta}\int_{2\lmd}^\infty\d x\,\e^{-x} \sum_{k=0}^\infty\binom{-\beta}k\p{\fr{\ln x}{-\ln\lmd}}^k,$ where $\binom{-\beta}k$ is the binomial coefficient. Note that $\fc{\Gma^{\p k}}z=\int_0^\infty x^{k-1}\p{\ln x}^k\e^{-zx}\d x$, where $\Gma^{\p k}$ is the $k$th derivative to the Euler Gamma function, so the integral for $x$ gives a factor $\fc{\Gma^{\p k}}1$ in the limit of $\lmd\to0^+$. Therefore, $Z_\lmd\approx\fr1{\lmd\p{-\ln\lmd}^\beta},$ where only the $k=0$ term in the sum is retained for the leading contribution as $\lmd\to0^+$.

However, for any $k\in\bZ^+$, one can always choose functions $h,\chi$ so that the sum $\sum_n\fc fn\fc\chi{\lmd\fc hn}$ goes like $\lmd^{-k}$ as $\lmd\to0^+$. For example, for $\fc\chi x\ceq\e^{-x}$ (equivalent to the Abelian mean or the heat-kernel regularization), we have $Z_\lmd\approx\int_{n_0}^\infty\e^{-\lmd\fc hn}\fc fn\d n =\int_{\lmd\fc f{n_0}}^\infty\e^{-x}\fc f{\fc{h^{-1}}{\fr x\lmd}}\fr{\d x}{\lmd\fc{h'}{\fc{h^{-1}}{\fr x\lmd}}}.$ We can choose $\fc hn\ceq\p{\int\fc fn\d n}^{1/k}$ so that $\fc f{\fc{h^{-1}}{\fr x\lmd}}=k\p{\fr x\lmd}^{k-1}\fc{h'}{\fc{h^{-1}}{\fr x\lmd}}.$ Therefore, as $\lmd\to0^+$, we have $Z_\lmd\approx\fr1\lmd\int_{\lmd\fc f{n_0}}^\infty\e^{-x}k\p{\fr x\lmd}^{k-1}\,\d x\approx\fr{k!}{\lmd^k}.$ However, this does not guarantee that the Laurent series expansion exists. This is a good trial, though. My math capacity does not allow me to confirm whether this is the case for the example of $E_n\ceq\ln\ln n$.

After saying so much about cutoff regularization in general, what does it say about the partition function of a hydrogen atom? Try multiplying the cutoff function $\fc\chi{\lmd n}$ to the summand in Equation 1: $Z_\lmd\ceq\sum_{n=1}^\infty n^2\e^{\beta/2n^2}\fc\chi{\lmd n} =\sum_{k=0}^\infty\fr{\p{\beta/2}^k}{k!}\sum_{n=1}^\infty n^{2-2k}\fc\chi{\lmd n} \to\sum_{k=0}^\infty\fr{\p{\beta/2}^k}{k!}\fc\zeta{2k-2},$$\p{4}$ where the last step utilizes the result for $\fc fn\ceq n^k$, with which we get rid of the dependence on $\lmd$. The last expression is then identified as $Z$.

Now that we get the expression of $Z$, we can get some useful things. However, this time we cannot simply use the summand divided by $Z$ to get the probability of each energy level because that will break the normalization of the probability distribution. What we can do, however, is to find the expectation value of the energy using $\a E=-\d\ln Z/\d\beta$. On the other hand, we have $\a E\le p_1E_1+\p{1-p_1}E_\infty=-p_1/2$, so the probability $1-p_1$ that the system is not in the ground state is bounded above by $2\a E+1$.

The first check to do is to verify that this result is consistent with the known behavior of the system at cold zero temperature, where the system is almost certainly in the ground state; in other words, $\lim_{\beta\to+\infty}\a E=-1/2$. To get $Z$ for large $\beta$, we notice that $\fc\zeta{+\infty}=1$, so $Z\approx\e^{\beta/2}$, and this leads to $\a E\approx-1/2$ as expected.

Now, we may try to estimate $\a E$ for finite but large $\beta$ (e.g., $\beta=10^3$) and thus give an upper bound for $1-p_1$. We can study the asymptotic behavior of $\a E$ for cold positive temperature. It turns out that $1-p_1\approx3\e^{-3\beta/8}$, which is $10^{-163}$ for $\beta=10^3$. As we can see, without any physical arguments but only with regularization, we get a result that seems sensible and well between the results in the last section for a hydrogen atom confined in a box with a typical macroscopic size or the size of the universe.

We have $Z=\sum_{k=0}^\infty\fr{\p{\beta/2}^k}{k!}\fc\zeta{2k-2},\quad \fr{\d Z}{\d\beta}=\fr12\sum_{k=0}^\infty\fr{\p{\beta/2}^k}{k!}\fc\zeta{2k}.$ Therefore, $Z-2\fr{\d Z}{\d\beta}=\sum_{k=0}^\infty\fr{\p{\beta/2}^k}{k!} \p{\fc\zeta{2k-2}-\fc\zeta{2k}}.$ We can try to find the asymptotic behavior of the coefficient of each term. We have $\fc\zeta{2k-2}-\fc\zeta{2k}=\sum_{n=1}^\infty\p{\fr1{n^{2k-2}}-\fr1{n^{2k}}} =\sum_{n=1}^\infty\fr{n^2-1}{n^{2k}} =\fr{3}{2^{2k}}+\O{\fr1{3^{2k}}}.$ We also have $\fc\zeta{2k-2}=1+\O{2^{-2k}}$, of course. Therefore, $1-p_1\le2\a E+1=\fr{Z-2\d Z/\d\beta}Z =\fr{\sum_k\fr{\p{\beta/2}^k}{k!}\p{\fr3{2^{2k}}+\O{\fr1{3^{2k}}}}}{\sum_k\fr{\p{\beta/2}^k}{k!}\p{1+\O{\fr1{2^{2k}}}}}.$ These power series are then simply exponential functions. Therefore, $1-p_1\le\fr{3\e^{\beta/8}+\O{\e^{\beta/18}}}{\e^{\beta/2}+\O{\e^{\beta/8}}} =3\e^{-3\beta/8}+\O{\e^{-4\beta/9}}.$$\p{5}$

Although the asymptotic behavior at cold temperature ($\beta\to+\infty$) looks good, its behavior is very wrong at some regimes. At some temperature, the monoticity of $\a E$ reverts, and then it gets even lower than the ground state energy $-1/2$ and heads all the way to $-\infty$ at some finite temperature.This is clearly unphysical. This suggests that it is wrong to use the regularized result.

Here is a plot that shows how $\a E$ starts to decrease with temperature at some point and becomes even lower than the ground state energy:

Here is a plot that shows how $\a E$ goes to infinity at different temperatures:

Here are also plots for $Z$ and $\d Z/\d\beta$, if you are curious:

The two vertical asymptotes of $\a E$ corresponds to the two zeros of $Z$, which are $\beta=0$ and $\beta=1.0721$. It also has a zero, correponding to the zero of $\d Z/\d\beta$ at $\beta=0.5530$. The point where $\a E=-1/2$ is $\beta=11.2486$, and the point where $\a E$ has a local maximum is $\beta=13.8021$.

Another aspect where we can see that this result is wrong is that, if we look at the hot negative temperature limit $\beta\to-\infty$, although we have $\a E\to0=\sup_nE_n$ as expected, it is approaching from the wrong side. In fact, because $Z>0$ while $\d Z/\d\beta<0$ for $\beta<0$, we have $\a E>0$ for $\beta<0$, exceeding the supremum of the energy levels, which is unphysical.

Here is a non-rigorous derivation. We can rewrite the regularized $Z$ in a similar form as $\begin{align*} Z&=-\fr\beta4+\sum_{n=1}^\infty n^2\p{\e^{\beta/2n^2}-1-\fr\beta{2n^2}}\\ &=\lim_{N\to\infty}\p{-\p{\fr14+\fr N2}\beta-\fr16N\p{1+N}\p{1+2N}+\sum_{n=1}^Nn^2\e^{\beta/2n^2}}. \end{align*}$ For finite $N$, it has a straight line asymptote as $\beta\to-\infty$. The envelope of this family of straight lines (parametrized by $N$) is $Z=\p{1-6\beta}^{3/2}/36\sqrt3$, which means that $Z\sim\p{-\beta}^{3/2}$ as $\beta\to-\infty$, where “$\sim$” means that the ratio of the two sides approaches a positive constant. Similarly, we have $\d Z/\d\beta\sim-\p{-\beta}^{1/2}$. Therefore, $\a E\sim-\beta^{-1}$ as $\beta\to-\infty$.

Here is a special regularization method for the hydrogen atom which is not applicable to general systems. Consider the second derivative $\d^2Z/\d\beta^2$ by differentiating the summand twice w.r.t. $\beta$ in Equation 1, and then take twice antiderivative w.r.t. $\beta$. This gives $Z=A+B\beta+\sum_{k=0}^\infty\fr{\p{\beta/2}^k}{k!}\fc\zeta{2k-2} =A+B\beta+\sum_{n=1}^\infty n^2\p{\e^{\beta/2n^2}-1-\fr{\beta}{2n^2}},$ where $A,B$ are integration constants. The result from the cutoff regularization and the zeta function regularization is simply $A=0$, $B=-1/4$. What is interesting about this is that it already determines the asymptotic behavior of $1-p_1$ at cold temperature, which is $1-p_1\approx3\e^{-3\beta/8}$ (see Equation 5), no matter what $A,B$ are.

For a series $\sum_n\fc fn$, if it diverges, we can instead consider $\sum_n\fc fn^{-s}$ for some $s$ whose real part is big enough for the series to converge. Then, we can try to analytically continue to $s=-1$ to get a finite result for the original series. This is called the zeta function regularization.

For the zeta function regularization to work, the asymptotic behavior of $\fc fn$ needs to be a non-trivial power law as $n\to+\infty$. Otherwise, the sum may not converge for any $s$. For example, consider $E_n=\ln\ln n$ (with no degeneracies). The partition function with zeta function regularization is $Z_s\ceq\sum_{n=2}^\infty\p{\ln n}^{\beta s}.$ This series is divergent for any complex $s$.

A famous example is $\fc fn\ceq n$, which gives $\sum_nn=\fc\zeta{-1}=-1/12$. Generally, for $\fc fn\ceq n^k$, we have $\sum_nn^k=\fc\zeta{-k}$. This is the same as the result for the simple cutoff regularization. This raises the question of whether the results obtained from those two methods are necessary the same whenever they both exist. I do not have a rigorous proof, but a strong argument is that both of them are the result of some analytic continuation, so they should be the same by the uniqueness of analytic continuation.

We can check this with the hydrogen atom. We have, for $s>1/2$ and $\beta$ real, $Z_s\ceq\sum_{n=1}^\infty n^{-2s}\e^{-s\beta/2n^2} =\sum_{k=0}^\infty\fr{\p{-s\beta/2}^k}{k!}\sum_{n=1}^\infty n^{-2s-2k} =\sum_{k=0}^\infty\fr{\p{-s\beta/2}^k}{k!}\fc\zeta{2s+2k}.$ Analytically continue this result to $s=-1$, and then this gives the same result as Equation 4. The rest will be the same as the last section.

However, can we trust this result, though? Everything is becoming fishy. Probabilities are no longer well-defined because how we normally derive them using $Z$ is causing a divergent sum of probabilities and thus invalid. Yet somehow we are trying to estimate the bound of the probability of the system not being in the ground state and getting an expected result. You must have been feeling uncomfortable about this.

The first thing to ask is what we mean by “the expectation value” when the probability distribution is not even well-defined. If it means nothing physical, can we still trust its expression? The simple answer is no.

As we already see, although the result at cold temperature is sensible, the result at some regimes is clearly unphysical. We can also see similar problems with other systems. Consider the system that has energy levels $E_n=\ln n$ (with no degeneracies). We can easily get $Z=\sum_nn^{-\beta}=\fc\zeta\beta$, and thus there is a absi at $\beta=1$. For $\beta>1$, $Z$ converges, and everything looks good. For $\beta<1$, the system is so hot that $Z$ diverges. Previous arguments suggest that, in this region, the regularized $Z$ is still $\fc\zeta\beta$. However, we then have $\a E<0$ in this region, which is lower than the ground state energy. This clearly should not be trusted.

In another aspect, we should note that since the estimation for $1-p_1$ does not depend on the size of the box confining the hydrogen atom, its rough agreement with the result in the last section should be considered a coincidence.

Another thing to note is that the result of the regularizations depend on whether we “flatten” the energy levels. We can “flatten” all the energy levels: pretend no degeneracies exist. For example, suppose a system with $g_n\ceq n$ and $E_n\ceq n$. However, we can rewrite the same system as $E_n\ceq1,2,2,3,3,3,\ldots$ (or equivalently $E_n\ceq\floor{\sqrt{2n}+1/2}$)^{1}, with no degeneracies. This “re-grouping” of the energy levels can affect the result of regularizations and whether a zeta function regularization exists. For an immediate example, if we flatten the energy levels of the hydrogen atom, the zeta function regularization does not exist. Another simple example is that, for a system with $E_n=\mrm{const}$, we can essentially re-group the all-degenerate states to have any positive integer sequence $g_n$ to get very arbitrary results for the partition function.

Forget about the hydrogen atom, and let us consider a general system with (ever-increasing) energy levels $E_n$ and degeneracies $g_n$. For a given system, there is an abscissa of convergence $\beta_\mrm c$, below (hotter than) which the partition function diverges. In other words, $Z\ceq\sum_ng_n\e^{-\beta E_n}$ converges for $\Re\beta>\beta_\mrm c$ and diverges for $\Re\beta<\beta_\mrm c$. For most physical systems, we have $\beta_\mrm c=0$, meaning that it can have any positive temperature, which sounds sensible. The hydrogen atom has $\beta_\mrm c=+\infty$, and a two-level system has $\beta_\mrm c=-\infty$. A system with $E_n=\ln n$ and no degeneracy has $\beta_\mrm c=1$.

The term “abscissa of convergence” is borrowed from the study of general Dirichlet series. The form of $Z$ is indeed very much like a general Dirichlet series, but a general Dirichlet series requires $E_\infty=+\infty$, which is not true for the hydrogen atom. However, the existence of an abscissa of convergence is still true for the more general case.

What does it mean physically to have an abscissa of convergence $\beta_\mrm c$? First, if $\beta_\mrm c=-\infty$, then the system is well behaved at any temperature, which is good and does not need further care.

If $\v{\beta_\mrm c}<\infty$, normally one should say the system cannot reach a certain temperature: the system can never be in equilibrium with a heat bath hotter than $\beta_\mrm c$. Thermodynamically, one can say that the system needs to absorb an infinite amount of heat to reach this temperature. One can see this easily by considering any sensible system, which has $\beta_\mrm c=0$: for $\beta$ to go below zero means to make the temperature hotter than infinity, which of course needs an infinite amount of heat intuitively. One may want to see whether it is possible to regularize $Z$ to get a finite result for $\Re\beta<\beta_\mrm c$. A valid claim to make is that, if $Z$ can be analytically continued to the half real axis to the left of $\beta_\mrm c$, then any sensible regularization of $Z$ there will give the same result as the analytic continuation. Actually, the analytic continuation is exactly the zeta function regularization if there is no degeneracy (or regarding degenerate states as different energy levels). However, it is possible that the analytic continuation does not exist. There may be a branch cut or a natural boundary. For example, if $E_n\ceq\ln p_n$ with no degeneracy, where $p_n$ is the $n$th prime number, then $Z$ is the prime zeta function, which has a natural boundary at $\Re\beta=0$. Even if such a regularization exists, it should be questioned whether it is physical.

If $\beta_\mrm c=+\infty$, then the system is not well behaved at any temperature. This is the case for the hydrogen atom. Physically, this means that the system cannot be in equilibrium with a heat bath at any temperature. The problem with regularization is the same as the case with $\v{\beta_\mrm c}<\infty$.

In a previous article about statistical ensembles, when I defined the partition function, I briefly mentioned that it is only defined for those intensive variables ($\beta$ in the context of this article) such that the partition function converges. I did not talk about what to do with the partition function when it diverges, but what that article implied is that it is simply undefined and that no physical meaning should be assigned to it in principle. The existence of an abscissa of convergence tells us that there is a “hottest possible temperature” for any given system. The hydrogen atom is symply the case where the hottest possible temperature coincides with the coldest possible temperature (which is the absolute zero). For most sensible systems, the hottest possible temperature is just the positive hot limit. For systems such as $E_n\ceq\ln n$, the hottest possible temperature is a finite positive temperature, which is at $3.16\times10^5\,\mrm K$, resulting from $\beta_\mrm c=1$. This can be conterintuitive at first, but one should realize that it is not essentially different from the more common case of $\beta_\mrm c=0$.

Therefore, a natural idea that comes to my mind is to simply let people know when I am asleep so that they do not expect me to respond immediately.

Discord and GitHub have been among my most used platforms for some time, and they both have a feature to let users set a custom status (with a custom text and an emoji). This opens up a possibility of using a program to automatically set the status to indicate that I am asleep.

For Discord, this is as simple as invoking a REST API (**Notice that this is against Discord’s ToS**):

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
# Set sleeping status
curl -X PATCH \
-H "Content-Type: application/json" \
-H "Authorization: YoUr.DiScOrD.ToKeN" \
-d '{"custom_status":{"text":"Sleeping...","emoji_id":null,"emoji_name":"😴","expires_at":null},"status":"dnd"}' \
https://discordapp.com/api/v8/users/@me/settings
# Clear sleeping status
curl -X PATCH \
-H "Content-Type: application/json" \
-H "Authorization: YoUr.DiScOrD.ToKeN" \
-d '{"custom_status":null,"status":"online"}' \
https://discordapp.com/api/v8/users/@me/settings
``` |

For GitHub, there is not a REST API for that, but you can install the user-status plugin for GitHub CLI:

1 | ```
gh extension install vilmibm/gh-user-status
``` |

Then, you can set the status with:

1 2 3 4 5 | ```
# Set sleeping status
gh user-status set 'Sleeping...' --emoji='sleeping' --limited
# Clear sleeping status
gh user-status set 'null' --expiry=1s
``` |

Now, the next step is to run these commands automatically when I fall asleep and wake up. This can be done with MacroDroid, which can trigger actions based on various triggers. To run arbitrary commands, you can use the Tasker plugin for Termux. MacroDroid supports using the return value of the sleep API to trigger an action, but this tends to be quite unreliable on my device. Therefore, I use it in conjunction with a quick setting tile that I can toggle manually. The macro has two triggers:

- Fell Asleep / Woke Up (Android sleep API),
- Quick Tile On/Off,

and it has these actions:

1 2 3 4 5 6 7 8 9 10 11 12 13 | ```
If Trigger Fired: Woke Up, or Quick Tile Off
If Sleeping = True
Clear sleeping status on Discord and GitHub
# Include other waking up logic here, such as turning off DND mode
End If
Sleeping = False
Else If Trigger Fired: Fell Asleep, or Quick Tile On
If Sleeping = False
Set GitHub and Discord user status to sleeping
# Include other falling asleep logic here, such as turning on DND mode
End If
Sleeping = True
End If
``` |

By the way, I have a bunch of topics that I want to write blog articles about, but I have been quite busy recently, so I may have to pause updating this blog for a while. I hope I can get back to writing soon!

]]>`/YOUR/PATH/TO/ca.pem`

:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ```
-----BEGIN CERTIFICATE-----
MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEb
MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow
GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmlj
YXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVowezEL
MAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE
BwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNVBAMM
GEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQua
BtDFcCLNSS1UY8y2bmhGC1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe
3M/vg4aijJRPn2jymJBGhCfHdr/jzDUsi14HZGWCwEiwqJH5YZ92IFCokcdmtet4
YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszWY19zjNoFmag4qMsXeDZR
rOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjHYpy+g8cm
ez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQU
oBEKIz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF
MAMBAf8wewYDVR0fBHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20v
QUFBQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29t
b2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2VzLmNybDANBgkqhkiG9w0BAQUF
AAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm7l3sAg9g1o1Q
GE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz
Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2
G9w84FoVxp7Z8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsi
l2D4kF501KKaU73yqWjgom7C12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3
smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==
-----END CERTIFICATE-----
``` |

Then, run

1 2 3 4 5 6 7 8 9 10 | ```
nmcli con mod eduroam 802-1x.eap peap
nmcli con mod eduroam 802-11-wireless-security.key-mgmt wpa-eap
nmcli con mod eduroam 802-11-wireless-security.proto rsn
nmcli con mod eduroam 802-11-wireless-security.pairwise ccmp
nmcli con mod eduroam 802-11-wireless-security.group ccmp,tkip
nmcli con mod eduroam 802-1x.ca-cert /YOUR/PATH/TO/ca.pem
nmcli con mod eduroam 802-1x.phase2-autheap mschapv2
nmcli con mod eduroam 802-1x.anonymous-identity anonymous@ucsb.edu
nmcli con mod eduroam 802-1x.identity YOUR_EDU_EMAIL_ADDRESS
nmcli con mod eduroam 802-1x.password YOUR_PASSWORD
``` |

Finally, you can connect to eduroam now!

This may also apply to eduroam in other campuses, but I haven’t tested it yet.

]]>
**Theorem.** The conformal map $\fc wz$ transforms the trajectory with energy $-B$ in potential $\fc Uz\ceq A\v{\d w/\d z}^2$ into the trajectory with energy $-A$ in potential $\fc Vw\ceq B\v{\d z/\d w}^2$.

This result is pretty amazing in that it reveals a quite implicit duality between the two potentials, and it looks very symmetric as written.

This theorem, as I know of, was first introduced in the appendix of V. I. Arnold’s book Huygens and Barrow, Newton and Hooke. Part of this article is already covered in the relevant part of the book.

Before I show the proof of it, let me first introduce it by a much more well-known example.

As we all know, Bertrand’s theorem states that the only two types of central-force potentials where all bound orbits are closed are $U\propto r^{-1}$ (the Kepler problem) and $U\propto r^2$ (the harmonic oscillator). How the two potentials are special among all sorts of different central-force potentials makes people wonder if there is any connection between them. Fortunately, there is one, and it is obvious once we notice that the complex squaring transforms any center-at-origin ellipses into focus-at-origin ellipses. Inspired by this, it is easy to see that trajectories in the Kepler problem can be transformed into trajectories of harmonic oscillators under complex squaring.

You may ask, how can we notice complex squaring does the said transformation on ellipses? The observation is noticing the simple algebra $\p{z+\fr1z}^2=z^2+\fr1{z^2}+2,$ which means that the Joukowski transform $z\mapsto z+1/z$ of a unit circle simply translates under complex squaring. We can then try to generalize this to circles of other radii, whose Joukowski transformations are just ellipses! (If you remember, this is the second time Joukowski transformation appears in my blog. The first time was here.)

Then, are the Kepler problem and the harmonic oscillator the only two central-force potentials whose trajectories can be transformed into each other by a complex function? The answer is no. In fact, for any trajectory in almost any power-law central-force potential, we can take some power of it to get a trajectory in another power-law central-force potential.

This result can be summarized as follows. Taking the $\p{\alp/2+1}$th power of a trajectory with energy $E$ in the potential $U=ar^\alp$ ($\alp\ne-2$) gives a trajectory with energy $F$ in the potential $V=br^\beta$, where $\p{\alp+2}\p{\beta+2}=4,\quad b=-\fr14\p{\alp+2}^2E,\quad F=-\fr14\p{\alp+2}^2a.$ To prove this, we just need to reparameterize the transformed trajectory in a new time coordinate $\tau$ defined as $\d\tau=\v z^\alp\,\d t$, where $z$ is the complex position of the original trajectory. Then, by some calculation and utilizing the energy conservation, we can show that the parameter equation in terms of the new time coordinate satisfy the equation of motion we expect. I will not show the details here because they would be redundant once I prove the more general case using the same methods.

There is an interesting special case, which is $\alp=-2$. There is no potential that is dual to $U\propto r^{-2}$. Another interesting case is $\alp=-4$, which is dual to itself ($\beta=-4$). It kind of means that the coefficient in the potential is “interchangeable” with the energy, and the trajectories can be derived from each other by taking the complex reciprocal.

We can get some interesting results with $a=0$, which is just the case of a free particle, whose trajectories are all straight lines. Since in this case we necessary have $F=0$, we can say that the zero-energy trajectory in any power-law potential is related to a straight line by a power. From this result, we can derive some interesting corollaries. For example, the zero-energy trajectory in the Kepler problem is a parabola (square of a straight line), which is well-known. The zero-energy trajectory in $U\propto-r^{-4}$ is a circle passing through the origin (reciprocal of a straight line), which is a pretty interesting not-so-well-known result.

Another interesting result is that, the deflection angle of an incident zero-energy particle scattered by the potential $U\propto-r^\alp$ is $\tht$ under paraxial limit, if $\alp=\fr{2\vphi}{\pi-\vphi},\quad\vphi=\pm\tht-2k\pi,\quad k\in\bN.$ This result can be easily derived by using the conformal transform of the real line (actually, a straight line that approaches the real line). The crucial part here is that $k$ cannot take negative integers because we need $\alp>-2$. The reason is that, when $\alp\le-2$, paraxial zero-energy particles are bound to sink into the origin, and thus no scattering actually happens. This small pitfall indicates that the trajectory in the dual potential is not a two-side infinite straight line, either, in that limit, in contrast to being seemingly a free particle.

Let’s go back to the theorem I stated at the beginning of this article.

*Proof.* Consider a new time coordinate $\tau$ defined as $\d\tau=\v{\d w/\d z}^2\,\d t$. Then, the motion of $w$ satisfies $\begin{align*}
m\fr{\d^2w}{\d\tau^2}
&=m\fr{\d t}{\d\tau}\fr{\d}{\d t}\p{\fr{\d t}{\d\tau}\fr{\d w}{\d t}}\\
&=m\v{\fr{\d z}{\d w}}^2\fr{\d}{\d t}\p{\v{\fr{\d z}{\d w}}^2\fr{\d w}{\d z}\fr{\d z}{\d t}}\\
&=m\fr{\d z}{\d w}\p{\fr{\d z}{\d w}}^*\p{\p{\fr{\d^2z}{\d w^2}\fr{\d w}{\d z}\fr{\d z}{\d t}}^*\fr{\d z}{\d t}
+\p{\fr{\d z}{\d w}}^*\fr{\d^2 z}{\d t^2}}.
\end{align*}$
Here we need to substitute $\d^2 z/\d t^2$ by the equation of motion for $z$. By computing the real and imaginary parts separately, we can derive that for any holomorphic function $f$, the gradient of $\v f^2$ expressed as a complex number is $\nabla\v f^2=2\p{\d f/\d z}^*f$. Therefore, the equation of motion for $z$ is
$m\fr{\d^2z}{\d t^2}=-2A\fr{\d w}{\d z}\p{\fr{\d^2w}{\d z^2}}^*.$ According to series reversion, we have
$\d^2 w/\d z^2=-\p{\d w/\d z}^3\d^2 z/\d w^2$. Therefore, the equation of motion for $z$ can also be written as $m\fr{\d^2z}{\d t^2}=2A\v{\fr{\d w}{\d z}}^2\p{\fr{\d w}{\d z}}^{*2}\p{\fr{\d^2 z}{\d w^2}}^*.$ Substitute this, and we have $m\fr{\d^2w}{\d\tau^2}=\fr{\d z}{\d w}\p{\fr{\d^2z}{\d w^2}}^*
\p{m\v{\fr{\d z}{\d t}}^2+2A\v{\fr{\d w}{\d z}}^2}.$ Substitute the energy conservation of the motion of $z$: $\fr12m\v{\fr{\d z}{\d t}}^2+A\v{\fr{\d w}{\d z}}^2=-B,$ and we have $m\fr{\d^2w}{\d\tau^2}=-2B\fr{\d z}{\d w}\p{\fr{\d^2z}{\d w^2}}^*,$ which is the equation of motion for $w$ that we expect.

To get the energy of the motion of $w$, we calculate $\begin{align*} \fr12m\v{\fr{\d w}{\d\tau}}^2+B\v{\fr{\d z}{\d w}}^2 &=\fr12m\v{\fr{\d w}{\d z}\fr{\d z}{\d t}\fr{\d t}{\d\tau}}^2+B\v{\fr{\d z}{\d w}}^2\\ &=\v{\fr{\d w}{\d z}}^2\p{-B-A\v{\fr{\d w}{\d z}}^2}\v{\fr{\d z}{\d w}}^4+B\v{\fr{\d z}{\d w}}^2\\ &=-A, \end{align*}$