How to find the wavefunction that solves an infinite square well with a delta function well in the middle? Solutions for the wavefunction in an infinite square well with a delta function barrier in the middle are easily found online (see here for an example).  I am wondering what the wavefunction is for an infinite square well with a delta function well in the middle.  The setup is the bottom of the infinite square well is defined to be zero energy. I realize that there will be two situations, one where the particle's energy is less than zero and will therefore be bound to the delta function well and one where the particle's energy is greater than zero and is bound to the infinite square well.  What are the wavefunctions for these two situations?
 A: Consider an infinite square with free region $[0, L]$.  Place a delta function potential at $L/2$ with strength $\alpha$.  Then, Schrödinger's equation is
$$E\psi = -\frac{\hbar^{2}}{2m}\frac{\partial^{2}\psi}{\partial x ^{2}} + \alpha \delta(x- \frac{L}{2})\psi$$
First, note that the delta function is zero everywhere except at the center, which means that the energy eigenstates everywhere else are given by $\psi = A \sin (kx + \phi)$.  Furthermore, we know that $\psi(0) = \psi(L) = 0$.  Thus, we know that on the left hand side of the delta, we have $\phi = 0$, and on the right hand side, we have $\phi = - kL$.  Thus, for $0<x<L/2$, we have $\psi = A \sin(kx)$, while for $L/2 < x < L$, we have $\psi = B \sin (k(x-L))$.  The wave function must be continuous at $L/2$, so this guarantees that $A=-B$.
We can derive a restriction on $k$ by integrating Schrödinger's equation over an arbitrarily small region around $x = L/2$.  Since the wave function is continuous, the left hand side drops off, and we're left with:
$$0 = -\frac{\hbar^{2}}{2m}(\psi^{\prime}_{+} - \psi{\prime}_{-}) + \alpha\psi(L/2)$$
Or, more concretely,
$$\psi^{\prime}_{+} = \frac{2m\alpha}{\hbar^{2}}\psi(L/2) + \psi^{\prime}_{-} $$
Taking the derivative and substituting, we find:
$$-Ak\cos(kL/2) = \frac{2m\alpha}{\hbar^{2}}A\sin(kL/2)+Ak\cos(kL/2)$$
Finally, this gives us the transcendental equation
$$\tan(kL/2) = - \frac{\hbar^{2}k}{m\alpha}$$
Noting that we still have, as in the finite square well case, $E = \frac{\hbar^{2}k^{2}}{2m}$, all solutions have $E > 0$, irrespective of the sign of $\alpha$, although simple grasping shows that there are infinite numbers of solutions to this equation, independent of the sign of $\alpha$ (though the sign of and value of $\alpha$ will shift where those solutions are quite dramatically).
