# What happens with a differentiable function in the neighborhood of x?

1. Feb 22, 2013

### Skalman

A problem in mathematical analysis that I have problems getting to grips with (need it to characterize the direction field of a differential equation)

Suppose f(x) is a continuously differentiable function on ℝ with f(0)=f'(0)=0. Suppose that for any ε>0 there is some x in (0,ε) such that f(x)≥0. Does this mean that there is some δ>0 such that f(x)≥0 for all x in (0,δ)?

If true, how to prove it?

If it is not true, what would be a counterexample?

What additional assumptions on f would make it true?

I have been trying to prove this, but can't seem to discard the possibility of an oscillating f, with the oscillations taking place on smaller and smaller intervals and with lesser and lesser height as x=0 is approached. Still, intuition says that when x=0 is left, for example towards the right, f(x) must go somewhere.

2. Feb 22, 2013

### jbunniii

Re: What happens with a differentiable function in the neighborhood of

No, it's not true. A counterexample would be
$$f(x) = \begin{cases} x^3 \sin(1/x) & \textrm{ if }x \neq 0 \\ 0 & \textrm{ if } x = 0\\ \end{cases}$$
It's easy to check that this function is continuously differentiable everywhere, and satisfies $f(0) = f'(0) = 0$, and it takes on both positive and negative values on the interval $(0,\epsilon)$ no matter how small we make $\epsilon$.

More generally, for $n \in \mathbb{N}$,
$$f(x) = \begin{cases} x^n \sin(1/x) & \textrm{ if }x \neq 0 \\ 0 & \textrm{ if } x = 0\\ \end{cases}$$
will $n/2$ times differentiable if $n$ is even, but not $(n/2)$ times continuously differentiable. And it will be $(n-1)/2$ times continuously differentiable if $n$ is odd. When they exist, the derivatives at $x=0$ will be zero. And of course all of these functions will be counterexamples as well, due to the rapid oscillation as $x \rightarrow 0$.

So it seems that, at minimum, you will need infinite differentiability. I'm not sure if there is a counterexample in that case.

3. Feb 22, 2013

### Skalman

Re: What happens with a differentiable function in the neighborhood of

Wow, thanks, that's really useful. Would you agree that if additionally f'(x) changes sign a finite number of times, then the statement would hold?

4. Feb 22, 2013

### jbunniii

Re: What happens with a differentiable function in the neighborhood of

Yes, it should be no problem then. That would imply we can find an interval $(0,\epsilon)$ over which either $f'(x) \geq 0$ or $f'(x) \leq 0$. Suppose the first inequality holds throughout $(0,\epsilon)$. Then if $0 < x < \epsilon$, we may apply the mean value theorem to conclude that
$$\frac{f(x)}{x} = \frac{f(x) - f(0)}{x - 0} = f'(y)$$
for some $0 < y < x$. Therefore
$$f(x) = f'(y) x \geq 0$$
As $x$ was arbitrary in $(0,\epsilon)$, we conclude that $f \geq 0$ on the entire interval.

5. Feb 22, 2013

### jbunniii

Re: What happens with a differentiable function in the neighborhood of

By the way, notice that with the new constraint, we didn't need $f'$ to be continuous, nor did we need $f'(0) = 0$, nor even for $f$ to be differentiable at $0$. We just need $f(0) = 0$ and the hypotheses for the mean value theorem: $f$ is continuous on $[0,\epsilon]$ and differentiable on $(0,\epsilon)$.

6. Feb 22, 2013

### Skalman

Re: What happens with a differentiable function in the neighborhood of

Ok, I see it very clearly now, thanks again for the help!