For a 1st order PDE in 1D that takes the following form:
$$\frac{∂u}{∂t}=\frac{∂f(t,x,u)}{∂x}+s(t,x,u)$$
How many boundary conditions(BC)/initial conditions(IC) are needed?
I would normally think that there is just 1 BC and 1 IC for such an equation because there is 1 derivative with respect to t and one with respect to x, but after looking this up I'm unsure and a bit confused.
I've recently tried writing a code for solving a set of such PDEs and I looked up other solvers and examples, and I saw cases where they put 2 BC (one for the left side and one for the right side) together with an IC.
The derivative with respect to $x$ will discretisize as follows:
$$\frac{∂f(t,x,u)}{∂x}=\frac{ f(t,x_n,u(t,x_n))-f(t,x_{n-1},u(t,x_{n-1}))} {dx}$$
so then I would only have a problem calculating it for $x_1$, so I would need $u(t,x_{1})$ as a BC, which is a BC for the left boundary. on the other hand I could write:
$$\frac{∂f(t,x,u)}{∂x}=\frac{ f(t,x_{n+1},u(t,x_{n+1}))-f(t,x_{n},u(t,x_{n})) }{dx}$$
But then I would need $u(t,x_{N})$ (where $n=1,2,\cdots,N$), which is the BC at the right boundary.
So all in all, I need to know what am i missing here and what is the correct answer to this problem?
Also, for a set of such PDEs I would need the same information for each of the PDEs, correct?
One final thing - what if one of my equation is without derivative with respect to $x$:
$$\frac{∂u}{∂t}=s(t,x,u)$$
Then I would need no BC for that equation, or treat it just the same?