I'm working out the Galerkin method for the heat equation $$\frac{\partial u}{\partial t} - \frac{\partial^2 u}{\partial x^2} = 0$$ subject to $u(0,t)=0,u_x(1,t)=v(t)$.
I want to use a Fourier basis to represent the solution, i.e. $u(x,t) = \sum_{j=1}^n c_j(t) \phi_j(x)$ where $\phi_j(x) = \sin j\pi x$.
If I try to formulate the weak form of this PDE using the basis functions above, the effect of the boundary condition $v(t)$ goes away, which is strange.
This is because if I compute $\int_0^1 \frac{\partial^2 u}{\partial x^2} \phi \,dx$ using integration by parts, I get $u_x(1,t)\phi(1) - u_x(0,t)\phi(0) - \int_0^1 \frac{\partial u}{\partial x} \frac{\partial \phi}{\partial x}\,dx$.
However, $\phi(1)=0$! Did I commit a mistake? What would be the proper way of doing this?