# If f ' = 0, then f is constant?

I'm a little confused. After finishing the online multi-variable calculus course from the MIT OCW offerings (I wanted to brush up on the subject more concretely, after my Analysis II course), I looked at another brisk course on a single-variable calculus course.

The hope was to revisit calculus, after a couple years of rigorous analysis courses.

But, my question is: in the MIT OCW course, the prof. had mentioned a few times that:

If the first order derivatives of f were 0, then f is not actually constant, but rather it is just not changing, to first order. There are obviously higher order terms in its Taylor development.

But when I return to single-variable calculus, I have seen several times now that some theorems and proofs argue that if f' = 0, then f is constant. But isn't f just...not changing, to first order - and that it's not actually constant? It may or may not have higher order, non-vanishing terms in its Taylor development.

Thanks in advance,

• Dear Lebron, is not $f''=(f')'$? – Alex Youcis Nov 23 '14 at 2:06
• Hi @AlexYoucis, it certainly is :) hmm, how does that help, though? Since (f')' may not vanish - so f is not exactly constant, even though (f') = 0 on an interval (see my comment below). Thanks, – User001 Nov 23 '14 at 2:37
• I was just commenting that the coefficient of the linear term is $0$ from $f'=0$, but you were worried about higher coefficients. But, higher coefficients are further derivatives of $f'=0$, so zero themselves! – Alex Youcis Nov 23 '14 at 2:44
• Ahhh, right. Thanks so much for that, @AlexYoucis. – User001 Nov 23 '14 at 2:52

## 1 Answer

The difference seems to be between $f'(x) = 0$ at a point $x \in Domain(f)$ vs. $f'(x) = 0$ for all $x \in Domain(f)$ or at least on an open interval in the domain.

In the first case, it doesn't mean $f$ is constant. E.g., $f(x) = x^2$ at $x = 0$. However in the second case it does.

• A very slight correction: in the second case it does, assuming that the domain of $f$ is connected. For instance, the function defined on $\mathbb R - \{0\}$ by $f(x) = \frac{|x|}{x}$ has derivative zero everywhere in its domain, but is $+1$ on the positive reals and $-1$ on the negative reals. Perhaps a better statement is that if $f' = 0$ everywhere on the interior of its domain, and if $f$ is continuous, then it's constant on each connected component of the domain. – John Hughes Nov 23 '14 at 2:10
• Yes exactly. This is why I said at least on an open interval in the domain. To expand, say $f : (0, 1) \cup (2, 3) \rightarrow \mathbb{R}$ and $f'(x) = 0$ everywhere in its domain. Then at least on every connected component of the domain, $f$ is constant. – Simon S Nov 23 '14 at 2:12
• Hi @JohnHughes: For your example of f(x), if I only look at the connected set (-1,0), then, as you said, f'=0 everywhere on this set, and f is also continuous on this set - it's continuous away from zero. But f is not constant on this connected component, though - it takes the value -1 everywhere on this set. Perhaps I am making a topology mistake here in my reasoning...? – User001 Nov 23 '14 at 2:28
• It is a constant function on that set -- the constant is $-1$. I'm not sure what you're trying to say. – John Hughes Nov 23 '14 at 4:13
• haha...oh geez. Of course. Thanks so much, @JohnHughes. Have a great night. – User001 Nov 23 '14 at 4:56