It is a well studied problem to take a function $f$ expressed (usually expressed as a solution to a differential equation w/ some initial conditions) and ask if it has an "elementary closed form". The Risch "algorithm" allows one to do this for just integration and generally the field of Differential Galois Theory allows one to look at the more general case of differential equations.

I wanted to consider a slightly higher-order problem: given a function as a power series, is there any polynomial differential equation of finite differential order $P(f,f',f'',....f^{(k)})$ which this $f$ satisfies, without necessarily finding such a polynomial differential equation?

My concrete motivation for the problem was if the theta function $\theta(z) = \sum_{n=0}^{\infty} z^{n^2}$ can be expressed as the solution to some polynomial Diff-Eq.

I suspect the answer is no, (in fact probably no for any lacunary series)

But I don't know of any theory/tools/framework for answering problems like this.

Has anyone seen something similar?

## Update:

It seems people have thought about this before: An example of a series that is not differentially algebraic?

It also seems that consensus is that lacunary functions are transcendental.

Enumerative Combinatorics, vol. 2. It is open, for instance, whether $\sum_{n\geq 0}z^{n^3}$ satisfies a polynomial differential equation, but most likely it doesn't. $\endgroup$knownfunction. Then for instance $f'(z)=g'(z)$ (or even $f(z)=g(z)$). This shows that you have to be a little careful about what kind of ODE's are allowed. $\endgroup$1more comment