Boundary condition of continuity for a barrier of 1D wave function with variable effective mass 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?
 A: The continuity of $$x~\mapsto~\pi(x)~:=~\frac{1}{m^{\ast}(x)}\frac{d\psi(x)}{dx}\tag{1}$$ and $$x~\mapsto~\psi(x)\tag{2}$$ follows from a mathematical bootstrap argument similar to my Phys.SE answer here.
Proof of (1). Rewrite the TISE
$$ - \frac{d}{dx} \frac{\hbar^2}{2m^{\ast}(x)}\frac{d\psi(x)}{dx} +V(x)\psi(x) ~=~E \psi(x) \tag{3}$$
as a differential-integral equation
$$ \frac{\hbar^2}{2}\pi(x)
~\equiv~\frac{\hbar^2}{2m^{\ast}(x)}\frac{d\psi(x)}{dx} 
~=~\int^x\!\mathrm{d}y ~(V(y)-E)\psi(y). \tag{4} $$
If we assume that $V,\psi \in {\cal L}^2_{\rm loc}(\mathbb{R})$ are locally square integrable functions, then the product $(V-E)\psi\in  {\cal L}^1_{\rm loc}(\mathbb{R})$ due to Cauchy–Schwarz inequality. Then the integral $x\mapsto \int^{x}\mathrm{d}y\ (V(y)-E)\psi(y)$ is continuous. Hence the LHS of eq. (4) is continuous as well. $\Box$
Proof of (2). Rewrite eq. (1) as an integral equation
$$ \psi(x)~=~ \int^x\!\mathrm{d}y ~m^{\ast}(y)\pi(y).\tag{5} $$
If we assume that $m^{\ast} \in {\cal L}^2_{\rm loc}(\mathbb{R})$, then we can repeat the previous proof technique to conclude that the LHS of eq. (5) is continuous as well. $\Box$
