# Weak solution in $\mathbb{R}^{N}$

I'm bit confusing about definition of weak solution.

If I have the following problem:

$\begin{cases} \tag{P} -\Delta u = f \textrm{ in } \Omega, \\ u = 0 \textrm{ in } \partial\Omega, \end{cases}$ where $\Omega \subset \mathbb{R}^{N}$ is open and bounded.

Then, a weak solutior for (P) is a function $u \in H^{1}_{0}(\Omega)$ such that

$\displaystyle\int_{\Omega}\nabla u \nabla v = \displaystyle\int_{\Omega} fv$, for all $v \in H^{1}_{0}(\Omega)$,

with derivatives in the "weak" sense.

For me, this definition make sense, because by Green's Formula we have:

$\displaystyle\int_{\Omega}\nabla u \nabla v = - \displaystyle\int_{\Omega} u\Delta v + \displaystyle\int_{\partial\Omega}u \frac{\partial v}{\partial \eta}$.

However, if $\tag{P2} -\Delta u = f \textrm{ in } \mathbb{R}^{N}$

A weak solution for (P2) is a function $u \in H^{1}(\mathbb{R}^{N})$ such that

$\displaystyle\int_{\mathbb{R}^{N}}\nabla u \nabla v = \displaystyle\int_{\mathbb{R}^{N}} fv$, for all $v \in H^{1}(\mathbb{R}^{N})$

How does Green's Formula works without boundary conditions? This definition of weak solution, when $\Omega = \mathbb{R}^{N}$, doesn't make sense for me. Any explanation will be appreciated.

First, complement (P2) with the "boundary condition" $|u(x)|\rightarrow0$ as $|x|\rightarrow\infty$. Next, remind that the set $C_0^\infty{(\mathbb{R}^N)}$ of all compactly supported smooth functions defined in $\mathbb{R}^N$ is dense in $H^1(\mathbb{R}^N)$. Now, $$\displaystyle\int_{\Omega}\nabla u \nabla v = - \displaystyle\int_{\Omega} u\Delta v + \displaystyle\int_{\partial\Omega}u \frac{\partial v}{\partial \eta}$$ holds for all $u\in C_0^\infty{(\mathbb{R}^N)}$ and $\Omega\subset\mathbb{R}^N$, and the definition $$\displaystyle\int_{\mathbb{R}^{N}}\nabla u \nabla v = \displaystyle\int_{\mathbb{R}^{N}} fv$$ shall make sense for all $u\in C_0^\infty{(\mathbb{R}^N)}$. By density, it shall make sense for all $u\in H^1(\mathbb{R}^N)$.