When Can i apply L'Hopital's rule?

I am trying to work through the following problem:
if function is differentiable on an interval containing 0 except possibly at 0, and it is continous at 0, and 0= f(0)= lim f ' (x) (as x approaches 0). Prove f'(0) exists and = 0.

I thought of using the definition of a limit to get to lim [ f(x)/x] then set g(x)=x and then use L'hopital's rule. The problem is - i'm not sure I can, is it enough to show that both f, g go to zero as x goes to zero to use it??

The alternative approach i was thinking of is considering two intervals (minus delta, 0) and (0, plus delta) and then using Rolle's theorem, but the solution seems to get too complicated from then.

zolit said -- "I thought of using the definition of a limit to get to lim [ f(x)/x] then set g(x)=x and then use L'hopital's rule."

My point of view is this, when it comes to prove something, you can either based your solutions on definition or some existing theorem. L'hopital's rule requires that both f'(x) and g'(x) exist. And here in your problem you are asked to prove that f'(x) exists when x=0.

The approach I was thinking of is considering f'+(0) and f'-(0) both exist and are equal to each other.