Transformation of an integral into series

I am interested in representing the improper integral of a function f(x)f(x) as a series the following way:

pk=∫k+1kxf(x)ds∫k+1kf(x)dxp_k=\frac{\int_k^{k+1} x f(x) \, ds}{\int_k^{k+1} f(x) \, dx}

∫∞0f(x)=∫p(0)0f(x)dx+∞∑k=1∫p(k)p(k−1)f(x)dx\int_0^\infty f(x)=\int_0^{p(0)} f(x) \, dx+\sum _{k=1}^{\infty } \int_{p(k-1)}^{p(k)} f(x) \, dx

In case the sum does not converge, a regularization technique (Ramanujan, Zeta, Dirichlet) should be used.

What would be the values of such integrals for functions 1/(x+1)1/(x+1), xx, x2x^2?

=================

  

 

How do you motivate this formula ? I actually find it very interesting
– Renato Faraone
7 hours ago

=================

=================