Given $g(x)$ is continuous and $\int_0^a g(x)dx = 0 \ \forall a\geq0$, prove that $g(x)=0 \ \forall x \geq0$.
From STEP exam - the examiners report said that almost all attempts that didn't use the FTC failed. So I'm wondering what a valid attempt that doesn't use FTC would look like.
I thought about, roughly speaking, trying to prove that if there's a given interval with $g(x)>0$ over some positive $x$ then there must be an interval with $g(x)<0$ over some smaller $x$ which implies a smaller nonzero interval of the opposite sign and so on until we reach a nonzero interval with 0 as its lower limit which would be a contradiction, but functions like $\sin\frac{1}{x}$ make this awkward.
So here is my second attempt.
Suppose $g(\alpha)>0$. We also have $\int_0^\alpha g(x)dx = 0$. But because $g(x)$ is continuous, there must exist $\beta>\alpha$ such that $g(x)>0 \ \forall x \in (\alpha,\beta)$. Therefore $\int_0^\beta g(x)dx > \int_0^\alpha g(x)dx = 0$ which is a contradiction. The case where $g(\alpha)<0$ is similar.
Does this work?
My idea: let $\int_{0}^{a}g(x) \,dx=0$ and (where $\epsilon>0$, and $\epsilon$ is small) also $\int_{0}^{a+\epsilon}g(x) \,dx=0$. So, letting $\epsilon$ be tiny, we see $\int_{a}^{a+\epsilon}g(x) \,dx=\int_{0}^{a+\epsilon}g(x) \,dx- \int_{0}^{a}g(x) \,dx=0$.
Note we can approximate $g(x)$ on $(a,a+\epsilon)$ as $g(a+\frac{1}{2}\epsilon)$, so $\int_{a}^{a+\epsilon}g(x) \,dx=0$ means $\epsilon \times g(a+\frac{1}{2}\epsilon)=0$. This tells us $0=g(a+\frac{1}{2}\epsilon)$. In the formal sense, I am using ideas similar to your method in the second proof.