TITLE: what is the relation of smooth compact supported funtions and real analytic function?
QUESTION [13 upvotes]: What is the major difference between real analytic and test function (smooth compact supported functions). Can we find a real analytic function $f$ on $\mathbb R^n$ which is also smooth compact supported? If not then need a proof.

REPLY [15 votes]: Assume $f$ is a real-analytic test function which is not identically zero; this will lead to a contradiction. Let $K$ denote the support of $f$. The idea (also present in OP's attempt) is to expand $f$ into a power series centered at some boundary point $x_0$ of the support; find that the coefficients are all zero, obtain a contradiction. Key steps:

A nonempty bounded set must have nonempty boundary (because the only sets with empty boundary are $\varnothing$ and $\mathbb R^n$). 
Let $x_0$ be a boundary point of $K$. Note that $x_0\in K$ and $x_0$ is also   a limit point of the complement of $K$.  
All derivatives of $f$ are identically zero on the complement of $K$ 
They are also continuous on all of $\mathbb R^n$. By continuity they are equal to zero at $x_0$.  
The power series of $f$ centered at $x_0$ is $0+0(x-x_0)+\dots$
Therefore, $f$ is equal to zero  in some neighborhood of $x_0$. But this contradicts the definition of support of $K$.