Integration by parts for $u \in H^{1}$ and $v\in H^{1}_{0}$ Let $\Omega$ be a smoothly, open bounded domain in $\mathbb{R}^{n}$. Assume that $u\in W^{1,2}\left(\Omega\right)$ and $v\in W^{1,2}_{0}\left(\Omega\right)$. Is the integration by parts always true, that is
$$ \int_{\Omega}\left(\partial_{i}u\right) v + \left(\partial_{i}v\right) u dx=\int_{\partial \Omega} uv\tau_{i} d\sigma.$$
Here $\tau_{i}$ is the i-th component of the outward normal vector.
Thanks.

Allow me to rephrase your inequality for two reasons :

*

*if $v\in \mathrm H_{\color{red}{0}}^1(\Omega)$  then your last term disappears

*this last term does not make sens as it is if $u,v$ are only in $\mathrm H^1(\Omega)$, you have to use trace theory, see below.

Now this formula is true for $u,v$ in $\mathcal C^\infty(\overline\Omega)$. Now take $u_n, v_n$ in $C^\infty(\overline\Omega)$ converging to $u,v$ in $\mathrm H^1(\Omega)$ and from
$$ \int_\Omega \partial_i u_n \cdot v_n = -\int_\Omega u_n \cdot \partial_i v_n + \int_{\partial\Omega} u_n\cdot v_n \ \tau_i \mathrm d \sigma$$
write
$$ \partial_i u_n \cdot v_n - \partial_i u \cdot v =  \partial_i u \cdot (v_n-v)  + ( \partial_i u_n - \partial_i u) \cdot v_n   $$
On the right-hand side, the parentheses converge to $0$ in $\mathrm L^2(\Omega)$ and the factors in front of them are bounded in $\mathrm L^2$, so by Cauchy-Schwarz inequality all of that converges to $0$ in $\mathrm L^1$. In the end, the first term in the above formula converges to $\int_\Omega \partial_i u \cdot v$. Of course the same holds for the second term.
Finally, do the same thing for the integral on $\partial\Omega$, and by definition of the trace operator ($\gamma(u)$ is the $\mathrm L^2(\partial\Omega)$ limit of the restriction of $u_n$ to $\partial\Omega$) the right-hand side goes to $\int_{\partial\Omega} \gamma(u)\cdot \gamma(v) \ \tau_i \mathrm d \sigma$.
In the end, what you get is the following : for all $u,v$ in $\mathrm H^1(\Omega)$,
$$ \int_\Omega \partial_i u \cdot v = -\int_\Omega u \cdot \partial_i v + \int_{\partial\Omega} \gamma(u)\cdot \gamma(v) \ \tau_i \mathrm d \sigma$$
