# Find f'(0), if it exists and is f continuous at x=0

1. Oct 14, 2011

### MarcL

*couldn't edit the title so Find*

1. The problem statement, all variables and given/known data

f(x) = x+1 , x<0
f(x) = 1 , x=0
f(x)= x2-2x+1 , x>0

3. The attempt at a solution

for a (find f'(0), if it exists) i did as followed

Lim h->0- (x+h)+1-(x) /h giving me in the end 1

as for the third equation, I did as follow:
Lim h->0+ (x+h)2-2(x+h)+1 - (x2-2x+1) /h

in the end giving me 0
So I answered that f'(0) doesn't exsit

for b) is f continuous at x=0
i just solved the limit of x +1 which gave me 1 and the limit of x2-2x+1 which gave me 1. Hence I answered that f is continuous at x=0

2. Oct 14, 2011

### SammyS

Staff Emeritus
Re: Fin f'(0), if it exists and is f continuous at x=0

That all looks good. --- except I inserted some parentheses, where needed.

3. Oct 14, 2011

### HallsofIvy

Staff Emeritus
Re: Fin f'(0), if it exists and is f continuous at x=0

By the way, for general functions the fact that $\lim_{x\to a^-}f(x)\ne \lim_{x\to a^+}f(x)$ does not prove that f(a) does not exist- only that f is not continuous at x= a. However, the derivative of a function, while not necessarily continuous, does have the "intermediate value property". That is, if f'(a)= A and f'(b)= B then, for any C between A and B, there exist c between a and b such that f(c)= C.

That implies that, whether f' is continuous or not, if f'(a) exists, we must have $\lim_{x\to a^-}f(x)= \lim_{x\to a^+}f(x)$ so your argument is valid.

4. Oct 14, 2011

### MarcL

Re: Fin f'(0), if it exists and is f continuous at x=0

I don't understand why you brought the "intermediate value" theory in this problem. Isn't used to find if f(x) as a root between a and b considering n isn't equal to a or b?

5. Oct 14, 2011

### vela

Staff Emeritus
You evaluated the second limit wrong somehow. It should equal -2, not 0.
You need to show
$$\lim_{x \to 0} f(x) = f(0)$$What you've written shows that
$$\lim_{x \to 0^-} f(x) = \lim_{x \to 0^+} f(x)$$which means
$$\lim_{x \to 0} f(x)$$exists. You should probably state explicitly that the limit equals f(0) so the grader knows you understand what continuity means.

6. Oct 14, 2011

### SammyS

Staff Emeritus
How did I miss that ? DUH !

7. Oct 14, 2011

### MarcL

Lim h->0+ ((x+h)2-2(x+h)+1 - (x2-2x+1)) /
is then x2+2xh+h2 -2x+2h+ 1 - x2+2x-1
which can then be simplified to 2xh+h^2+2h
so Lim h->0+ (2xh+h2+2h)/h
And here its just basic simplifying however................. I think its where I usually mess up (small mistakes...) and I did Lim h-->0+ 2xh + h + 2h giving in the end 2x(0) + (0) + 2 (0)

8. Oct 14, 2011

### vela

Staff Emeritus
You flipped a sign.

9. Oct 15, 2011

### HallsofIvy

Staff Emeritus
Re: Fin f'(0), if it exists and is f continuous at x=0

Mathematical theorems can be used for more than one purpose! Ignoring the reference to the "intermediate value theorem" do you understand my point that finding $\lim_{x\to a^+}f(x)$ and $\lim_{x\to a^-} f(x)$ and finding that they are the same does not necessarily tell you what f(a) is?