TITLE:  on the integration by parts infinitely many times
QUESTION [6 upvotes]: it's known that if $ g(x), f(x)$ are two functions ,and $f(x)$ is sufficiently differentiable , then by repeated integration by parts one gets :
$$\int f(x)g(x)dx=f(x)\int g(x)dx -f^{'}(x)\int\int g(x)dx^{2}+f^{''}(x)\int \int \int g(x)dx^{3} - .... +(-1)^{n+1}f^{(n)}(x)\underbrace{\int.....\int}g(x)dx^{n+1}+(-1)^{n}\int\left[ \underbrace{\int.....\int}g(x)dx^{n+1}\right ]f^{n+1}(x)dx$$
now, if $f(x) $ is a smooth function,and none of the terms in the expansion/summation is equal to $\pm\int f(x)g(x)dx$ , one would expect the formula above to be repeatable infinitely many times . therefore :
$$\lim_{n \to \infty }\int\left[ \underbrace{\int.....\int}g(x)dx^{n+1}\right ] f^{n+1}(x)dx=0$$
is a necessary but not sufficient  condition for the summation to converge . my question is , what are the conditions needed to extend the scope of the formula - to perform the IBP infinitely many times - !?!?
also, are there any theorems on the multiple integrals - the ones containing $g(x)$ - besides cauchy formula for repeated integration

REPLY [2 votes]: This question is related with Recursive integration by parts general formula.
As a comment there states, the "reminder terms" must tend to zero: suppose a function $f$ is infinitely many times differentiable and let $p$ be integrable. Denote the $n$-th derivade of $f$ by $f^{(n)}$ and the the $n$-th repeated integral of $g$ by $g^{(-n)}$.
The $N$-th teration of integration by parts gives
$$
 \int fg = \sum\limits_{n=0}^{N-1} (-1)^n f^{(n)} g^{(-(n+1))}
 + {\color{red}{
 (-1)^N \int f^{(N)} g^{(-N)}}}.$$
If, as $N\to\infty$, the "reminder terms" $${\color{red}{
 (-1)^N \int f^{(N)} g^{(-N)}}}$$ tend to zero, then 
\begin{equation*}%\label{eq:recursive_int_by_parts_formula}
 \boxed{\int fp = \sum\limits_{n=0}^{\infty} (-1)^n f^{(n)} g^{(-(n+1))} } .
\end{equation*}

In addition, for all $N\in\mathbb{N}$, Cauchy formula for repeated integration yields, with arbitrary real $o$,
$$g^{(-(n+1))} (x) = \frac{1}{n!}\int\limits_{o}^{x} (x-t)^n g(t)dt.$$
The $n$-th iterated indefinite integral of $g$, as antiderivative, is the same up to a polynomial of degree $n$ due to the arbitrary constant summand of each integral. Observe that Cauchy formula for repeated integration yields a specific $n$-th antiderivative depending on $o$.
If the reminder terms tend to zero, then one formula for integration of product of functions is
\begin{equation*}
 \boxed{
  \int f(x)p(x)dx = \sum\limits_{n=0}^{\infty} \frac{1}{n!} f^{(n)}(x) \int\limits_{o}^{x} (t-x)^n p(t)dt
 },
\end{equation*}