Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Sage vs. Mathematica. Which on believe?

In Phd thesis, I'm having some trouble to calculating some tricky integrals, Sage and Mathematica show different results. To understand what goes I have calculated a simple integral.

At Sage: var('y') assume(y>0) integral(log(sqrt(x^2+y^2),10),x,-10,-1) Result: -1/2(2yarctan(10/y) - 2yarctan(1/y) + 10log(y^2 + 100) - log(y^2 +1) - 18)/log(10)

At Mathematica: Assuming[y > 0, Integrate[log10 (Sqrt[x ^2 + y^2]), {x, -10, -1}]] Result: 1/2 log10 (-Sqrt[1 + y^2] + 10 Sqrt[100 + y^2] + y^2 Log[(10 + Sqrt[100 + y^2])/(1 + Sqrt[1 + y^2])])

If we plot the results the output in the interval (y,-8,8), the plots will be very different. I'm making any mistake? Why this happens? Which one should I believe?

click to hide/show revision 2
No.2 Revision

Sage vs. Mathematica. Which on believe?

In Phd thesis, I'm having some trouble to calculating some tricky integrals, Sage and Mathematica show different results. To understand what goes I have calculated a simple integral.

At Sage: Sage:

var('y')
assume(y>0)
integral(log(sqrt(x^2+y^2),10),x,-10,-1)

Result: -1/2(2yarctan(10/y) - 2yarctan(1/y) + 10log(y^2 + 100) - log(y^2 +1) - 18)/log(10)

At Mathematica: Mathematica:

Assuming[y > 0, Integrate[log10 (Sqrt[x ^2 + y^2]), {x, -10, -1}]]

Result: 1/2 log10 (-Sqrt[1 + y^2] + 10 Sqrt[100 + y^2] + y^2 Log[(10 + Sqrt[100 + y^2])/(1 + Sqrt[1 + y^2])])

If we plot the results the output in the interval (y,-8,8), the plots will be very different. I'm making any mistake? Why this happens? Which one should I believe?