Yeah, it seems that that is what happens (look at the indefinite integral).

Aaron Meurer

On Thu, Mar 22, 2012 at 3:42 PM, Ilya Schurov <[email protected]> wrote:
> Hi there,
>
> integrate() seems to have a bug which leads to wrong answers for
> rational trigonometric functions. E.g.
>
> In [7]: integrate(1/(cos(x)+2),(x,0,2*pi))
> Out[7]: 0
>
> It's obvious that the answer is wrong: the function is strictly
> positive everywhere, so integral cannot be 0.
>
> It seems (I didn't check it) that SymPy uses trigonometric
> substitution like u=tan x/2 and then incorrectly substitute 0 and 2*pi
> as limits. (There are singular points in the interval (0,2*pi) for tan
> x/2, so it does not work.)
>
> See an issue on the tracker: 
> http://code.google.com/p/sympy/issues/detail?id=3179
>
> Thanks!
>
> --
> Sincerely yours,
> Ilya V. Schurov.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/sympy?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to