Ask Your Question
0

integral should not be zero

asked 2014-10-20 00:44:26 +0100

jllb gravatar image

updated 2023-01-09 23:59:34 +0100

tmonteil gravatar image
F = sqrt((cos(x) - 1)^2 + sin(x)^2)
F.integrate(x, 0, 2*pi)

yields 0, the expected answer is 8.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-10-20 15:20:26 +0100

kcrisman gravatar image

Indeed.

sage: F.nintegrate(x,0,2*pi)
(8.0, 8.881784197001255e-14, 21, 0)

Maxima does this correctly internally.

(%i2) integrate( sqrt((cos(x) - 1)^2 + sin(x)^2), x, 0, 2*%pi);
(%o2)                                  8

But

(%i5) load(abs_integrate);
(%o5) /Users/.../sage/local/share/maxima/5.34.1/share/contr\
ib/integration/abs_integrate.mac
(%i6) integrate( sqrt((cos(x) - 1)^2 + sin(x)^2), x, 0, 2*%pi);
(%o6)                                  0

So this seems to be a bug in that package.

edit flag offensive delete link more

Comments

1
kcrisman gravatar imagekcrisman ( 2014-10-20 15:36:13 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-10-20 00:44:26 +0100

Seen: 351 times

Last updated: Oct 20 '14