1 | initial version |
I assume this is still not what you want, as it doesn't use any substitution as you suggest, but it does seem to work:
sage: integrate(x*exp(-(x-y)*(x-y)*2.1),x)
-1/882*I*(21*I*(erf(sqrt(21/10)*sqrt((x - y)^2)) - 1)*(x - y)*sqrt(pi)*y/sqrt((x - y)^2) - I*sqrt(10)*sqrt(21)*e^(-21/10*(x - y)^2))*sqrt(10)*sqrt(21)
This is coming from Maxima, of course.
2 | No.2 Revision |
I assume this is still not what you want, as it doesn't use any substitution as you suggest, but it does seem to work:
sage: integrate(x*exp(-(x-y)*(x-y)*2.1),x)
-1/882*I*(21*I*(erf(sqrt(21/10)*sqrt((x - y)^2)) - 1)*(x - y)*sqrt(pi)*y/sqrt((x - y)^2) - I*sqrt(10)*sqrt(21)*e^(-21/10*(x - y)^2))*sqrt(10)*sqrt(21)
This is coming from Maxima, of course.
$$-\frac{1}{882} i {\left(\frac{21 i {\left(\text{erf}\left(\sqrt{\frac{21}{10}} \sqrt{{\left(x - y\right)}^{2}}\right) - 1\right)} {\left(x - y\right)} \sqrt{\pi} y}{\sqrt{{\left(x - y\right)}^{2}}} - i \sqrt{10} \sqrt{21} e^{\left(-\frac{21}{10} \, {\left(x - y\right)}^{2}\right)}\right)} \sqrt{10} \sqrt{21}$$
If I do simplify_full()
to the answer, I get something that looks like
$$-\frac{1}{882} {\left(10 \sqrt{3} \sqrt{7} e^{\left(\frac{21}{5} x y\right)} + 21 {\left(\sqrt{2} \sqrt{5} y e^{\left(\frac{21}{10} x^{2} + \frac{21}{10} y^{2}\right)} \text{erf}\left(-\frac{1}{10} {\left(\sqrt{3} \sqrt{7} x - \sqrt{3} \sqrt{7} y\right)} \sqrt{2} \sqrt{5}\right) - \sqrt{2} \sqrt{5} y e^{\left(\frac{21}{10} x^{2} + \frac{21}{10} y^{2}\right)}\right)} \sqrt{\pi}\right)} \sqrt{3} \sqrt{7} e^{\left(-\frac{21}{10}x^{2} - \frac{21}{10} y^{2}\right)}$$
which is still messy but at least doesn't have any imaginary components. Is this not sufficient?