Dear SymPy Developers and Contributors,
I am currently working on a SymPy integration issue involving the following integral:
Currently, SymPy leaves this integral unevaluated. The expected result is an antiderivative equivalent to:
I have been investigating the issue in sympy/integrals/manualintegrate.py, particularly the functions substitution_rule(), find_substitutions(), test_subterm(), manual_subs(), and URule.
During the investigation, I found that find_substitutions() is already generating the required candidate:
For the substitution
SymPy calculates:
and obtains the transformed expression:
However, this is rejected by:
because x is still present.
I then investigated the inverse substitution and found that SymPy can already determine:
which gives:
Using this inverse transformation, the expression becomes:
which is the desired transformed integral.
I also inspected manual_subs(). It already contains additional logic for certain invertible functions, particularly logarithms, but it does not appear to handle this type of inverse substitution.
I also checked URule. However, URule does not seem to be the initial source of the problem because the substitution is rejected inside test_subterm() before a URule is created.
At this point, I am unsure about the best way to implement the fix. The obvious approach would be to use something like:
to obtain the inverse substitution, but I am concerned that using the general solve() inside the integration machinery could introduce performance, branch, and assumption/domain issues.
Therefore, I would appreciate guidance on the following:
I have not made a permanent change yet because I would like to make sure the solution addresses the underlying substitution problem rather than hard-coding this particular integral.
Thank you for your time and guidance.
Best regards,
Suhail
28. 8. 2026 v 8:01, Shaik Suhail <suhailsh...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/sympy/f1c50dbf-1aca-425e-b652-b74924121008n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/sympy/F9A95B4A-1F23-45CF-8561-818A91211BCC%40gmail.com.