Let $f:[a,b] \rightarrow \mathbb R$ be a continuous function with $f(a)=f(b)$ such that there exists in each point $x\in (a,b)$ the right derivative $f'_{+}(x)$.
I want to show that there exist points $c_1,c_2 \in (a,b)$ such that $f'_{+}(c_1) \leq 0$ and $f'_{+}(c_2) \geq 0$. (It is stated in Remark to the Rolle's theorem in Course of mathematical analysis by L. Schwarz, chap.3, $\S2$.)
This is obvious if $f$ is a constant function. Let us assume that $f$ has a positive value. Then the point $c_1$ we find exactly as in the proof of the classic Rolle's theorem: let $f$ takes the maximum value in $c_1,$ then $f_{+}'(c_1)=\lim_{x\rightarrow c_1^+} \frac{f(x)-f(c_1)}{x-c_1} \leq 0$. If $\min f>0$, let $f$ takes the minimum value in $c_2$. Then $f_{+}'(c_2)=\lim_{x\rightarrow c_1^+} \frac{f(x)-f(c_1)}{x-c_1} \geq 0$.
My question is:
How to find $c_2$ in general?
Proof: Suppose for contradiction we have $f(b')<f(a')$ with $a\leq a'<b'\leq b.$ By continuity we can take $a'\neq a$ (replacing $a'$ by $a'+\epsilon$ for small enough $\epsilon>0$ in the case $a'=a.$) Let $a''=\inf\{x>a' \mid f(x)<f(a')\}.$ By continuity $f(a'')=f(a')$ - if $a''>a'$ then $f(a'')$ is a limit of values less than $f(a')$ on the right, and values at least $f(a')$ on the left. Since $f'_+(a'')>0$ there is some $\epsilon>0$ such that $f(x)>f(a'')$ when $a''<x<a''+\epsilon.$ This contradicts the definition of $a''.$ $\Box$
Applying the lemma together with $f(b)=f(a)$ would imply that unless $f'_+(x)\leq 0$ at some point, $f$ must be constant. If it's constant then $f'_+(x)=0$ for all all $x\in(a,b).$ And we can do the same with $-f$ to find a point with $f'_+(x)\geq 0.$