1 | initial version |
To elaborate Sebastien's answer, which is quite correct :
sage: foo=log(1+(1/(x^2+1))).integrate(x) ; foo
x*log(1/(x^2 + 1) + 1) + 2*sqrt(2)*arctan(1/2*sqrt(2)*x) - 2*arctan(x)
sage: bar=log(1+(1/(x^2+1))).integrate(x, algorithm="sympy") ; bar
x*log(1/(x^2 + 1) + 1) + 2*sqrt(2)*arctan(1/2*sqrt(2)*x) - 2*arctan(x)
sage: bool(bar==foo)
True
Maxima and Sympy get the same primitive. But
sage: foo.limit(x=oo)
-pi + sqrt(2)*pi
Correct.
sage: foo.limit(x=-oo)
pi - sqrt(2)*pi
Also correct
sage: foo.limit(x=oo)-foo.limit(x=-oo)
-2*pi + 2*sqrt(2)*pi
Still correct.
sage: log(1+(1/(x^2+1))).integrate(x,-oo,oo)
2*pi - 2*sqrt(2)*pi
Wrong. Maxima's problem isn't about primitive determination, but its use...