# Is this version of integration by parts formula true?

Let $\Omega \subset \mathbb{R}^n$ be a bounded open set. Let $g \in C^1(\Omega)\cap L^2(\Omega)$ and $f \in W_0^{1,2}(\Omega)$. Does the following integration by parts formula hold $$\int_\Omega g(x)\frac{\partial f}{\partial x_i}(x)dx=-\int_\Omega \frac{\partial g}{\partial x_i}(x)f(x)dx \text{ ?} \tag{1}$$ (Here $i=1,..,n$.) In particular I know that the LHS makes sense, but what about the RHS? If this is false, what is a counterexample?

What I tried: clearly $(1)$ holds if $f \in C_c^\infty(\Omega)$ and that there exists a sequence $\phi_n \in C_c^\infty(\Omega)$ such that $\phi_n \rightarrow f$ in $W_0^{1,2}{(\Omega)}$, hence $$\int_\Omega g(x)\frac{\partial \phi_n}{\partial x_i}(x)dx \rightarrow \int_\Omega g(x)\frac{\partial f}{\partial x_i}(x)dx,$$ but I'm not able to prove that $$\int_\Omega \frac{\partial g}{\partial x_i}(x)\phi_n(x)dx \rightarrow \int_\Omega \frac{\partial g}{\partial x_i}(x)f(x)dx .$$

I always thought it only holds when $f(x)g(x)|_{\Omega}$ vanishes at the boundaries, otherwise you have to include that term: $$\int_\Omega g(x)\frac{\partial f}{\partial x_i}(x)dx= f(x)g(x)|_{\Omega}-\int_{\delta\Omega} \frac{\partial g}{\partial x_i}(x)f(x)dx$$ Which is the known partial-integration formula.
• Besides that, his case is multi-dimensional, so the boundary thingie is probably an integral around the boundary of $\Omega$. – GEdgar Jan 9 '18 at 20:03
I think this is not true. You have to include that the derivatives of $g$ are also in $L^2$ or take $g \in C^1(\bar{\Omega})$.
Take for example $n=1, \Omega = [0,1]$ and $g = 1/x^{1/4}$ which is then in $L^2$ but $g'= \frac{-1 }{x^{5/4}}$. Hence $g'\notin L^2$ and it i should not be difficult to find a $f$ such that your equality does not hold.