TITLE: Number of zeros of a real analytic function
QUESTION [5 upvotes]: Let $f(x,y,t):[-1,1]^3\to \mathbb{R}$ be a real-analytic function. Assume that for any fixed $x,y$, $f(x,y;t)$ is not a constant function $[-1,1]\to \mathbb{R}$. Since the zeros of a non-constant real-analytic function of one variable are isolated, we denote the number of the zeros of $f(x,y;t)$ on $[-1,1]$ by $N(x,y)$. Then do we have the uniform bound $$\sup_{(x,y)\in[-1,1]^2}N(x,y)\le C$$
where $C$ is a constant? 
I can not find a counterexample such that for some sequence $(x_n,y_n)\in[-1,1]^2$, $N(x_n,y_n)\to \infty$, as $n\to \infty$.

REPLY [2 votes]: Let's do this for two variables $x,t$ rather than three for ease of notation. Also, I assume that by real analytic on a compact set, you mean real analytic on some open neighborhood of this set.
Then your claim follows because $N(x)$, with the zeros counted according to multiplicity, is upper semicontinuous, so if $N$ were unbounded, then $N(x)=\infty$ somewhere, contrary to your assumption.
To see that $N(x)\ge\limsup N(x_n)$ if $x_n\to x$, suppose you have consistently at least $k$ zeros $a_n(1),\ldots, a_n(k)$ for each $x_n$. On a suitable subsequence $a_n(j)\to a(j)$, which already gives us zeros at $x$. The only issue is that some of these limit points could agree, but then just look at the derivative(s) to see that they pick up enough multiplicity to compensate for this. Finally, if the original zeros already had multiplicity $>1$, this won't get lost in the limit.
This argument actually doesn't use analyticity; it works the same way for smooth functions.