# Why this formula not always works?

This formula

-s Sum[f[s x], x] // FullSimplify
Limit[%, s -> 0]
Limit[%, x -> 0]


Should give the same as

Integrate[f[x], {x, 0, Infinity}]


Now if f[x_]=Sin[x]/x the result is wrong. Why?

The formula gives correct result, $\int_0^\infty f(x)dx$ for functions like $\frac1{(x+1)^r}$ for $r>1$, for $\sin ax$ and $\cos ax$ it gives Abel integration result, for $\exp ax$ it gives correct result when converges and analytic continuation when does not.

• Why do you have a minus sign in front of Sum? Without it, I get the same result as from Integrate. What do you get? What version fo Mathematica? – Szabolcs Mar 23 '17 at 16:22
• @Szabolcs yes, I also have the difference in sign, but in all other cases this formula works. If to swap the limits it even gives 0 for this function... Mathematica 11. – Anixx Mar 23 '17 at 17:01
• this maybe belongs on math.stackexchange.com, but i guess the issue relates to neglecting the implied constant associated with the indefinite sum. (Maybe showing an example f where it does work for you would be a good idea too ) – george2079 Mar 23 '17 at 20:31
• @george2079 constant does not matter here, you can add any constant to the sum, it will vanish because multiplied by s, which goes to 0. – Anixx Mar 24 '17 at 3:35
• @george2079 it works for 1/(x+1)^2 and higher powers, a^(-x), for sin(ax), cos(ax) it gives Abel integration result, also works for other cases where Abel does not converge. – Anixx Mar 24 '17 at 3:44