This is from Problem 19.1 in Peskin and Schroeder.
(a)(a) Show that the Adler-Bell-Jackiw anomaly equation leads to the following law for global fermion number conservation: If $N_R$ and $N_L$ are, respectively, the numbers of right- and left-handed massless fermions, then $$\Delta N_R - \Delta N_L = \frac{e^2}{2\pi^2} \int d^4x \textbf{E}\cdot \textbf{B}.$$ To set up a solvable problem, take the background field to be $A^\mu = (0, 0, B x^1, A)$, with $B$ constant and $A$ constant in space and varying only adiabatically in time.
(b)(b) Show that the Hamiltonian for massless fermions represented in the components (3.36) is $$H = \int d^3x [\psi^\dagger_R (-i \textbf{σ}\cdot\textbf{D})\psi_R - \psi^\dagger_L (-i \textbf{σ}\cdot\textbf{D})\psi_L],$$ with $D^i = \nabla_i + ieA_i$. Concentrate on the term in the Hamiltonian that involves right-handed fermions. To diagonalize this term, one must solve the eigenvalue equation $-i \textbf{σ}\cdot\textbf{D} \psi_R = E\psi_R$.
(c)(c) The $\psi_R$ eigenvectors can be written in the form $$\psi_R = \pmatrix{\phi_1(x^1)\\\phi_2(x^1)} e^{i(k_2 x^2 + k_3 x^3)}$$ The functions $\phi_1$ and $\phi_2$ which depend only on $x^1$, obey coupled first-order differential equations. Show that, when one of these functions is eliminated, the other obeys the equation of a simple harmonic oscillator. Use this observation to find the single-particle spectrum of the Hamiltonian. Notice that the eigenvalues do not depend on $k_2$.
According to Zhong-Zhi Xianyu's solution, which is widely circulated online, the answer to part (c) is
$$\phi_1'' - \left[e^2 B^2 \left(x^1-\frac{k_2}{eB} \right)^2 - E^2 + (k_3-eA)^2 - eB \right]\phi_1 = 0 \tag{19.8}.$$
The derivation is not complicated. However, I don't understand how this can be a simple harmonic oscillator, with the coefficient of $\phi_1$ dependant on $x^1$ itself. (The 2nd derivative of $\phi_1$ in the equation above is relative to $x^1$.)
(d)(d) If the system of fermions is set up in a box with sides of length $L$ and periodic boundary conditions, the momenta $k_2$ and $k_3$ will be quantized: $$k_i = \frac{2\pi n_i}{L}.$$ By looking back to the harmonic oscillator equation in part (c), show that the condition that the center of the oscillation is inside the box leads to the condition $$k_2<eBL.$$ Combining these two conditions, we see that each level found in part (c) has a degeneracy of $$\frac{eL^2B}{2\pi}.$$ Now(e) Now consider the effect of changing the background A adiabatically by an amount (19.37). Show that the vacuum loses right-handed fermions. Repeating this analysis for the left-handed spectrum, one sees that the vacuum gains the same number of left-handed fermions. Show that these numbers are in accord with the global nonconservation law given in part (a).
For part (e), Zhong-Zhi Xianyu's solution seems rather handwaving.
Now we consider the case with $n_1= 0$ for simplicity. Then the spectrum reads $E = 2\pi n_3 /L − eA$. Suppose that the background potential changes by $\Delta A = 2\pi/eL$. Then it is easy to see that all state with energy marked by $n_3$ will turn to states with energy marked by $n_3−1$. Note that each energy eigenvalue is $eBL^2/2\pi$-degenerate, thus the net change of right-handed fermion number is $−eBL^2/2\pi$. Similar analysis shows that the left-handed fermion number get changed by $eBL^2/2\pi$. Therefore the total change is $\Delta N_R − \Delta N_L = −eBL^2/\pi$.