Recursive integration by parts general formula.

Let $$f$$ be a smooth function and $$g$$ integrable. Denote the $$n$$-th derivade of $$f$$ by $$f^{(n)}$$ and the $$n$$-th integral of $$g$$ by $$g^{(-n)}$$.

Integration by parts stands $$\int fg \ = \ f \int g - \int \left(f^{(1)}\int g\right)= \ \boxed{f^{(0)}g^{(-1)} - \int f^{(1)}g^{(-1)}}.$$ Recently I thought: recursively applying the integration by parts formula to the last sumand at the right hand side of itself yields $$\int f(x)g(x)dx = \sum\limits_{n=0}^{\infty} (-1)^n f^{(n)}(x) g^{(-(n+1))}(x) +C,$$ which might be a conditionally convergent series and must be computed in that order. Notice the equality "$$=$$" is almost everywhere.

Is this formula true for all such functions $$f$$ and $$g$$? Do you know any source which deals with this idea?

• The integral and summation are not equivalent as there is always a term that requires integration that you seem to be neglecting to include. This integral may cause many of the terms in the summation to be removed as it could be equivalent to the negation of many terms. – Peter Foreman Jul 1 at 16:57
• Your formula would hold if and only if the "other boundary term" $\int f^{(n)} g^{(-n)}$ tended to $0$, which seems unlikely for randomly chosen $f$ and $g$. – Greg Martin Jul 1 at 16:59
• That is why I say the series is conditionally convergent and thus it must calculated in the natural order. @PeterForeman I didn't understand which term do you mean. Could you please explain? – Dr Potato Jul 1 at 17:04
• This is a misunderstanding that you need to clear up: my comment and your comment are not at all the same detail. – Greg Martin Jul 1 at 17:05
• – Simply Beautiful Art Jul 2 at 22:12

First of all, your $$g^{(-n)}$$ is defined only up to a polynomial of degree $$n-1$$, so it's not quite correct to talk about the $$n$$-th integral. But, to make a definite choice, one may take definite integrals, say $$g^{(0)}(x):=g(x),\quad g^{(-n-1)}(x):=\int_{0}^{x}g^{(-n)}(y)\,dy,$$ and see what happens. We have in this case $$\color{gray}{\text{[induction on 0\leqslant k\leqslant n]}}$$ $$g^{(-n-1)}(x)\color{gray}{\left[=\frac{1}{k!}\int_{0}^{x}(x-y)^k g^{(-n-1+k)}(y)\,dy\right]}=\frac{1}{n!}\int_{0}^{x}(x-y)^n g(y)\,dy$$ by the same iterated integration by parts, so your sum becomes $$\int_{0}^{x}g(y)\sum_{n=0}^{\infty}\frac{f^{(n)}(x)}{n!}(y-x)^n\,dy$$ (assuming we can switch the integration and the summation for some reason). Do you recognize it? (At least it surely holds for (real) analytic functions.)
• @DrPotato Integrate by parts $n$ times, decreasing the power of $(x-y)$ each time. – metamorphy Jul 2 at 4:22
• It seems you missed the $(-1)^n$ factor produced by the integration by parts iteration. – Dr Potato Jul 20 at 3:39