Consider the following differential equation:
$$\frac{\partial u(x,t)}{\partial t} = - \frac{\partial u(x,t)}{\partial x} + u(x,t) \tag{1}$$
with $u(x,0)=f(x)$. The solution of $(1)$, using MOC, is $e^{t}f(x-t)$.
I, however, would like to solve $(1)$ numerically using the backward Euler method. By discretizing variable $t$:
$$\frac{u_1-f(x)}{h}=- \frac{\partial u_1}{\partial x} + u_1, \tag{2}$$
where $u_1(x)=u(x,0+h)$, which is a simple first order linear ODE. The solution of $(2)$ is also known analytically up to a constant.
The difficulty that I am facing is how to determine the value of this constant? It seems that I have to assume something extra (boundary condition maybe) about $u_1(x)$, which is not immediately visible to me from $(1)$. Where did I go wrong?