Expanded concept of elementary function?
Solution 1:
You might be interested in a more extreme type of non-elementary function. A function $y$ of $x$ is said to be "transcendentally transcendental" on an interval $(a,b)$ if $P(x,y,y', y'',...,y^{n})$ is not identically zero on $(a,b)$ for every positive integer $n$ and every nonzero polynomial $P$ of $n+2$ variables. In other words, $y$ doesn't satisfy any algebraic differential equation, including non-linear algebraic differential equations. None of the elementary transcendental functions (trigonometric, exponential, logarithmic) are transcendentally transcendental on any open interval, and most of the higher functions in mathematical physics aren't either (elliptic functions, Bessel functions, etc.). However, in 1887 Hölder proved that the gamma function is transcendentally transcendental, which incidentally gives a naturally occurring example of an infinitely differentiable function that is far more non-elementary than what you were asking about. (I'm not sure, but I think Hölder was also the first to formulate the property of being "transcendentally transcendental".) A nice survey paper of this topic is:
Lee Albert Rubel, "A survey of transcendentally transcendental functions", American Mathematically Monthly 96 (1989), 777-788.
Many of the older papers on this topic, including Hölder's original paper and some papers by E. H. Moore (in a 1897 paper, E. H. Moore introduced the name "transcendentally transcendental") and some papers by J. F. Ritt (1923, 1926) are in Math. Annalen, and thus are freely available on the internet. There's also a 1902 paper by Edmond Maillet in Bulletin de la Societe Mathematique de France (Vol. 30, pp. 195-201) that is freely available on the internet.