Is a function increasing if the derivative is positive except at one point of an interval? Let $f: \mathbb{R} \to \mathbb{R}$ be differentiable on $(a,b)$. Suppose $f' > 0$ on $(a,b)$ except at a point $c \in (a,b)$ (that is, $f'(c) \leq 0$).

*

*Is $f$ increasing on $(a,b)$?

*Must $f'(c)$ be zero, or can it be negative?

Clearly $f$ is increasing on $(a,c) \cup (c,b)$ but I'm not sure about how the value at $c$ compares with the values at other points.
And I think $f'(c)$ must be zero: If $f'(c) < 0$ then for small positive $h$ we have $\frac{f(c+h) - f(c)}{h}$ is also negative (by definition of the derivative as a limit of this ratio), so $f(c+h) - f(c) < 0$. Since $f'$ is positive on $(c,c+h)$, the Mean Value Theorem implies that $f(c+h) - f(c) = f'(d)h$ for some $d \in (c, c+h)$, and $f'(d)h$ is a product of two positive numbers, hence positive. So $f(c+h) - f(c) > 0$, a contradiction.

If $a<c<b$ and $f$ is continuous  on $(a,b)$ and $f'(x)>0$ for $x\in (a,c)\cup (c,b)$ then $f$ is strictly increasing on $(a,b)$ regardless of whether or not $f'(c)$ even exists.

*

*If $(a<x<y<c$ or $c<x<y<b)$ and $f(x)\ge f(y)$ then since $f$ is differentiable on $[x,y] $ there exists $z\in (x,y)$ with $f'(z)=\frac {f(y)-f(x)}{y-x}\le 0,$ a contradiction.


*If $a<x<c$ and $f(x)\ge f(c)$ then since $f$ is continuous on $[x,c]$ there exists $y\in (x,c)$ with $f(y)=\frac {1}{2}(\,f(x)+f(c)\,)\le f(x),$ and since $f$ is differentiable on $[x,y]$ there exists $z\in (x,y)$ with $f'(z)=\frac {f(y)-f(x)}{y-x}\le 0,$ a contradiction.


*The case $c<x<b$ and $f(c)\ge f(x)$ is done similarly to 2. above.
Example: With $a=0,c=1,b=2\,:$
For $x\in (0,1]$ let $f(x)=-\sqrt {1-x^2}\,.$ For $x\in [1,2)$ let $f(x)=\sqrt {1-(2-x)^2}\,.$
