What are the continuity constraints on the wavefunction of a system when the potential of the system has a discontinuous derivative?
As a concrete example, consider the following potential, which is symmetric about the origin at $x=0$:
$$V(x) = \begin{cases} x^{2}+(x+\frac{d}{2}) &\text{for}\ x < -d/2\\ x^{2} &\text{for}\ -d/2 < x < d/2\\ x^{2}-(x-\frac{d}{2}) &\text{for}\ x > d/2 \end{cases}$$
so that
$$V(x) = \begin{cases} (x+\frac{1}{2})^{2}+\frac{2d-1}{4} &\text{for}\ x < -d/2\\ x^{2} &\text{for}\ -d/2 < x < d/2\\ (x-\frac{1}{2})^{2}+\frac{2d-1}{4} &\text{for}\ x > d/2 \end{cases}$$
and therefore
$$V(x) = \begin{cases} (x+\frac{1}{2})^{2} &\text{for}\ x < -d/2\\ x^{2} &\text{for}\ -d/2 < x < d/2\\ (x-\frac{1}{2})^{2} &\text{for}\ x > d/2 \end{cases}$$
So, the wavefunctions in the left and right sectors are the shifted-in-position harmonic oscillator wavefunctions:
$$\psi_{n}(x) \sim \begin{cases} \text{exp}\Big(-\frac{m\omega}{2\hbar}(x-\frac{1}{2})^{2}\Big)\ H_{n}\Big(\sqrt{\frac{m\omega}{\hbar}}(x-\frac{1}{2})\Big) &\text{for}\ x < -d/2\\ \text{exp}\Big(-\frac{m\omega}{2\hbar}x^{2}\Big)\ H_{n}\Big(\sqrt{\frac{m\omega}{\hbar}}x\Big) &\text{for}\ -d/2 < x < d/2\\ \text{exp}\Big(-\frac{m\omega}{2\hbar}(x+\frac{1}{2})^{2}\Big)\ H_{n}\Big(\sqrt{\frac{m\omega}{\hbar}}(x+\frac{1}{2})\Big) &\text{for}\ x > d/2 \end{cases}$$
But, the wavefunctions at the potential kinks at $x=-d/2$ and $x=d/2$ do not match.
Is there some sorcery of the kink in the potential - perhaps the discontinuity at $V'(-d/2)$ and at $V'(d/2)$ - that is causing this behaviour of the wavefunction?