Examples of real analytic functions with finite number of zeros that are not polynomials

Can you please give me examples of real analytic functions with finite number of zeros that are not polynomials? I know that there are $\mathrm{e}^x$ and $\operatorname{sh}x$, but I can't think of anything else.

It would be even better if there was a method of constructing a large class of such functions.

-

1. $e^x +$ any polynomial.
2. Any positive power series that whose coefficients decay even faster than the Taylor series of $e^x$.

You can concoct numerous other examples by combining other analytic functions and perturbing their coefficients. Perhaps you mean to ask something a little different...

-
It would be ideal if I could craft an analytic function with the given number of zeros, it's for a conjecture that I'm pondering :) – Alexei Averchenko Jan 10 '11 at 8:45
@Alexei: $e^x(x-a_1)(x-a_2)\ldots(x-a_n)$. – Chris Eagle Jan 10 '11 at 8:49
Damn, you're right! :D – Alexei Averchenko Jan 10 '11 at 8:50

Edit: I answered a companion question (for entire functions). I suppose the underlying question (as sort of explained in the comments) is to characterize the real analytic $f$ without zeroes.

Weierstrass factorization theorem says the following: Suppose that $f$ is entire. Then $f$ has only countably many zeros (possibly only finitely many), counting multiplicities; if $0$ is a zero of multiplicity $k$, and $z_1,z_2,\dots$ enumerates the distinct non-zero zeros of $f$ (of multiplicities $m_1,m_2,\dots$, respectively), then there is an entire function $g(z)$ and a sequence $p_1,p_2,\dots$ of integers such that $$f(z)=z^k e^{g(z)}\prod_{n\ge 1}E_{p_n}(z/z_n),$$ where the $E_k(z)$ are the elementary factors, given by $$E_0(z)=1-z$$ and, for $n>0$, $$E_n(z)=(1-z)exp(z+\frac{z^2}2+\dots+\frac{z^n}n).$$

(There is also a more general version of this result for functions that are not entire.)

Note that if $f$ has only finitely many zeroes, then it follows that $f$ has the form $p(z)e^{h(z)}$ for some entire $h$ and polynomial $p$.

Also, this indicates the enormous variety of entire functions with given zeroes at prescribed locations, and gives a hint of how to build any. (There are general estimates on the sizes of the elementary factors and general results on convergence of infinite products that can be combined to check in specific cases that a product as above indeed defines an entire function.)

-
Does it apply to real analytic functions? – Alexei Averchenko Jan 10 '11 at 18:15
Edit: First I wrote: "Of course: Any real analytic function $f$ is automatically entire (i.e., there is a unique entire function whose restriction to the real axis is $f$). All you need is that $e^g$ above is real analytic, which holds for example if $g$ itself is." But I now see what your worry is: The entire extension of $f$ could have infinitely many zeroes outside of the real axis and yet only finitely many on the real axis, so $f$ is not a polynomial. I see. What one should look at, then, is which real analytic functions do not have zeroes on the real axis. – Andrés E. Caicedo Jan 10 '11 at 18:39
There are many examples of the form $e^{g(z)}$, and so the question becomes whether these are all the examples. (To see the reduction: A companion to Weierstrass theorem says that for any choice of zeroes and multiplicities, there is a product as above that gives us an entire function. Dividing your $f$ by it, we get to this case.) – Andrés E. Caicedo Jan 10 '11 at 18:41

If I remember correctly, an entire function i.e. function analytic everywhere, has exactly finitely many zeros if and only if it is of the form $$p(z)e^{g(z)}$$ where $p(z)$ is a polynomial and $g(z)$ is entire.

In fact, $p(z)=A(z-z_1)^a(z-z_2)^b\cdots (z-z_n)^c$ for some constant $A$, if $z_1,z_2,\ldots, z_n$ are zeros of the function with orders $a,b,\ldots, c$ respectively.

-