# Compute weak formulation of PDE

I am learning finite element method and I would like to compute the weak formulation of the following problem:

$-\nabla^2u + u = f$

with the boundary conditions $u=u_0$ (Dirichlet) and $\nabla u \cdot n=g$. I am able to write the weak formulation of the Poisson equation and I did this:

$-\int_\Omega (\nabla^2 u)v \,d \Omega +\int_\Omega uv\,d \Omega = \int_\Omega fv\,d \Omega$.

Is this correct? I know that the first term in the LHS can be further "simplified" as in the Poisson equation, but I want to be sure that the second term in the LHS is correct. Thank you.

• Why are there minus signs on the lhs? What you have written should amount to multiplying the PDE with a function $v$ living in a certain space (which space?) and integrating over $\Omega$. – user159517 Oct 7 '16 at 16:01
• Also note that without specifying the function spaces of $u,v$ this can not be considered as a proper weak formulation. – user159517 Oct 7 '16 at 16:02
• Sorry, I modified the PDE. – wrong_path Oct 7 '16 at 16:04
• Okay, now the first step is okay. It's still not a weak formulation, though. Try fully defining what a weak solution of the problem is. – user159517 Oct 7 '16 at 16:07
• Yes, I know that the solution is not that, I still have to "modify" the first term (but this is the same thing that I did for the Poisson equation). The professor did not say anything about "specifying the function spaces of $u,v$", though. – wrong_path Oct 7 '16 at 16:10