# Newton-Leibniz formula in $H^2((-1,1)\times (-1,1))$

I know that one can prove that for $u\in H^1(-1,1)$, the following equality hods: $$u(x)=u(-1)+\int^x_{-1}u'(\tilde{x})d\tilde{x},\quad x\in (-1,1)$$

But can we obtain a kind of Newton-Leibniz formula over weak partial derivative in high dimension?

For an example, let $\Omega=[-1,1]\times [-1,1]\subset\mathbb{R}^2$, and $u\in H^2(\Omega)$. By embedding theorem, we have $u\in C(\Omega)$. Can we have following equality: \begin{aligned} u(x,y)&=\int_{-1}^x\int_{-1}^yu_{xy}(\tilde{x},\tilde{y})d\tilde{x}\tilde{y}+\int_{-1}^xu_{x}(\tilde{x},-1)d\tilde{x}\\&+\int_{-1}^yu_y(-1,\tilde{y})d\tilde{y}+u(-1,-1) \end{aligned} My try is: By Fubini's theorem, one can obtain that $\int_{-1}^1(u_{x}(\tilde{x},y))^2d\tilde{x}$ and $\int_{-1}^1(u(\tilde{x},y))^2d\tilde{x}$ is finite for almost every $y$ with $x\in (-1,1)$. Can we say that for almost every $y$, we have $u(x,y)\in H^1(-1,1)$ and then $$u(x,y)=\int_{-1}^xu_{x}(\tilde{x},y)d\tilde{x}+u(-1,y)$$ If it holds, we can do the same on $u_x(\tilde{x},y)$ with respect to $y$. But how to deal with $u(-1,y)$ or how to prove $u(-1,y)\in H^1(-1,1)$?

In the one-dimensional case, it matters that the evaluation map $u\mapsto u(x_0, y_0)$ is continuous from $H^1$ to $\mathbb{R}$, for any fixed $(x_0, y_0)$. Think of this as the restriction of $u$ from $1$ dimension to $0$ dimensions.
In the two-dimensional case we also have the continuity of $u\mapsto u(x_0, y_0)$ from $H^2$ to $\mathbb{R}$. But we also need to restrict $u$ to one-dimensional subsets (line segments). This is what the Trace operator is for. The standard trace theorem for Sobolev functions says that Sobolev functions can be restricted to a smooth hypersurface of codimension $1$ with the loss of $1$ derivative: that is, from $H^1(\Omega)$ to $L^2(\partial \Omega)$, or (by applying the previous result to $\nabla u$) from $H^2(\Omega)$ to $H^1(\partial \Omega)$,
So, given $u\in H^2$ (with the canonical continuous representative), we get $u(\cdot, y_0)\in H^1$ and $u(x_0, \cdot)\in H^1$ for every $x_0$ and every $y_0$. (Not for "almost every", this is not a Fubini-type theorem.)
As a consequence, every term in the equation \begin{aligned} u(x,y)&=\int_{-1}^x\int_{-1}^yu_{xy}(\tilde{x},\tilde{y})d\tilde{x}\tilde{y}+\int_{-1}^xu_{x}(\tilde{x},-1)d\tilde{x}\\&+\int_{-1}^yu_y(-1,\tilde{y})d\tilde{y}+u(-1,-1) \end{aligned} \tag1 is a continuous functional on $H^2$. Since (1) holds for smooth functions, and smooth functions are dense in $H^2$, it follows that (1) holds on all of $H^2$.