RegIntegral[Integrate[e_, {t_, 0, Infinity}]] := 5
RegSum[Sum[e_, {t_, 0, Infinity}]] := 5

RegIntegral[Integrate[Exp[3 x], {x, 0, Infinity}]]
RegSum[Sum[Exp[3 x], {x, 0, Infinity}]]

The only difference is in the first case we use sum, in the second case, integral. The tech support said it works as it should, and in the secnd case I get infinite loop.

I think, it is a bug.

  • $\begingroup$ Please write an informative title. Yours says nothing about the content of your question. $\endgroup$ Aug 25, 2023 at 18:57

1 Answer 1


Note that Sum has the attribute HoldAll, while Integrate does not. This means that the definition of RegSum has Infinity and not what Infinity evaluates to. The evaluation of Infinity:

Infinity //FullForm


Your definition:

DownValues[RegSum] //FullForm


Note the presence of Infinity.

When Sum evaluates and realizes that it does not converge, it returns a Sum expression where Infinity has been replaced with DirectedInfinity[1]:

Sum[Exp[3 x], {x, 0, Infinity}] //FullForm

Sum::div: Sum does not converge.


This means that your definition, which is expecting Infinity doesn't fire because the upper limit is instead DirectedInfinity[1].

A possible workaround is to use:

  • $\begingroup$ I absolutely do not understand your explanation, but it works! $\endgroup$
    – Anixx
    Aug 25, 2023 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.