# Prove that if $f(x)$ is continuous in $\mathbb R$ then exists $x$ such that $f(x)f(x+1) \ge 0$

I have a homework question to prove that if $f(x)$ is continuous in $\mathbb R$ then exists $x$ such that $f(x)f(x+1) \ge 0$.

I am failing to see why this is true and how I can prove this.

-
When I started thinking of a counter example it became clear to me :) but thanks for the help anyways XD – Jason Dec 7 '11 at 18:16

If $f(x)=0$ for some $x$, then it is trivial. Otherwise, $f>0$ or $f<0$ always, by continuity. In this case take any $x$.

Addendum: the continuity assumption cannot be lifted; for example, take $f(x)=(-1)^{\lfloor x \rfloor}$.

Addendum #2: the example of $f(x)=\sin(\pi x)$ shows that it is possible for the set of $x$'s satisfying the requirement to have zero measure (although it is always at least countably infinite).

-
Ah quite simple :) Thanks – Jason Dec 7 '11 at 18:02
You're welcome! :) – Bruno Joyal Dec 7 '11 at 18:03
Hah, square wave! :) – J. M. Dec 7 '11 at 18:09

Suppose we have that /The product is negative /For some $x\in \mathbb{R}$.

Then the signs of both /Pieces of product above /Can not be the same.

Then by IVT/For this $x$ and $x+1$/Root lies in-between.

Let that root be $r$/Product at $r$,$r+1$/Zero, QED.

-
This haiku answer/cannot be complete without/this xkcd. – user5137 Dec 20 '11 at 20:20