I have a problem with this finite square potential well:
$$V(x) = \begin{cases} 0, & \mbox{if } x<|a| \\ V_0, & \mbox{if } x>|a| \end{cases}$$ with $V_0>0$.
The TISE of this potential well are:
\begin{cases} \psi''(x)=\frac{2mE}{\hbar^2}\psi(x), & \mbox{if } x<|a| \\ \psi''(x)=\frac{2m(V_0-E)}{\hbar^2}\psi(x), & \mbox{if } x>|a| \end{cases}
Since we want the solutions to be $L^2$ and the potential is symmetric we can consider only the problem with $x>0$ and only the solutions with definite parity so that the even solutions of the TISE for positive $x$ are:
\begin{cases} A\cos(kx), & \mbox{if } 0<x<a \\ Be^{-cx}, & \mbox{if } x>a \end{cases}
and the odd solutions are:
\begin{cases} A\sin(kx), & \mbox{if } 0<x<a \\ Be^{-cx}, & \mbox{if } x>a \end{cases}
with $k=\frac{\sqrt{2mE}}{\hbar}$ and $c=\frac{\sqrt{2m(V_0-E)}}{\hbar}$
Now from the continuity of the wave function and the first derivative for $x=a$ I get the Cauchy problem:
\begin{cases} A\cos(ka)=Be^{-ca}, & \mbox{if } 0<x<a \\ kA\sin(ka)=cBe^{-ca}, & \mbox{if } x>a \end{cases} for even functions and:
\begin{cases} A\sin(ka)=Be^{-ca}, & \mbox{if } 0<x<a \\ kA\cos(ka)=-cBe^{-ca}, & \mbox{if } x>a \end{cases}
for odd functions.
The main problem at this point is:
Finding $A$ and $B$ and finding the eigenvalues of $H$ of the bound states.
What I don't understand is:
Once I have written the total wave function as combinations of $L^2$ functions (at infinity the wave function so constructed behaves like an exponential), why do I find the "acceptable" values of $E$ from the continuity of the wave function and its first derivative?
I would have expected to find the constants $A$ and $B$ from Cauchy's problem and the values of $E$ from the definition of a function belonging to the class $L^2$. Instead, I find the values of $E$ from Cauchy's problem. How are the conditions on the continuity of the wave function and its prime derivative in $x=a$ related to the membership of the wave function in $L^2$?