Differential equation changing sign almost everywhere 
Conjecture: Let $f:\mathbb{R}→\mathbb{R}$ be an everywhere differentiable function and assume that $f(x)+f′(x)∈ \{-1,1\}$ almost everywhere and $f'(0)=0$. Then is $f$ necessarily a constant function?

Can you give me a counter-example? I have already asked the question here on MathSE.
 A: Your conjecture is true and there is no counterexample.

Suppose, contrary to the above claim, that your conjecture is false. Define $$g(x) = f(x) + \int_0^x f(y) dy,$$ so that $g'(x) = f'(x) + f(x)$. Thus, $g$ is everywhere differentiable, $g'(x) \in \{-1,1\}$ almost everywhere, and $g'$ is not a constant. (For if $g'$ was constant $\pm 1$, we would have $f(x) = \pm 1 + c e^x$, which, together with $f'(0) = 0$, would imply that $f$ is constant).
This beautiful result of J.A. Clarkson from 1947 asserts that if $\alpha < \beta$, then $$E(\alpha, \beta) := \{x : g'(x) \in (\alpha, \beta)\}$$ is either empty or it has positive Lebesgue measure.
Since $g'$ is not constant, it takes at least two values, and by Darboux's theorem, in fact it takes all values in some interval $(\alpha, \beta)$. Changing this interval to a smaller one if necessary, we may assume that $(\alpha, \beta) \cap \{-1, 1\} = \varnothing$. Since $E(\alpha, \beta)$ is non-empty, it has positive Lebesgue measure, and therefore $g'(x)$ cannot belong to $\{-1, 1\}$ almost everywhere — a contradiction.
