Consider an electron with total energy $E>V_2$ in a potential well with $$V(x)= \begin{cases} \infty & x< 0 \\ V_1 & 0< x< L \\ V_2 & x>L \end{cases} $$ where $V_2>V_1>0$.
We can determine that $$\phi_E(x)= \begin{cases} 0 & x< 0 \\ A\sin(kx)+B\cos(kx) & 0< x< L \\ Ce^{qx}+De^{-qx} & x>L \end{cases} $$ where $k^2=\frac{2m_e E}{\hbar}$ and $q=k\sqrt{V_1-E}$.
We can also apply the boundary condition at $x=0$ to determine that $$\phi_e(x)=A\sin(kx)$$ for $x\in[0,L]$.
We can also apply boundary conditions at $x=L$ to find that $$A\sin(kL)=De^{-qL}$$ $$Ak\cos(kL)=-Dqe^{-qL}$$ (since $C=0$ due to the corresponding positive exponent), and $$k\cot(kL)=-q$$
I need to calculate the de Broglie wavelength of the electron in the regions defined by the potential, if $V_1 = 10.0$ eV, $V_2 = 20.0$ eV, $E=30$ eV.
For the region where $0\le x\le L$, if I'm correct, the de Broglie $\lambda$ is determined by $\frac{h}{p}$, where $p=\hbar k=\sqrt{2m_e E}$, and so we can find $\lambda_{\text{de Broglie}}=8.962639\times 10^{-18}$ m.
For the region where $x<0$, we can't find this length because of the infinite potential.
For the region where $x>L$, if $p=\hbar q$, then it appears that $p$ is complex-valued, and then I'm in doubt whether I was correct to have dropped the coefficient $C$ above in my derivations of equations.
Would appreciate some help.