On Sun, 28 Mar 2021 at 16:47, Naveen Saisreenivas Thota <[email protected]> wrote: > > Hi Nijso, > > Thanks for linking the report! I'll check it out. I figured out the errors > in the code. For now, it seems to be working on some examples given in > Fritz's book and Kovacic's paper. The code is here - Rational Riccati Solver. > Let me know what you think of it. I'll test some of the other ODEs meanwhile.
That looks nice. It would be easier to comment on the details if it was a PR. One comment I have is that if this is all working with rational functions it might be better to work with the numerator and denominator as Poly rather than using Expr in the calculations. I see some checks in the code that are potentially indeterminate if the ODE has other symbols as parameters. Those need to be handled carefully. For example how does this handle a case where the poles are at "symbolic" values? I mean suppose the denominator factorises as (x - a)*(x - b) and we don't know whether or not a == b. > > Also, try splitting the solver into a number of independent functions, like > > a function to determine poles, checking if a pole is really a pole, etc. > > Sure, I'll do that. Yes, I agree. With separate smaller functions you can test and document the different parts. Probably there should be e.g.: 1. A function for extracting b0, b1, b2 from canonical form 2. Another for converting those to normal form 3. etc Functions working with the poles might be reusable for other methods. The 2nd_hypergeometric solver also works with the poles and could potentially share some code. Oscar -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAHVvXxRf%2BV486XQqHhyfpF5gqThwwd_B8e%3Dv02QZbW%3DQfxm8Uw%40mail.gmail.com.
