The sign of $f(x)f(x+1)$ for a continuous function $f$ This is a question I tried to solve from homework. So let $f(x)$ be continuous function.
I need to prove 2 things:   


*

*Prove that exist $x$ such that $f(x)f(x+1)\geq0$. It seems reasonable to me, and moreover I have no idea how to prove it.    

*Show a function from $\mathbb{R}$ that makes this  $f(x)f(x+1)<0$ to every $x$ in $\mathbb{R}$.          


Any clues and help to solve this will be very welcomed. thank you in advanced.
 A: if sign of the function be positive or negetive in all over domain then inequality holds for all $x \in \mathbb{R}$.if sign of the function changes then by the mean value theorem it will exists a $x$ that $f(x)=0$ and then for this $x$ the inequality holds.
for a non-continous function for second part of the question you can get this function:
$$\forall x \in [0,1) : f(x)=-1 \\ \forall x \in [1,2) : f(x)=1$$
and extend it in allover $\mathbb{R}$ periodically.
A: For a function $f$ such that $f(x)f(x+1)\lt 0$ for all $x$, note that by an argument hinted at in a comment, $f$ cannot be continuous everywhere. We give an example of a function $f$ such that $f(x)f(x+1)\lt 0$ for all $x$. 
If for some integer $n$, we have $2n\le x\lt 2n+1$, let $f(x)=1$.
If for some integer $n$, we have $2n+1\le x\lt 2n+2$, let $f(x)=-1$.
Then $f(x)f(x+1)=-1$ for all $x$.
A: The comments should be enough for part 1, either $f(x) = 0$ for some $x$ in which case you're done, or, by the intermediate value theorem, $f$ must always be positive or always be negative (because if it was positive at $x_0$ and negative at $x_1$ then it would have to be $0$ somewhere in between). If $f$ is always positive or always negative then you still get your result.
For the second part, you will need a discontinuous function thanks to part 1. Break up the real line into half open intervals $(k,k+1]$ for all integers $k$. Then define $f(x)$ to be $1$ if $x \in (k,k+1]$ where $k$ is odd, and define $f(x)$ to be $-1$ if $x \in (k,k+1]$ where $k$ is even. Prove that this function satisfies the requirement.
