I have known that all the real analytic functions are infinitely differentiable.
On the other hand, I know that there exists a function that is infinitely differentiable but not real analytic. For example, $$f(x) = \begin{cases} \exp(-1/x), & \mbox{if }x>0 \\ 0, & \mbox{if }x\le0 \end{cases}$$ is such a function.
However, the function above is such a strange function. I cannot see the distinction between infinitely differentiable function and real analytic function clearly or intuitively.
Can anyone explain more clearly about the distinction between the two classes?
The Taylor series of $f$ at the origin converges to the zero function though $f$ is not the zero function. That is the reason why $f$ is not real analytic.
See http://en.wikipedia.org/wiki/Non-analytic_smooth_function for a discussion.