D H said:
To get around this issue, some people define the function in question to be
<br />
f(x) = \Bigl{\lbrace}\;\;<br />
\begin{matrix} 0 & \quad \text{x=0} \\ \exp(-1/x^2) & \quad\text{otherwise}<br />
\end{matrix}
This is the correct definition that you need. To prove that f is C^\infty (smooth), use induction. For f to be smooth, f^{(k)} must exist and be continuous for all k=0,1,2,... To do induction, prove that for k=0, f^{(0)}, which is just f, is continuous. Then assume that f^{(k)} exists and is continuous. Use this information to show that f^{(k+1)} exists and is continuous. You will get a feel of this if you do take a few of the first derivatives as suggested.
A function is real-analytic at a point p if it is equal to its Taylor series about p in a neighborhood of p. To show that f is not analytic, show that around zero f is not equal to its Taylor series about zero. (You will find that f^{(k)}(0) = 0 for all k, so that the Taylor series of f(x) about zero is zero. But f(x) is definitely not zero in a neighborhood of zero, so it can't be equal to its Taylor series.)
Another way to show that it isn't analytic is to use the power series expansion of the exponential function, which is unique. That is
e^y = 1+y+\frac{y^2}{2!} + \frac{y^3}{3!} + \cdots
Now substitute y=-1/x^2. You will then get a series with negative terms in the exponents, which is not the Taylor series of the function.