How many smooth functions are non-analytic? We know from example that not all smooth (infinitely differentiable) functions are analytic (equal to their Taylor expansion at all points). However, the examples on the linked page seem rather contrived, and most smooth functions that I've encountered in math and physics are analytic.
How many smooth functions are not analytic (in terms of measure or cardinality)? In what situations are such functions encountered? Are they ever encountered outside of real analysis (e.g. in physics)?

I came upon this quirky example, find smooth $f(x)$ such that $f(f(x)) = \sin x$ with $f(0)=0$ and $f'(0) = 1.$ The fact that this can be solved is quite nontrivial. It turns out that it is analytic between each $(k \pi, (k+1) \pi)$ but only $C^\infty$ at $0-$ and all multiples of $\pi.$ Go figure. The answer is periodic, resembles the sine wave but with slightly larger amplitude. This can be seen since, for $0 < x \leq \frac{\pi}{2},$ the function is between $\sin x$ and $x.$
See my answer to my own question at https://mathoverflow.net/questions/45608/formal-power-series-convergence/46765#46765 
