The wave function outside an infinite well is zero, owing to the fact that we assume particles to have finite energies. But in the case of a delta function potential $\delta(x-a)$, the wave function is non-zero at the point $a$.
To find the states of a delta function, we use the continuity of the wave function and the discontinuity of it's first derivative. Why don't we set the wave function to zero at $a$?
Best Answer
There's no 'inside' to meaningfully speak of.
For the delta well potential, there is a jump condition at $x = a$; $\psi'$ must be discontinuous there.
One can integrate the SE across $x = a$ and find that $\psi'$ must change discontinuously there by an amount proportional to $\alpha$ but there is no requirement that $\psi$ be zero there.
This is because, loosely speaking, $\psi''$ contains a delta 'function' at $x = a$ (due to the discontinuity of $\psi'$ there) that 'matches up' with the delta potential there.
In contrast, for the case of the infinite well (particle in a box), the potential is constant and infinite outside of the well and so the SE (outside) is
$$\frac{\hbar^2}{2m}\psi'' = (\infty - E)\psi$$
for which $\psi = 0$ is the only reasonable solution.