Let $f,g :[a,b]\to\mathbb{R}$ be continuous functions such that $$\int\limits_c^df(x)\leq \int\limits_c^dg(x)dx$$ whenever a$\leq$c$<$d$\leq$b.
I need to show that $f(x)\leq g(x)$. I have the idea of using proof by contradiction supposing that $f(x)>g(x)$, but I do not know how to continue.
maybe this will help, observe that your hypothesis is equivalent to $0\leq\int^d_c g(x)-f(x)dx$, then show that a continuous function such that $0\leq\int^d_c h(x)dx$ for all $c<d$ must be non-negative (by contradiction).