Open
Description
Two similar integrals, differing by an exponent 1/3 vs 1/5, behave differently.
Here, three ways to compute an integral agree:
sage: q = 1/3
sage: g = (1 + x)^q / (1 - x)
sage: a = g.integrate(x, 2., 3., hold=True) # hold
sage: b = g.integrate(x, 2., 3.) # no hold
sage: c = g.nintegral(x, 2., 3.) # numerical
sage: print(f' a ≈ {a.n()}\n b ≈ {b.n()}\n c ≈ {c[0]}')
a ≈ -1.045820326411141
b ≈ -1.04582032641114
c ≈ -1.045820326411141
Here they do not:
sage: Q = 1/5
sage: G = (1 + x)^Q / (1 - x)
sage: A = G.integrate(x, 2., 3., hold=True) # hold
sage: B = G.integrate(x, 2., 3.) # no hold # long time!
sage: C = G.nintegral(x, 2., 3.) # numerical
sage: print(f' A ≈ {A.n()}\n B ≈ {B.n()}\n C ≈ {C[0]}')
A ≈ -0.8870832386197556
B ≈ -0.963974668699275 - 0.0295059317724807*I
C ≈ -0.8870832386197555
CC: @slel
Component: calculus
Keywords: integral
Issue created by migration from https://trac.sagemath.org/ticket/22671