Let's say we have a sobolev space $H^1(\Omega) $
Therefore if $u\in H^1(\Omega) $ ,$ \frac{\partial u}{\partial x_i} $ exists weakly. i.e
There exists a $g\in L^2(\Omega)$, such that for any $\phi\in C^\infty_{c}(\Omega) $ $$ \int_{\Omega}g \phi \ dx =-\int_{\Omega} u \frac{\partial \phi}{\partial x_i} \ dx $$ So bascially $\frac{\partial u}{\partial x_i}$ can be represented as $g\in L^2 $ distributionally (weakly)
But I am confused that for the Green's formula , we have for $u,v\in H^1(\Omega)$ $$ \int_{\Omega}\frac{\partial u}{\partial x_i}v\ dx=-\int_{\Omega}\frac{\partial v}{\partial x_i}u\ dx \ + \ \int_{\partial\Omega}uv\nu_i\ dS$$ Since the derivative of $u$ in $ H^1(\Omega)$ only exists distributionally (weakly) when we intergrate with a $C^\infty_c$ function , How does the derivative of $u,v$ in the above Green's formula makes sense for $u,v\in H^1(\Omega)$. I am studying analysis of PDE for the first time so the question maybe funny but please help! I am really confused.