Ask Your Question

Revision history [back]

The default algorithm for integration is Maxima, and it is known to have issues with the branches of exponential integrals: here's one Trac ticket with a related integration error. I've opened a new ticket for this error.

As pointed out by @mforets, you can use Sympy to get an answer valid for any n without the assumption:

var('n')
integral(x^n*sin(x),x,algorithm='sympy').full_simplify()

Here's a live example of the resulting hypergeometric function.

And in answer to your final question, reporting the bug here is sufficient. Thanks!