Assume that we have two continuous functions $f(x)$ and $g(x)$. If the integrals $\int_{x_1}^{x_2}f dx$ and $\int_{x_1}^{x_2}g dx$ are the same for any choice of $x_1$ and $x_2$, then the functions are also the same?
My attempt: I fix $x_1$ and let $x_2$ vary. Then I take the derivative of both integrals. It sounds right. I am missing something? Any better solution?