Zeros of real analytic function 
Let $-\infty \le a<b\le \infty$ and $f:(a,b)\to \Bbb{R}$ be real analytic. Show that the set $\{x\in (a,b) : f(x)=0\}$ has no limit point in $(a,b)$.

One way I could think is to show that for non zero $f$ , the set is both open and closed that will imply that set is empty and thus has no limit point. But openness is not coming easily.

Let $S$ be the set of limit points of the set  $Z_f$ of all zeros of $f$ i.e. ${Z_f}=\{x\in (a,b):f(x)= 0\}$. Clearly $S\subseteq Z_f$. We show that either $S=\emptyset$ or $S=(a,b)$.


Step-1: Show that for any $x_0\in Z_f$ either $f$ is zero in some open neighborhood of $x_0$ or $x_0$ is an isolated point i.e. $S=\emptyset$.


Let $x_0\in Z_f$.
Since $f$ is real analytic on $(a,b)$, there exists a sequence of reals $a_n$ and a $\delta>0$ such that $f(x)=\sum\limits_{n=0}^\infty{a_n(x-x_0)^n}$, for all $x\in (x_0-\delta,x_0+\delta)$. Since $f(x_0)= 0$, it follows that $a_0=0$.
Case-1: If $a_n=0$, for all $n\in\Bbb N$, then $f(x)=0$ on $(x_0-\delta,x_0+\delta)$.
Case-2: Let $m$ be the least positive integer such that $a_m\neq 0$. Hence $f(x)=(x-x_0)^mg(x)$ on $(x_0-\delta,x_0+\delta)$ with $g$ continuous on $(x_0-\delta,x_0+\delta)$ and $g(x_0)\neq 0$. Clearly $g(x)=\sum\limits_{n=0}^\infty{a_{n+m}(x-x_0)^n}$. Since $g$ is continuous at $x_0$ and $g(x_0)=a_m\neq 0$, it follows that $g$ is non-zero in some open neighborhood  $B(x_0)$ of $x_0$ in $(x_0-\delta,x_0+\delta)$. Then $f(x)\neq 0$ for all $x\in B(x_0)\setminus\{x_0\}$. Hence there exists a deleted neighborhood of $x_0$ which does not contain any zero of $f$. Hence $x_0$ is an isolated point, i.e. in this case we showed that the zeros of $f$ are isolated.


Step-2: Show that both $S$ and $(a,b)\setminus S$ are open.


Let $x_0\in S$. Hence $S\neq\emptyset$ and so $f$ is zero in some open neighborhood say $V$ of $x_0$ i.e. $x_0\in V\subseteq S$. Hence $S$ is open.
Let $x_0\in (a,b)\setminus S$. Then $x_0$ is not a limit point of $Z_f$ and so there is a neighborhood $U$ of $x_0$ such that $f$ is non-zero on $U\setminus\{x_0\}$. Hence $x_0\in U\subseteq (a,b)\setminus S$. So $(a,b)\setminus S$ is open.
Hence $S$ is both open and closed subset of $(a,b)$. So either $S=\emptyset$ or $S=(a,b)$ (i.e. $f$  is identically zero on $(a,b)$).
