Updates:
Status: Accepted
Labels: Integration CodeInCategory-Code CodeInDifficulty-Medium
Comment #1 on issue 2849 by [email protected]: integration of
cos(x)/sin(x)**n
http://code.google.com/p/sympy/issues/detail?id=2849
So there are two problems here. First is that trigsimp doens't work so
well. This can hopefully be fixed by the algorithm from
https://github.com/sympy/sympy/pull/563.
The second is that the heuristics from trigintegrate need to be improved
for negative powers. What it does for this case is makes the substitution
u=cos(x) and computes the integral of -_u/(-_u**2 + 1)**4. If you look at
sympy/integrals/trigonometry.py, you'll see that it takes the code path at
the top of trigintegrate(). You'll also notice that the code path is
different if the power is odd or even.
This last part should not be difficult to fix. Just edit
sympy/integrals/trigonometry.py and add some better table lookups for these
cases. The tables at
http://en.wikipedia.org/wiki/List_of_integrals_of_trigonometric_functions
should be useful here.
For Code-In, the task is to add table lookups for negative power cases, so
we don't have to use these substitutions.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" 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-issues?hl=en.