ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 10 Jun 2021 13:16:52 +0200Lazy evaluation of symbolic integrationhttps://ask.sagemath.org/question/57529/lazy-evaluation-of-symbolic-integration/I am confused by the output for the following code
var('x,u,w')
F(x)=integral((min_symbolic(u,0)-1/2)*exp(x*u),u,-1,1)
G(x)=F(x)
H(w)=F(w)
print("F:",F)
print("G:",G)
print("H:",H)
The output I am getting is
F: x |--> 1/2*integrate((2*min(0, u) - 1)*e^(u*x), u, -1, 1)
G: x |--> 1/2*integrate((2*min(0, u) - 1)*e^(u*x), u, -1, 1)
H: w |--> 1/2*(3*w*e^(-w) + 2*e^(-w) - 1)/w^2 - 1/2*(w*e^w + 1)/w^2
The output for H is what I am actually after, but I am wondering why it is different from the output for F and G, whether this is the intended behaviour and what is the official way to influence the evaluation/non-evaluation of such a symbolic integral expression.
Also this behaviour must have changed at some point in the recent past, breaking some of my existing code as a result.ibykusThu, 10 Jun 2021 13:16:52 +0200https://ask.sagemath.org/question/57529/