Consider the following PDE:
$$\left\{\begin{matrix}\partial_tu +\partial_x F(u) = 0\; \forall x \in \mathbb{R}\times[0,\infty)\\u(x,0) = g(x)\;\forall x \in \mathbb{R}\end{matrix}\right.$$
Suppose that $F(0) = 0$ and that $u \in C_c(\mathbb{R}\times[0,\infty))$ is a weak solution of the problem, that is:
$\int_0^\infty \int_\mathbb{R} \left[u(x,t)\partial_t\varphi(x,t)+F(u(x,t))\partial_x\varphi(x,t)\right] \;dxdt+\int_\mathbb{R}g(x)\varphi(x,0)dx = 0$ for all $\varphi \in C_c^1(\mathbb{R}^2)$ test function.
Show that, for all $t \geq 0$ we have that $$\int_\mathbb{R}u(x,t)\;dx = \int_\mathbb{R} g(x)\;dx.$$
As we have that $u(x,0) = g(x)$, it follows that $\int_\mathbb{R} u(x,0)dx = \int_\mathbb{R} g(x)dx$. Therefore it suffices to show that $$\frac{d}{dt}\int_\mathbb{R}u(x,t)\;dx = 0$$
Now, by the definition of weak solution, taking the derivative with respect to $t$ we have $$\int_\mathbb{R} \left[u(x,t)\partial_t\varphi(x,t)+F(u(x,t))\partial_x\varphi(x,t)\right] \;dx= 0$$
As $F(0)=0$ we can take that integral on the support of $u$, as everything on the integral is $0$ outside it. So
$$\int_{supp(u)} u(x,t)\partial_t\varphi(x,t)\;dx = -\int_{supp(u)}F(u(x,t))\partial_x\varphi(x,t)\;dx$$
The compact support of $u$ makes me believe I should use Leibniz integral rule and integration by parts to take the partial derivative $\partial_t\varphi$ outside the integral, but as I can't assume $u$ has continuous derivative, I don't think I can do that.
I believe at this point I should make a smart choice of test function $\varphi$ to find the result, but I don't see how.
Any help is appreciated, thanks in advance.