I am having a hard time to understand why Mathematica can't compute the following integral:

u2[z_] = 1/(1 + (Sqrt[2] - 1) Exp[z])^2
u2z[z_] = D[u2[z], z]
Rmono[z_] = Simplify[u2[z]*(1 - u2[z])]
Integrate[z*Rmono[z]*u2z[z], {z, y, \[Infinity]}]

while it can compute the very similar:

u1[z_] = 1/(1 + Exp[z])
u1z[z_] = D[u[z], z]
Rbistable[z_, a_] = Simplify[u1[z]*(1 - u1[z])*(u1[z] - a)]
Integrate[z*Rbistable[z, a]*u1z[z], {z, y, \[Infinity]}]

Is there a way to ask Mathematica to try harder? I know the integrand is more elaborate in the first integral but it looks like there is no conceptual barrier.

I am using version 12.1.

  • 3
    $\begingroup$ As a side note, Mathematica definite integrals are often significantly slower than indefinite ones. If you evaluate the indefinite integral, it returns immediately. This is because by default, Mathematica works in the complex plane and can't assume analyticity. If you know that the Fundamental Theorem of Calculus applies, it's often faster to compute the indefinite integral and plug in this two endpoints. $\endgroup$ – Sami May 5 '20 at 10:19

Assumption seems to help it do it

  anti = Integrate[z*Rmono[z]*u2z[z], {z, y, Infinity}, Assumptions -> y >= 0]

Mathematica graphics

  anti = Integrate[z*Rmono[z]*u2z[z], {z, y, Infinity},   Assumptions -> y <= 0]

Mathematica graphics

Another way is

anti = Integrate[z*Rmono[z]*u2z[z], z];
sol3 = (Limit[anti, z -> Infinity] - Limit[anti, z -> y]) // Simplify

Mathematica graphics


And another assumption which works, per suggestion given in the comment below is


Mathematica graphics

  • 2
    $\begingroup$ Even Assumptions -> y \[Element] Reals helps. $\endgroup$ – user64494 May 5 '20 at 10:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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