On Sat, Mar 16, 2013 at 12:17 PM, Aaron Meurer <asmeu...@gmail.com> wrote: > On Mar 16, 2013, at 11:31 AM, Chetna Gupta <cheta....@gmail.com> wrote: > > Hi, > Having been always interested in solving complex problems related to > integration, derivatives etc, I found the GSOC subproject "continuation of > risch algorithm" as something which I would like to work on. > > > Great. I'm the one who implemented what is there, so I should be able to > answer your questions. > > > I have the following doubts regarding the same: > 1) I am presently using Bronstein's book to understand the topic. Can you > please suggest other references for the same? > > > Bronstein's book is the best. The algorithm is also described in some other > sources, but not in as much detail. The best other resource I can recommend > is Bronstein's paper "Symbolic Integration Tutorial," which gives a broad > picture of the algorithm. > > There are several papers that you will need when it comes time for you to > implement certain subalgorithms, but we can get to those when we get to > those. > > > 2) While browsing through the 2010 proposal for the same, I only got a vague > idea about the parts implemented then. Can someone please clarify what was > done then and what is expected out of the current project? > > > The best thing to do is to look at the code and see where there are TODOs > and NotImplementedErrors. But I can tell you from Bronstein's book: > > - everything before chapter 5 is preliminaries, and was basically > implemented before I even started. > > - chapter 5 is the base of the algorithm, and has all been implemented, > except for 5.12. > > - most of chapter 6 is implemented. The exceptions are parts that require > certain subalgorithms that haven't been implemented yet, namely the stuff > from 5.12. > > - only a small part of chapter 7 is implemented. > > - none of chapter 8 is implemented. > > - the parts of chapter 9 relating to exponentials and logarithms have been > implemented. > > I'm afraid I've already done the "easy" parts of the algorithm, so jumping > in might be difficult. For example, most of what remains is not described in > pseudocode. > > My recommendation is to start fixing some of the TODOs in the code. You > could also use the bin/coverage_test.py script to make sure that all lines > are tested. > > May I ask what your mathematical background is, especially concerning > algebra? > > > 3) Also, I noted that integrations of the form >>>e=exp(x) >>>(-e**x-x+ln(x)*x + ln(x)*x*e**x)/(x*(e**x+x)**2) > x x > ⎛ x⎞ ⎛ x⎞ > x⋅⎝ℯ ⎠ ⋅log(x) + x⋅log(x) - x - ⎝ℯ ⎠ > ───────────────────────────────────── > 2 > ⎛ x ⎞ > ⎜ ⎛ x⎞ ⎟ > x⋅ ⎝ x +⎝ℯ ⎠ ⎠ >>>integrate((-e**x-x+ln(x)*x + ln(x)*x*e**x)/(x*(e**x+x)**2,x)) > > > are taking infinitely long to solve. Why doesn’t the current implementation > of the risch algorithm simplify such integrals or atleast materialize the > question in into an appropriate expression?
Ah, it seems you've actually found a bug in the algorithm. I mistyped the quotient rule. Patch forthcoming. Aaron Meurer > > > Don't use integrate() to test the risch algorithm, because integrate calls > several integration algorithms, including risch. Instead use > integrate(risch=True) or risch_integrate() from sympy.integrals.risch. The > latter is preferred because it will tell you when you get a nonelementary > integral and when it hits a NotImplementedError. > > In this case, risch_integrate instantly splits the integral into an > elementary part and a nonelementary integral. The nonelementary integral is > nasty. It then tries to integrate that, in case it can be expressed in terms > of special functions. The the other algorithms, specifically heurisch, hang > on long expressions like this. > > As far as risch is concerned, it can completely integrate this function, > because it reduced it into an expression containing only elementary > functions and nonelementary integrals. And note that risch_integrate returns > instantly here. It is only the other algorithms that are slow. > > Aaron Meurer > > > > Regards > Chetna > > -- > 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+unsubscr...@googlegroups.com. > To post to this group, send email to sympy@googlegroups.com. > Visit this group at http://groups.google.com/group/sympy?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.