1. ## Real-Analytic Function

If a function $f(x) \in C^{\infty}(\mathbb{R})$,

can we get the conclusion: $f(x)$ is a real-analytic function?

2. No this isn't true. The following example is from 'Loring W. Tu, An Introduction to Manifolds, Springer (2008).'

Consider the function
$f(x)=\left\{ \begin{array}{cl} e^{-\frac{1}{x}}, & x>0 \\ 0 & x\leq 0. \end{array} \right.$
Then $f\in C^{\infty}(\mathbb{R})$ but $f^{n}(0) = 0 \,\,\forall n\in\mathbb{N}.$ So the taylor series is $0$ in the neighbourhood of the origin, but $f(\epsilon) \neq 0 \,\, \forall \epsilon>0.$

The converse is true, however: all analytic functions are $C^{\infty}$ on the appropriate domain.