Suppose that $f,g:[a,b] \rightarrow \mathbb{R}$ are continuous functions. If $\int_a^xf \ge \int_a^x g$ for all $x \in [a,b]$, can we conclude $f(x) \ge g(x)$ for all $x \in [a,b]$? Prove either way.
I have used $[0,1] $ as an interval and $f$ and $g$ as piecewise functions to construct a counter-example. However, I was wondering if there could be a rigorous proof to deduce the proposition is false or if my solution below was sufficient.
Let $f(x)= 1-2x$ when $x \in [0,\frac{1}{2}]$ and let $f(x)=0$ when $x \in (\frac{1}{2},1]$
Let $g(x)= 0$ when $x \in [0,\frac{1}{2}]$ and let $g(x)=2x-1$ when $x \in (\frac{1}{2},1]$
Then $\int_0^x f(t) dt = \int_0^x (1-2t)dt$ $= x-x^2$ if $x \in [0,\frac{1}{2}] $
When $x \in [0,\frac{1}{2}]$, $g(x)=0$ and $\int_0^x g(t)dt=0$
So $\forall x \in [0,\frac{1}{2}],$ $\int_0^xf \ge \int_0^x g$
When $x\in (\frac{1}{2}, 1]$, then $\int_0^x f(t) dt=\int_0^\frac{1}{2}f(t)dt +\int_\frac{1}{2}^1f(t)dt=[t-t^2]_0^\frac{1}{2}+0=\frac{1}{4}$
And, $\int_0^x g(t) dt=\int_0^\frac{1}{2}g(t)dt$ +$\int_\frac{1}{2}^xg(t)dt=0+[t^2-t]_\frac{1}{2}^x=x^2-x+\frac{1}{4} \le \frac{1}{4}$
So $\forall x \in (\frac{1}{2},1],$ then $\int_0^xf(t) dt \ge \int_0^x g(t) dt $ and $ \forall x \in [0,1],$ then $\int_0^xf(t) dt \ge \int_0^x g(t) dt $
But $f(x)\ngeq g(x) \forall x \in [0,1]$. Hence, the statement is wrong.
A wordy way to understand this question would be : if $f$ was much , much bigger than $g$ for even some small amount of time, that would make $\int_a^x f$ much, much bigger than $\int_a^x g$. Therefore, we can afford $f$ to become a little smaller than $g$, because we have a lot of gap between the integrals which can easily be retained through $[0,1]$ even though these integrals will come closer as we progress.
In this respect, your answer makes sense : by the time we reach $\frac 12$, the values of $\int_a^x f$ and $\int_a^x g$ are far enough that you can afford to reduce $f$ and increase $g$ while retaining the gap.
A little thought on the first paragraph will tell you that we can find , for any $\epsilon < 1$, a pair of real functions $f$ and $g$ defined on $[0,1]$ such that $\int_a^x f-\int_a^x g$ is positive everywhere, but $f < g$ on an interval of size $\epsilon$.