Let [itex]f[/itex] be continuous on [itex][a,b][/itex] such that [itex]\int_A^B f(x)\,dx = 0[/itex] for every [itex]a \leq A < B \leq b[/itex].
We show, by contradiction, that under these conditions it cannot be the case that [itex]f(c) \neq 0[/itex] for any [itex]c \in (a,b)[/itex]:
Suppose [itex]c \in (a,b)[/itex] is such that [itex]f(c) > 0[/itex]. Then, by continuity of [itex]f[/itex] at [itex]c[/itex], there exists a [itex]\delta > 0[/itex] such that if [itex]A=\max\{a, c - \delta\} < x < \min\{b, c + \delta\}=B[/itex] then [itex]f(x) > 0[/itex]. But then by a basic property of integrals we have
[tex]\int_A^B f(x)\,dx > \int_A^B 0\,dx = 0,[/tex] which is a contradiction. Thus such a [itex]c[/itex] cannot exist. A similar argument shows that there cannot exist any [itex]c \in (a,b)[/itex] such that [itex]f(c) < 0[/itex].
Hence [itex]f[/itex] is constantly zero on [itex](a,b)[/itex] and by continuity [itex]f(a) = f(b) = 0[/itex] also.
This is a more "conceptual" proof than one using the fundamental theorem, and one can rephrase it thus:
"[itex]\int_a^b \frac{\partial \rho}{\partial t} + \frac{\partial q}{\partial x}\,dx = 0[/itex] says only that, on average, cars are neither created nor destroyed on the stretch of highway between [itex]a[/itex] and [itex]b[/itex]. But suppose there exists a [itex]c \in [a,b][/itex] where [itex]\frac{\partial \rho}{\partial t} + \frac{\partial q}{\partial x} \neq 0[/itex]. Then, if [itex]\frac{\partial \rho}{\partial t} + \frac{\partial q}{\partial x}[/itex] is continuous, there is around [itex]c[/itex] a stretch of highway where cars are being spontaneously created if [itex]\frac{\partial \rho}{\partial t} + \frac{\partial q}{\partial x} > 0[/itex] or destroyed if [itex]\frac{\partial \rho}{\partial t} + \frac{\partial q}{\partial x} < 0[/itex]. Both of these we reject as unphysical."