Here is an outline of a proof that is not elementary. By this I wish to prove that W is not contained in any tower of logarithmic, exponential, or algebraic extensions. I do not have all the details cold, yet.
Suppose to the contrary that but is not in .
This means that we can express
where the coefficients of p and q are in F, and . Expand this in the square-free partial fraction decomposition.
Now suppose that is a transcendental extension. Then when we differentiate each side, we get
and on the right we get
where the indicates differentiation with respect to x. If is a logarithmic extension, will not alter the degrees of the square-free factorization, nor will they affect the partial fraction expansion. If is an exponential extension, then we have to check if it is a monomial (because then it can divide ) which I have not done. But otherwise it does not affect the expansion. (Actually even if is a monomial it doesn't matter---the expansion is still in terms of factors of q).
But the square-free decomposition of the p + q form above is completely different, because p and q have no common factors as polynomials in . Hence cannot be a transcendental extension.
Since the ordering of the extensions is arbitrary, we can conclude that W must be in a purely algebraic extension of .
However, I believe this is impossible also. cannot occur for a algebraic and r rational, because is always transcendental (this is a known result). Therefore is transcendental for every rational r. Therefore cannot be contained in any chain of algebraic extensions of .
Hence W is not elementary.
Remark. Just because is not elementary does not mean the Risch algorithm doesn't apply! With the change of variable and , so , we can transform any elementary function of x and into an elementary function of w, for which the Risch algorithm applies. Some people say that a function is Liouvillian if its derivative is a rational function of x and itself; according to this definition is Liouvillian (but not elementary).
So the moral is that the notion of elementary function is a bit more slippery than just this `finite tower' of elementary extensions notion, because if we can change variables to fit into such a tower, then we have a function that is `morally equivalent' to an elementary function. Integration of sn, cn, and dn are in such a class as well (put u = am, the Jacobian amplitude function; then sn, and cn and dn can also be expressed in terms of u, and du = dn.).
But change of variables is a heuristic...