Solution (source code)

= Solution

Use the amplitudes and positive <action integrals> of part (a), and define the right-well phase
$$
\theta(E)=\frac1\hbar\int_{x_1(E)}^{x_2(E)}p(x)\,dx.
$$
Matching at the inner <classical turning point> gives $C=A$, $D=2B$. Matching the exterior decaying <wavefunction> at the outer <classical turning point> gives
$$
\psi_{\rm II}(x)\simeq\frac{2F}{\sqrt{p(x)}}\sin\left(\frac1\hbar\int_x^{x_2}p(y)\,dy+\frac\pi4\right)=\frac{2F}{\sqrt{p(x)}}\sin(\theta-s(x)+\pi/4).
$$
The <trigonometric identity>
$$
\sin(\theta-s+\pi/4)=\cos\theta\cos(s+\pi/4)+\sin\theta\sin(s+\pi/4)
$$
therefore yields
$$
\boxed{A=C=2F\cos\theta,\qquad B=F\sin\theta,\qquad D=2F\sin\theta.}
$$
All three pieces on $x>0$ are now fixed up to $E$ and $F$:
$$
\psi_R(x)\simeq\begin{cases}
\dfrac{F}{\sqrt{\chi(x)}}\bigl[2\cos\theta\,e^{K(x)}+\sin\theta\,e^{-K(x)}\bigr],&0<x<x_1,\\
\dfrac{2F}{\sqrt{p(x)}}\sin(\theta-s(x)+\pi/4),&x_1<x<x_2,\\
\dfrac{F}{\sqrt{\chi(x)}}e^{-U(x)},&x>x_2.
\end{cases}
$$
The <Airy function> descriptions replace the apparent singularities at the <classical turning points>. For the permitted <energy eigenvalues>, part (d) extends this right-hand <wavefunction> to the left by even or odd <parity>; $F$ is then determined by <wavefunction normalization>. At arbitrary $E$, the decaying right-hand solution instead has a unique continuation by the <Schrödinger equation>, which need not decay at negative infinity.