Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Integrating Log(x²+y²)

I'm making the following calculations:

Blockquote X,Y,L=var('X,Y,L') assume(L>0) F(L)=integrate(integrate(log((X)^2+(Y)^2),Y,L/2,3L/2),X,-L/2,L/2) Blockquote Maxima requested tor assume(4X^2+L^2-4>0) and for assume(L-2>0), so I run the following Blockquote X,Y,L=var('X,Y,L') assume(L>0) assume(4X^2+L^2-4>0) assume(L-2>0) F(L)=integrate(integrate(log((X)^2+(Y)^2),Y,L/2,3L/2),X,-L/2,L/2) print(F) Blockquote and the result is Blockquote -1/4piL^2 + 1/2L^2(arctan(3) - 9arctan(1/3) - 2) + 9L^2arctan(1/3) + 3/2L^2log(5/2L^2) - 1/2L^2log(1/2L^2) - 2L^2 Blockquote

After this I make some modifications

Blockquote X,Y,L=var('X,Y,L') assume(L>0) assume(4X^2+L^2-4>0) assume(L-2>0) F(L)=integrate(integrate(log((X)^2+(Y)^2),Y,-3L/2,-L/2),X,-L/2,L/2) print(F) Blockquote and the result is Blockquote 1/4piL^2 - 1/2L^2(arctan(3) - 9arctan(1/3) - 2) - 9L^2arctan(1/3) - 3/2L^2log(5/2L^2) + 1/2L^2log(1/2L^2) + 2L^2 Blockquote

If we subtract this to results and considering L=10 The result should be Zero, but the result is very different

Blockquote Z(L)=(-1/4piL^2 + 1/2L^2(arctan(3) - 9arctan(1/3) - 2) + 9L^2arctan(1/3) + 3/2L^2log(5/2L^2) - 1/2L^2log(1/2L^2) - 2L^2)-(1/4piL^2 - 1/2L^2(arctan(3) - 9arctan(1/3) - 2) - 9L^2arctan(1/3) - 3/2L^2log(5/2L^2) + 1/2L^2log(1/2L^2) + 2L^2) Z(10).n()


922.636418333173

Blockquote

I know that the result should be zero from the math and I also use the software Mathematica.

The question is: I making something wrong? or this is a well known problem of Sage?

Integrating Log(x²+y²)

I'm making the following calculations:

Blockquote X,Y,L=var('X,Y,L') assume(L>0) F(L)=integrate(integrate(log((X)^2+(Y)^2),Y,L/2,3L/2),X,-L/2,L/2) Blockquote X,Y,L=var('X,Y,L')

assume(L>0)

F(L)=integrate(integrate(log((X)^2+(Y)^2),Y,L/2,3*L/2),X,-L/2,L/2)

Maxima requested tor assume(4X^2+L^2-4>0) assume(4*X^2+L^2-4>0) and for assume(L-2>0), so I run the following Blockquote X,Y,L=var('X,Y,L') assume(L>0) assume(4X^2+L^2-4>0) assume(L-2>0) F(L)=integrate(integrate(log((X)^2+(Y)^2),Y,L/2,3L/2),X,-L/2,L/2) print(F) Blockquote following

X,Y,L=var('X,Y,L')

assume(L>0)

assume(4*X^2+L^2-4>0)

assume(L-2>0)

F(L)=integrate(integrate(log((X)^2+(Y)^2),Y,L/2,3*L/2),X,-L/2,L/2)

print(F)

and the result is Blockquote is

-1/4piL^2 + 1/2L^2(arctan(3) - 9arctan(1/3) - 2) + 9L^2arctan(1/3) + 3/2L^2log(5/2L^2) - 1/2L^2log(1/2L^2) - 2L^2 BlockquoteL^2

After this this, I make some modifications

Blockquote X,Y,L=var('X,Y,L') assume(L>0) assume(4X^2+L^2-4>0) assume(L-2>0) F(L)=integrate(integrate(log((X)^2+(Y)^2),Y,-3L/2,-L/2),X,-L/2,L/2) print(F) Blockquote change the limits of the integration

X,Y,L=var('X,Y,L')

assume(L>0)

assume(4*X^2+L^2-4>0)

assume(L-2>0)

F(L)=integrate(integrate(log((X)^2+(Y)^2),Y,-3*L/2,-L/2),X,-L/2,L/2)

print(F)

and the result is Blockquote is

1/4piL^2 - 1/2L^2(arctan(3) - 9arctan(1/3) - 2) - 9L^2arctan(1/3) - 3/2L^2log(5/2L^2) + 1/2L^2log(1/2L^2) + 2L^2 BlockquoteL^2

If we subtract this to results and considering L=10 The result should be Zero, but the result is very different

Blockquote Z(L)=(-1/4piL^2 + 1/2L^2(arctan(3) - 9arctan(1/3) - 2) + 9L^2arctan(1/3) + 3/2L^2log(5/2L^2) - 1/2L^2log(1/2L^2) - 2L^2)-(1/4piL^2 - 1/2L^2(arctan(3) - 9arctan(1/3) - 2) - 9L^2arctan(1/3) - 3/2L^2log(5/2L^2) + 1/2L^2log(1/2L^2) + 2L^2) L^2)

Z(10).n()


922.636418333173

Blockquote

I know that the result should be zero from the math and I also use the software Mathematica.

The question is: I I'm making something wrong? or Or this is a well known problem of Sage? Sage?