# 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?