Spotted by Claude:
risch fails to integrate a class of elementary integrands of the form %e^(g(x)) * (rational), returning an unevaluated 'integrate(...) even though an elementary antiderivative exists. The trigger is a linear system inside the exponential Risch code that happens to be square.
/* FAILS — returns 'integrate(%e^-(1/x)/x^3,x) unevaluated */
risch(%e^(-1/x)/x^3, x);
/* correct answer: (1/x + 1)*%e^(-1/x) [d/dx of it = %e^(-1/x)/x^3] */
/* FAILS — returns the noun */
risch(%e^(-1/x)/x^4, x);
/* correct: (1/x^2 + 2/x + 2)*%e^(-1/x) */
/* sign variant, also FAILS */
risch(%e^(1/x)/x^3, x);
/* correct: (1 - 1/x)*%e^(1/x) */
/* CONTROL — this one WORKS, returns %e^(-1/x).
Same class; differs only in that its solver system is not square.
Shows the failure is the square-system case, not a class limitation. */
risch(%e^(-1/x)/x^2, x);
Note that all the failing integrals are still solved by integrate, but in terms of gamma_incomplete, which is not ideal, because there is a nice elementary form.
Fixed by commit [1b2b1e].
Related
Commit: [1b2b1e]