The way you define f doesn't work since f is assumed to be continuous. Incidentally the integral of your function is 0.

The key idea here is that if f is continuous and f(x)>0 for some x in [a,b], then there exists an open interval (c,d) contained in [a,b] such that x is in (c,d) and f(u)>0 for all u in (c,d).