Particle in a one dimensional box conditions Why does the wave function have to be $C^1(\mathbb{R})$ for a finite square well but not for an infinite square well? For an infinite square well with boundaries at $x=0$ and $x=L$, we have $$\psi_n(x)=\sqrt{\frac{2}{L}}\sin{\left( \frac{n \pi x}{L }\right)}$$ so $$\lim_{x \rightarrow 0} \frac{d\psi_n(x)}{dx} = n\pi \sqrt{\frac{2}{L^3}} \neq 0$$
If this isn't a problem for the infinite square well then why is it a problem for the finite square well?
 A: For an infinite well (actually infinitely high barriers) the probability to find an electron in the barrier vanishes. Therefore the wavefunction in the barrier has to be 0.
For barriers with a finite height, the commonly used, but actually wrong boundary conditions require the wavefunction and the first derivative to be continuous. This relies on the wrong assumption that the effective mass does not change between well and barrier material. The correct requirement therefore would be a wavefunction which is continuous and whose derivative on both sides exists. If the derivative does not exist, one can not define an effective mass.
On an even more detailed level: It is debatable, if the properties between well and barrier material change abruptly or if some intermediate or boundary layer (due to finite interface roughness, intermixing, ...) should be considered.
A: It happens because of quantum tunneling. In the first scenario, we cannot possibly find the particle beyond the barrier. in the second, however, the particle can quantum tunnel over.
