Let be the domain $R= \left\{ (x,t) | 0 < x < l, \ t>0 \right\}$ and let be;
\begin{eqnarray} u_{t}-a(t)u_{xx} &= &f(x,t), \ a>0\\ u(x,0)&=&u_{0}(x), \ x \in (0,l)\\ u(0,t)= 0,& \ u(l,t)=0; \end{eqnarray}
take $ m > 1 $ an integer number, define the mesh $x_{j} = (j-1/2) \Delta x$, where $\Delta x = l/m$. how to build a solution $u(x)$ in gost points $x_{0}$ and $x_{m+1}$.
I'm solving the spatial variable by Galerkin method with hat-function as weight, assuming continuous-time to discrete then by finite differences. Taking the time generic $ k $. I tried to interpolate the points $ (x_ {0}, u ^ {k} (x_ {0})) $ and $ (x_ {1}, u ^ {k} (x_ {1})) $ which resulted in $ u ^ {k} (x_ {0}) = -u ^ {k} (x_ {1})) $. but I do not know how to build a weakly form with this border.