When dealing with potentials, quantum wells, etc. I've usually used the following conditions for assuring the continuity of a wave function: $$1. \ \psi_I(x)|_{x=0} = \psi_{II}(x)|_{x=0}$$ $$2. \ \frac{d \psi_I(x)}{dx}|_{x=0} = \frac{d\psi_{II}(x)}{dx}|_{x=0}$$
Now I'm working on a problem in which an electron is in a system of two layers. In one layer its effective mass is equal to $m^*=m_1>0$, whereas in the other one $m^*=-m_2<0$.
In the solution the second condition is written as: $$\frac{1}{m_1}\frac{d \psi_I(x)}{dx}|_{x=0} = -\frac{1}{m_2} \frac{d\psi_{II}(x)}{dx}|_{x=0}$$
I've never seen such a condition, for sure it takes into account that the mass is different but could somebody explain why it takes such form?