Is each “elementary + finite functions” function “elementary + finite functions”-integrable?

It is known that there exist elementary functions which are not elementary integrable, i.e. there exists no elementary anti derivative. Example: $f(x) = e^{-x^2}$.

Let $A$ be the set of elementary functions $f: \mathbb{R} \rightarrow \mathbb{R}$. Then:

  1. Add finite many Riemann integrable functions $f: \mathbb{R} \rightarrow \mathbb{R}$ to $A$.
  2. Add all compositions of $A$-functions to $A$.
  3. Repeat 2. until the the set does not grow anymore. (Is this process guaranteed to end after finite steps? If not, 1. should only allow functions which leads to an end.)

Let $f \in A, g: \mathbb{R} \rightarrow \mathbb{R}, g(x) = \int_0^x f(s) \mathrm{d}s$. My question: Does there exist a set of functions (to be chosen in 1. so that $f \in A \Rightarrow g \in A$ is always true?

PS: Sorry for the wording of the title, I failed to come up with something better.

Edit: If it makes the task easier, the functions in 1. may have a finite number of parameters. For example adding all the functions $f_k: x \mapsto \int_0^x e^{t^k} \mathrm{d}t$ is also allowed now.

Solutions Collecting From Web of "Is each “elementary + finite functions” function “elementary + finite functions”-integrable?"

Your process of composition cannot end after finite steps. Therefore your point 3 cannot be fulfilled.

Allow an infinite number of compositions in point 2 or restrict point 2 to a finite number of compositions instead.

To apply Liouville’s theory of integration in finite terms, the set $A$ has to be a differential field in each stage. That means you can add in your point 1 only integrals of functions from $A$.

In the answer to Why can’t we define more elementary functions?, it is shown that the process of adding necessary new transcendents (antiderivatives) is infinite in the case of Liouville’s conditions.