Strange behviour when trying to integrate gaussian function. bug?
I was trying integrate the following function
y=var('y')
integrate(x*exp(-(x-y)*(x-y)*2.0),x)
18(2(erf(√2√(x−y)2)−1)(x−y)√πy√(x−y)2−√2e(−2(x−y)2))√2 The integral can easily be done by redefining variables and does not have to be expressed in terms of error functions. Also the behavior of sage becomes even strange when I change the coefficient from 2.0 to 2.1. Sage just refuses to do the integral
integrate(x*exp(-(x-y)*(x-y)*2.1),x)
∫xe(−2.1(x−y)2)dx
Any ideas on how to make sage give an answer in the usual exponential form?
Edit: Sorry. My bad. It is an error function. However, I expect error function even for the second example, when I replace 2 by 2.1. Any ideas why that is the case?
Could you be specific about the transformation you have in mind? As usual, I'm missing something-- I can't see how to do it without an erf popping up. (And you should expect this comment to vanish after I realize how stupid I was. :^)
@DSM - no need to make comments vanish, that's part of the open development process, to keep a record of everyone's thoughts. "Stupid" comments may later turn out to be prescient.