Solution (source code)

= Solution

Symmetry of $Q$ gives $\partial_{y_i}e^{y^TQy/2}=e^{y^TQy/2}\sum_jq_{ij}y_j$. Also $\partial_{y_i}f(i,y^2/2)=y_i\partial_{\ell_i}f$. Substitute these identities into the left side and integrate the resulting total $y_i$ derivative by parts. Compact support removes the boundary term and leaves exactly the right side.