Fermion number non-conservation in parallel $E$ and $B$ fields This is from Problem 19.1 in Peskin and Schroeder.

(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) 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) 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) 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}.$$
(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$.

 A: After spending some more time, I have come up with my own explanation/solution which I share below. For definitiveness, we take both $B$ and $A$ to be positive, and define $\omega \equiv eB$. Note that here $\omega$ and $B$ have the dimension of mass (or energy) squared.
Also note that $k_2$ and $k_3$ really should be $k^2$ and $k^3$. But I will not change the notation in the text below.
Part (c)
Equation (19.8) is formally the same as the Schrödinger's equation for a standard harmonic oscillator. See this link. We say "formally", because here $\omega$, as well as $E'$ have the dimension of energy-squared instead of energy.
It can be written as
$$-\frac{1}{2}\frac{\partial^2 \phi_1(x^1)}{(\partial x^1)^2} + \frac{\omega^2}{2} \left(x^1-\frac{k_2}{\omega} \right)^2 \phi_1(x^1) = E' \phi_1(x^1),$$
where $E' = \frac{1}{2}\left(E^2 - (k_3-eA)^2 + \omega\right)$.
$\frac{k_2}{\omega}$ simply shifts the center of oscillation.
For a harmonic oscillator, we have $E' = \left(\frac{1}{2} + n_1 \right)\omega$, where $n_1 = 0, 1, 2, \dots$. Therefore
$$E^2 = (k_3-eA)^2 - \omega + (2 n_1 + 1) \omega = \left(\frac{2\pi n_3}{L}-eA\right)^2 + 2 n_1 \omega \tag{A}.$$
This actually looks better than (19.9) in Zhong-Zhi Xianyu's solution. The RHS is always positive, and we can simply take its square root to get $E$.
Part (e)
For a better understanding of the problem, we actually also need an equation similar to (19.8) for $\phi_2$. Comparing (19.7a) and (19.7b), we see that we simply need to switch a bunch of signs.
$$\phi_2'' - \left[\omega^2 \left(x^1-\frac{k_2}{\omega} \right)^2 - E^2 + (k_3-eA)^2 + \omega \right]\phi_2 = 0 \tag{19.8'}.$$
This leads to
$$E^2 = (k_3-eA)^2 + \omega + (2 n_1' + 1) \omega = \left(\frac{2\pi n_3}{L}-eA\right)^2 + 2 (n_1'+1) \omega \tag{B}.$$
Comparing this to Equation (A), we see that $\phi_2$ is also a harmonic oscillator, but one energy level lower than $\phi_1$. So $n_1 = n_1' + 1$ where $n_1' = 0, 1, 2, \dots$.
These solutions will not lead to any non-conservation of fermions. As $A$ increases, eigenstates with $n_3 < \frac{eAL}{2\pi}$ will gain energy, while eigenstates with $n_3 > \frac{eAL}{2\pi}$ will lose energy. But even the latter will still have an energy level greater than $\sqrt{2(n_1'+1)\omega}$.
We have however missed a special case where $n_1=0$. In this case, $\phi_1$ is a still harmonic oscillator, while $\phi_2$ vanishes.
Substituting this into (19.7a), where we can set $k_2$ to zero, we have
$$E=k_3-eA=\frac{2\pi n_3}{L}-eA.$$
(Setting $\phi_1$ to zero won't give us any non-vanishing solution of $\phi_2$ that does not blow up as $x^1 \rightarrow \infty$.)
For any fixed $A$, only states with $n_3 > \frac{eAL}{2\pi}$ have positive energies. As $A$ increases by $\frac{2\pi}{eL}$, one such $n_3$ will now give us negative energy.
So we reach the same conclusion, but through very different reasoning.
