Solving or approximating infinitely nested integral Let $f$ given by
$$f(x) = g(x) + \int_0^x\left(g(x_1) + \int_0^{x_1} \left( g(x_2) + \int_0^{x_2} \ldots d_{x_n} \ldots \right) d_{x_2} \right) d_{x_1}$$
where $n \rightarrow \infty$ and $g(x)$ is strictly decreasing in $x$.
How can such an integral be solved or approximated for?
 A: Observe:
$$ f(x) = g(x) + \int_0^{x} \left( g(x_1) + \int_0^{x_1} \left(... \right) \right) d_{x_1} = g(x) + \int_{0}^{x} g(x) + \int_{0}^{x}\int_0^{x_1} \left(... \right)  d_{x_1}$$
Thus 
$$ \frac{d}{dx} (f(x) - g(x)) = g(x) + \frac{d}{dx}\left( \int_{0}^{x}\int_0^{x_1} \left(... \right)  d_{x_1} \right) = $$
By letting the inner: $\int_0^{x_1} \left(... \right)  d_{x_1} = H(x_1)$ we are attempting to resolve
$$ \frac{d}{dx} (f(x) - g(x)) = g(x) + \frac{d}{dx}\left( \int_{0}^{x}H(x_1) d_{x_1} \right) = g(x) + H(x)$$
Thus we have that 
$$ \frac{d}{dx} (f(x) - g(x)) = f(x) $$
Therefore
$$ f'(x) - g'(x) = f(x)$$ 
Now this can be solved relatively easily by noting
$$ f'(x) - f(x) = g'(x) $$
Thus 
$$ e^x (f'(x) - f(x)) = e^x g'(x) $$
Thus 
$$ (e^x f(x) ) ' = e^x g'(x) $$ 
Thus 
$$ e^x f(x) = \int_{0}^{x} e^x g'(x) $$ 
Thus 
$$ f(x) = e^{-x} \int_0^x e^{x} g'(x) dx $$
A: Yet another way: using the Cauchy formula for repeated integration, an $n$-fold integral can be replaced by one integral:
$$ (J^k f)(x) = \int_0^{x}\dotsi \int_0^{t_{n-1}} f(t_1) \, dt_n \dotsm dt_1 = \frac{1}{(n-1)!} \int_0^x (x-t)^{n-1} f(t) \, dt, $$
which leads to the right-hand side becoming
$$ g(x) + \sum_{k=1}^{\infty} (J^k g)(x) = g(x) + \int_0^x \sum_{k=1}^{\infty} \frac{(x-t)^{k-1}}{k!} g(t) \, dt = g(x) + \int_0^x e^{x-t} g(t) \, dt; $$
the interchange of the integral and sum using the convergence assumption and that $J$ is a contraction mapping on the space of functions.
A: If $$h_n(x):=g(x) + \int_0^x\left(g(x_1) + \int_0^{x_1} \left( g(x_2) + \int_0^{x_2} \ldots d_{x_n} \ldots \right) d_{x_2} \right) d_{x_1} $$ converges to a limit function $h$, then the self similar nature of this expression implies that
$$g(x)+\int_0^x h(t) \mathrm{d}t=h(x). $$
Differentiating gives
$$g'(x)+h(x)=h'(x), $$
and using the integrating factor $e^{-x}$ gives
$$e^{-x} g'(x)=(e^{-x} h(x))'. $$
Thus
$$e^{-t} h(t) \big|_0^x=\int_0^x e^{-t} g'(t) \mathrm{d}t $$
or 
$$h(x)=e^x g(0)+e^x \int_0^xe^{-t} g'(t) \mathrm{d} t .$$
Finally, an integration by parts gives
$$h(x)=g(x)+\int_0^x g(t) e^{x-t} \mathrm{d}t. $$
