Particles of mass $m$ and momentum $\hbar k$ at $x<-a$ move in the potential
$$
V(x)=V_{0} \begin{cases}0 & \text { for } x<-a \\ \frac{1}{2}[1+\sin (\pi x / 2 a)] & \text { for }|x|<a \\ 1 & \text { for } x>a\end{cases}
$$
where $V_{0}<\hbar^{2} k^{2} / 2 m$. Numerically reproduce the reflection probabilities plotted in Figure $5.20$ as follows. Let $\psi_{i} \equiv \psi\left(x_{j}\right)$ be the value of the wavefunction at $x_{j}=j \Delta$, where $\Delta$ is a small increment in the $x$ coordinate. From the TISE show that
$$
\psi_{j} \simeq\left(2-\Delta^{2} k^{2}\right) \psi_{j+1}-\psi_{j+2}
$$
where $k \equiv \sqrt{2 m(E-V)} / \hbar$. Determine $\psi_{j}$ at the two grid points with the largest values of $x$ from a suitable boundary condition, and use the recurrence relation (5.88) to determine $\psi_{j}$ at all other grid points. By matching the values of $\psi$ at the points with the smallest values of $x$ to a sum of sinusoidal waves, determine the probabilities required for the figure. Be sure to check the accuracy of your code when $V_{0}=0$, and in the general case explicitly check that your results are consistent with equal fluxes of particles towards and away from the origin.
Equation (12.40) gives an analytical approximation for $\psi$ in the case that there is negligible reflection. Compute this approximate form of $\psi$ and compare it with vour numerical results for larger values of $a$.