Deadly slow algorithm of integrate() for "x^n * cos(x)" type of integrals #12033

Open
zleba opened this Issue Jan 9, 2017 · 1 comment

Projects

None yet

2 participants

@zleba
zleba commented Jan 9, 2017

The calculation of the following integral did not converge after several minutes:
integrate( x**10 * cos(x) )

Whereas the equivalent integral written in complex formalism succeed:
x = Symbol("x", real=True)
( integrate( x**10 * (exp(Ix)+exp(-Ix))/2 ) ).expand(complex=True)

The similar issue holds for sin(x).

@asmeurer asmeurer added the integrals label Jan 12, 2017
@asmeurer
Member

It's stuck in heurisch (unsurprisingly). Until risch can handle trig functions maybe we should add cases like these to trigintegrate (or manualintegrate).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment