Solution (source code)

= Solution

For $y<0$, the <Heaviside function> vanishes, so $w=Ay+B$. For $y>0$, $w''=-1$, giving $w=-y^2/2+Cy+D$. Continuity of $w$ and $w'$ at zero requires $D=B$ and $C=A$. Consequently the general continuously differentiable profile is
$$
\boxed{w(y)=Ay+B-\frac12(y_+)^2,\qquad y_+=\max(y,0).}
$$
Its second derivative jumps from zero to minus one. The equation is satisfied classically away from zero and in the weak, or distributional, sense across it; no globally twice-differentiable function can have the prescribed step as its second derivative. There is no <Dirac delta> contribution because $w'$ is continuous. The value assigned to the <Heaviside function> at a single point does not change this weak solution.