Mixed Basis States I am interested in working in a problem which has a mixture of discrete and continuous basis functions. In particular, I am trying to work with the finite square well.
I am inspired by a similar problem for the infinite square well, where some numerical wavefunction, say x(1-x) for a well of length 1, where the wavefunction may be decomposed in terms of basis states using a fourier series.
The problem is more interesting in the case of the finite well, as the basis necessarily includes both the finite set of bound states and the continuum of bound states. However, I am at an impasse as to how to continue, as it seems to me that there is no single form that can be given for the unbound state (constants for a given momentum cannot be determined).
Is there any way to continue to decompose an arbitrary wavefunction in terms of a finite well basis?
 A: The same method works in all cases. Say you have a set of eigenfunctions $\{\phi_i: i \in I\}$, where $I$ is any set. In the general case you propose, you could take it as consisting of a finite set of natural numbers plus some interval of the real line; let's call them $I_D$ and $I_C$, for "discrete" and "continuous". Then any wavefunction can be expanded as
$$\psi(x) = \sum_{i \in I_D} a(i) \phi_i(x) + \int_{I_C} di\ a(i) \phi_i(x)$$
and you find the coefficients with
$$a(i) = \int dx\ \phi_i(x)^* \psi(x),$$
no matter whether $i$ is in the discrete or continuous part of the spectrum.
A: Just to give you a bit more of a hint, normally for the free particle Hamiltonian $U(x)=0$ we are solving for the energy eigenfunctions, $${\partial^2\Psi\over\partial x^2} = -k^2\Psi,$$by virtue of solving for a positive energy $E=\hbar^2 k^2/2m$ and dividing through by everything. This is then solved by $e^{ikx}$ with $k$ allowed to range over all real values, though those states are not normalizable.
For the finite square well Hamiltonian $U(x)=\{-\hbar^2k_0^2/2m~\text{ if }~ -L/2 < x < L/2 ~\text{ else }~ 0\}$ we must see the same solution in part for these locations $u\notin [-L/2, L/2],$ but we must have, for the same energy, a somewhat different wavelength inside the actual square well:
$${\partial^2\Psi\over\partial x^2} = -k^2\Psi -k_0^2~\Psi.$$ We see that now there are solutions admissible where the energy (hence $k^2$) is negative hence $k$ is imaginary, leading to the outer parts of the eigenfunctions decaying to 0 exponentially; this was neglected when considering the normal free particle because continuity would have demanded that the wavefunction blow up exponentially in the other direction, but we have these nice square well boundaries where we do not have to respect continuity completely, and we can choose exponential decays for both sides: these are the bound states.
For the free states the energy is positive and the wavenumber inside the well shifts to $k'=\sqrt{k^2 + k_0^2}.$ One therefore has a solution with six constants, $$\psi(x) = \begin{cases}
A e^{ikx} + B e^{-ikx}&x\in(-\infty, -L/2)\\
C e^{ik'x} + D e^{-ik'x}&x\in(-L/2,L/2)\\
E e^{ikx} + F e^{-ikx}&x\in(L/2,\infty)
\end{cases}.$$
The general way we approach this problem is to consider an incoming wave from the left, setting $A = 1,$ as compared with no incoming wave from the right, setting $F=0.$ We then allow continuity arguments among $B,C,D,E$ to take effect; we have 2 points and 4 unknowns so we can enforce continuity of values and first derivatives across the boundaries before we run into impossibilities. Two of these have special names: $B$ is the reflection amplitude and $E$ is the transmission amplitude. 
In fact once one realizes that this is what one is doing, they can take a slightly different approach to this problem: the discontinuous drop in potential and shift of wavenumber $k\mapsto k'$ can be treated as having its own reflection coefficient $r$ and transmission coefficient $t$ when going from high-to-low, or $\bar r$ and $\bar t$ going from low-to-high. (These have a nice relationship to each other by virtue of forming a unitary matrix which I believe should also be symmetric.) There is also a phase factor $e^{i\phi}$ picked up in traversing the distance $L$, namely $\phi = k'~L.$ Then one should find that $$B = r + t~e^{i\phi}~\bar r~e^{i\phi}~\bar t + t~e^{i\phi}~\bar r~e^{i\phi}~\bar r~e^{i\phi}~\bar r~e^{i\phi}~\bar t + \dots,$$where we see wavy interference from the initial reflection, the term which reflects once internally, the term which reflects three times internally, the term which reflects 5 times, and so on. We see a clear pattern of adding two internal reflections each time, which can be summed to all orders as a geometric series, $$B = r + \frac{t~\bar r~\bar t~e^{2i\phi}}{1 - \bar r^2 e^{2i\phi}}.$$With this, one has reinvented the "scattering matrix" formalism for quantum mechanics; see the wiki page for somewhat more detail on this.
