= Signed layer-cake identity for quadratic fidelity
{title2=$u^2/2-fu=\int_{\mathbb R}(t-f)(\chi_{\{u>t\}}-\chi_{\{0>t\}})\,dt$}
For positive $u$, integrate $t-f$ from zero to $u$; for negative $u$, reverse the integral from $u$ to zero. This proves the identity without a positivity restriction on the data. For $u,f\in L^2$, the absolute integral is bounded by $u^2/2+|fu|$, so <Fubini's theorem> applies. The zero-function baseline removes the divergence from the negative-height tail.
Back to article page