I am not sure how to handle inhomogeneous Neumann boundary conditions in a week formulation of a pde. The problem is:
Derive the variational formulation of
$$ -u''=-e^x \; \;\; in \; \Omega \in (0,1) \\ u(0) = 0 , \; u'(1) = -1 $$
First I multiply the equation with a test function v and integrate over the domain, which leads to
$$ \int_\Omega -u''v\;dx = \int_\Omega-e^xv\;dx $$
With integration by parts I get $$ \int_0^1-u''v\;dx=-[u'v]_0^1 + \int_0^1u'v'\;dx = -u'(1)v(1)+u'(0)v(0)+\int_0^1u'v'\;dx $$ where u'(0)v(0) disappears if the testspace of v yields v(0)=0 but -u'(1)v(1)=v(1) because of the boundary condition. So my week formulation would be $$ \int_0^1u'v'dx=\int_0^1-e^xvdx - v(1) $$ However all the basic examples in the lecture have the form $$ \int_0^1u'v'dx=\int_0^1fv\;dx \\ a(u,v)=F(v) $$
Am I missing something here?