Problem related to $L^2$ wavefunctions in a finite potential well

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 } 0a \end{cases}$$

and the odd solutions are:

$$\begin{cases} A\sin(kx), & \mbox{if } 0a \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 } 0a \end{cases}$$ for even functions and:

$$\begin{cases} A\sin(ka)=Be^{-ca}, & \mbox{if } 0a \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$$?

As you seem to be assuming that there is only an $$e^{-cx}$$ for $$x>a$$ and that $$c>0$$. Thus you have already assumed that you are in $$L^2$$. This condition on $$c$$ requires that $$E and you have bound states. The pair of equations for the even case, for example, can by simplified by dividing one by the other to get $$k\tan ka = c$$ which needs to be solved numerically for the allowed $$E$$'s.
You can satisfy continuity of $$\psi'(x)/\psi(x)$$ at $$x=a$$ with any $$E$$ --- but to do this you will need to include an $$C e^{+cx}$$ in $$x>a$$ as well as the decaying $$B e^{-cx}$$. These enlarged solutions are now not in $$L^2$$ because they blow up at large $$x$$. So yes: being in $$L^2$$ selects the allowed values of $$E$$.
There are also scattering eigenfunctions with $$E>V_0$$. These are in the continuous spectrum and any $$E>V_0$$ is an allowed eigenvalue. The continuous spectrum eigenstates are not in $$L^2$$ but need to be included if you are to get a complete set of eigenfunctions. The scattering eigenstates will have delta function normalization and so you will need a rigged Hilbert space to accommodate them.
• Thank you for your response, however I still don't understand one thing: you said that the values of E are the acceptable ones because the total wave function is already $L^2$, so would any equation (if it existed) on the energy be sufficient to find the eigenvalues of the bound states? Can we say that the use of Cauchy's problem is just "convenient" in this case because being the wave function $L^2$ for the choice of constants any equation for $0<E<V_0$ would give the values of $E$ sought? Commented Dec 26, 2021 at 17:43
• I do not understand you. You assumed that your wavefunction is in $L^2$,and that the log derivative is continuous at $a$. From this you get the equation $k\tan ka =c$. What more do you want? What do you mean by "Cauchy's problem"? You are not using any Cauchy data. Commented Dec 26, 2021 at 18:07
• Aren't the pair of equations from which you get $ktan(ka)=c$ a Cauchy's problem? I have the equation $\psi(a)=something$ and $\psi'(a)=something$. Isn't this a Cauchy problem? Commented Dec 26, 2021 at 18:54
• There is only one equation: the continuity of $\psi'/\psi$, which has to be solved numerically. I don't see how Cauchy comes in here. Again: What do you mean by a "Cauchy Problem"? Cauch solved many problems in his life! I 'd usually regard Cauch as an intial value problem, but here here we are solving a two sided boundary-value problem. Rather a different thing. Commented Dec 26, 2021 at 19:15
• First thing, I dind't realize that by $\psi'/\psi$ you meant $\frac{\psi'(x)}{\psi(x)}$, I thought it was "$\psi'(x)$ and $\psi(x)$". It is all more clear now. Second thing, by "Cauchy problem" I mean the initial value problem for differential equations, in this case the ED is the Schrodinger's equation and the initial problem is the continuity of $\psi(x)$ and of $\psi'(x)$ in $x=a$. Commented Dec 26, 2021 at 19:53