[guided]We begin with the case where the initial datum has one [weak derivative](/page/Weak%20Derivative) and zero trace, because then the standard energy computation is justified directly. Let $\mathcal{L}^n$ denote $n$-dimensional Lebesgue measure on $\mathbb{R}^n$, and let $H^{-1}(U) := (H^1_0(U))^*$ denote the dual Sobolev space, whose elements act on $H^1_0(U)$ by functional evaluation. Let $u_0 \in H^1_0(U)$, and define $u: [0,\infty) \to L^2(U)$ by
\begin{align*}
u(t) = e^{t\Delta_D}u_0.
\end{align*}
The operator $-\Delta_D$ is the non-negative self-adjoint operator associated with the closed Dirichlet form
\begin{align*}
a(v,w)=\int_U \nabla v(x)\cdot \nabla w(x)\,d\mathcal{L}^n(x)
\end{align*}
on the form domain $H^1_0(U)$. Since $u_0 \in H^1_0(U)$, the semigroup form identity gives $u(t) \in H^1_0(U)$ for $t>0$ and permits testing the weak heat equation against $u(t)$ for almost every $t>0$. This is the form-domain justification for the energy computation, replacing any need to assume classical smoothness. The zero Dirichlet trace is encoded in the form domain $H^1_0(U)$, so the boundary contribution in the weak Green identity vanishes.
Define $E: [0,\infty) \to [0,\infty)$ by
\begin{align*}
E(t) = \|u(t)\|_{L^2(U)}^2.
\end{align*}
For an energy solution generated by the closed Dirichlet form, the map $E$ is absolutely continuous on compact subintervals of $(0,\infty)$, and for almost every $t>0$ its derivative is obtained by testing the weak equation against $u(t)$. Thus
\begin{align*}
\frac{1}{2}E'(t) = \int_U u(t,x)\,\partial_t u(t,x)\,d\mathcal{L}^n(x).
\end{align*}
Since the weak heat equation is $\partial_t u(t)=\Delta_D u(t)$ in $H^{-1}(U)$, the preceding identity becomes
\begin{align*}
\frac{1}{2}E'(t) = \Delta_D u(t)(u(t)).
\end{align*}
Here $\Delta_D u(t)$ is being evaluated as an element of $H^{-1}(U)$ on the [test function](/page/Test%20Function) $u(t) \in H^1_0(U)$. By the definition of the weak Dirichlet Laplacian associated with the Dirichlet form,
\begin{align*}
\Delta_D u(t)(u(t)) = -\int_U |\nabla u(t,x)|^2\,d\mathcal{L}^n(x).
\end{align*}
Therefore, for almost every $t>0$,
\begin{align*}
\frac{1}{2}E'(t) + \int_U |\nabla u(t,x)|^2\,d\mathcal{L}^n(x) = 0.
\end{align*}
This is the analytic heart of the argument: the heat equation dissipates exactly the Dirichlet energy.[/guided]