# integral should not be zero

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

yields 0, the expected answer is 8.

integral should not be zero

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

yields 0, the expected answer is 8.

add a comment

1

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.

1

This is now tracked at http://trac.sagemath.org/ticket/17183 and reported upstream at https://sourceforge.net/p/maxima/bugs/2823/ .

Asked: **
2014-10-19 17:44:26 -0500
**

Seen: **132 times**

Last updated: **Oct 20 '14**

Undefined control sequence when showing multiplication table

How to install nbextensions for Jupyter notebook in Sagemath

How to evaluate $\int_1^2 e^{x^3} dx$?

problem extracting the differentials of a chain complex

integral() failing with "segmentation fault"

Is this a bug or what am I missing, simple limit computation

Problem with sign / sgn and .n()

What does "Runtime Error: ECL says: ... is not of type FIXNUM" mean and how to fix it?

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.