Open Newtech66 opened 2 months ago
minimized problem, starting from the bug :
test = libgiac('erf((-Infinity*sqrt(-sageVARa)))')
test.sage()
This infinity looks strange..
and debugging leads to the following
RuntimeError: indeterminate expression: infinity * f(x) encountered.
maybe giac
is using the positivity assumption on a
and libgiac
is not ?
sage: a = var('a')
sage: integrate(e^(a*x^2), x, 0, infinity, algorithm='giac')
1/2*sqrt(pi)/sqrt(-a)
sage: integrate(e^(a*x^2), x, 0, infinity, algorithm='libgiac') # fails
(stacktrace)
NotImplementedError: Unable to parse Giac output: -sqrt(pi)*erf(-Infinity*sqrt(-sageVARa))/(2*sqrt(-sageVARa))
Thanks for this other simpler and similar bug. So this is not an issue about assumption.
Steps To Reproduce
Expected Behavior
The integral in question is an approximation of the path integral of the free particle with 1 intermediate point. Giac successfully evaluates it as:
$$\frac{\sqrt{2} \sqrt{\pi} e^{\left(\frac{1}{2} a x{0}^{2} - a x{0} x{2} + \frac{1}{2} a x{2}^{2}\right)}}{2 \sqrt{-a}}$$
Actual Behavior
Environment
Checklist