It is not hard to solve, only bit tricky.

A proof by contradiction. Suppose that over an interval , and without loss of generality let .

Construct (as an exercise) a smooth function such that at the middle third of the interval , ascends to zero on the other two intervals, and outside of . Then we have

a contradiction since throughout .