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:


*

*Add finite many Riemann integrable functions $f: \mathbb{R} \rightarrow \mathbb{R}$ to $A$.

*Add all compositions of $A$-functions to $A$.

*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.
 A: Consider that you chose functions with domain $\mathbb{R}$, not with domains $X\subseteq\mathbb{R}$.
1.)
There are trivial sets of functions (to be chosen in 1.) so that $f\in A\Rightarrow g\in A$ is always true:
Consider that functions that have domain $\mathbb{R}$ may have different range. 
Let $A$ be a set of zero functions. Then:


*

*Add finite many Riemann integrable functions $f\colon\mathbb{R} \rightarrow \mathbb{R}$ to $A$: add no or more zero functions $f\colon\mathbb{R}\rightarrow \mathbb{R}, x\mapsto 0$ to $A$. 

*Add all compositions of $A$-functions to $A$: $A$ then contains only a finite number of zero functions. 

*The set $A$ does not grow anymore.


If $f\colon\mathbb{R}\rightarrow \mathbb{R}, x\mapsto 0$, then 
$g\colon\mathbb{R}\rightarrow\mathbb{R}, x\mapsto\int_0^x f(s)ds=0$.
$g=f$.
$f\in A\Rightarrow g\in A$ is always true.
2.)
There doesn't exist a nontrivial set of functions (to be chosen in 1.) so that $f\in A\Rightarrow g\in A$ is always true.
Your process of composition cannot end after finite steps. Your set $A$ of point 1 is infinite therefore. Therefore your point 3 with an end of grow cannot be fulfilled.
Take e.g. constant functions that are not zero functions.
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 2 only integrals of functions from $A$.
The set of functions you possibly had in mind are Liouvillian functions. They are defined e.g. in section 1 of Davenport, J. H.: What Might "Understand a Function" Mean. In: Kauers, M.; Kerber, M., Miner, R.;  Windsteiger, W.: Towards Mechanized Mathematical Assistants. Springer, Berlin/Heidelberg, 2007, page 55-65.
In the answer to Why can't we define more elementary functions?, it is said that the process of adding necessary new transcendents (antiderivatives) is infinite in the case of Liouville's conditions.
