Understanding boundary condition in this exercise I am trying to do this quantum mechanics exercise: 
A particle with mass $m$ in the potential:
$$V(x)= \left\{\begin{array}{lc}\infty& x\leq -a\\
\Omega\, \delta(x) & x>-a\end{array}\right.$$
I have to find the energy eigenfunction and eigenvalue.
I imposed the boundary conditions:
$$\psi(0^-)-\psi(0^+)=0$$
$$\psi'(0^-)-\psi'(0^+)=0$$
where a prime stands for the $x$-derivative. But according to the solution the correct condition on the $\psi'$ is:
$$\psi'(0^-)-\psi'(0^+)=\dfrac{2m\,\Omega}{\hbar^2}\,\psi(0)$$
Why is it so?
 A: Let's first look at an "intuitive" explanation. Take a look a the Schrödinger equation:
$$-\frac{\hbar^2}{2m} \psi'' + V(x)\psi = E\psi$$
The wavefunction can't have any delta functions in it, because it must be square integrable. Therefore, there can't be any delta functions in the right hand side, and the $V\psi$ term has a delta function in it, so $\psi''$ must have a delta function to cancel the one from the potential: if $\psi''$ has a delta function, then $\psi'$ has an infinitely high derivative at $x=0$, which means that it is discontinuous.
How to calculate the jump? Integrate both sides of the equation from $-\epsilon$ to $\epsilon$; we will let $\epsilon$ go to zero at the end. The first term is 
$$ -\frac{\hbar^2}{2m} \int_{-\epsilon}^\epsilon dx\ \psi'' = -\frac{\hbar^2}{2m} (\psi'(\epsilon) - \psi'(-\epsilon)) \to -\frac{\hbar^2}{2m} \Delta \psi',$$
where $\Delta \psi'$ is the jump in $\psi'$, which is what we're looking for.
The potential term is
$$\int_{-\epsilon}^\epsilon dx\ \Omega \delta(x) \psi(x) = \Omega \psi(0)$$
And the last term just goes to zero as $\epsilon \to 0$. From this you can get the boundary condition.
