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