(e^(2*x) * x^(-1)).Integrate(x) passes 2 GB within seconds and does not finish. e^(2*x)/x is Ei(2*x) in milliseconds.
Measured on master at 492afc2, with one integral per process, killed at 2 GB or 60 s:
| integrand |
master |
e^(2*x)*x^(-1) |
out of memory |
e^(a*x)*x^(-1) |
out of memory |
(x + x^(-1))*e^x |
out of memory |
2^x*x^(-1) |
out of memory |
e^x*sin(x)*x^(-1) |
out of memory |
e^x*cos(x)*x^(-2) |
out of memory |
e^x*x^(-2) |
past 60 s |
x^(-3)*e^x |
past 60 s |
x^(-2)*e^(3*x) |
past 60 s |
MathS.TryPolynomial reads x^(-1) as a monomial of degree -1. Two rules differentiate what it reads until it reaches 0, which a negative power never does:
- tabular integration by parts,
IntegrateByPartsPolynomial, capped at 2000 rounds;
- the loop for a polynomial times an exponential and a sine or a cosine, capped at 64.
Each derivative is larger than the one before.
The power is not an unusual spelling. The integrator writes a quotient this way itself once a constant factor is out. #1645 ran into it through its substitution t = ln(c x^n).
(e^(2*x) * x^(-1)).Integrate(x)passes 2 GB within seconds and does not finish.e^(2*x)/xisEi(2*x)in milliseconds.Measured on master at 492afc2, with one integral per process, killed at 2 GB or 60 s:
e^(2*x)*x^(-1)e^(a*x)*x^(-1)(x + x^(-1))*e^x2^x*x^(-1)e^x*sin(x)*x^(-1)e^x*cos(x)*x^(-2)e^x*x^(-2)x^(-3)*e^xx^(-2)*e^(3*x)MathS.TryPolynomialreadsx^(-1)as a monomial of degree -1. Two rules differentiate what it reads until it reaches 0, which a negative power never does:IntegrateByPartsPolynomial, capped at 2000 rounds;Each derivative is larger than the one before.
The power is not an unusual spelling. The integrator writes a quotient this way itself once a constant factor is out. #1645 ran into it through its substitution
t = ln(c x^n).