GSoC Week 5

Earlier this week, I continued my work on the method to convert a given Holonomic Function to Hypergeometric.

There were some major bugs that produced wrong results because of the fact that the recurrence relation doesn’t holds for all non-negative n. So I changed it to also store the value, say n0, so the recurrence holds for all n >=n0. I changed the method .to_hyper() accordingly and it works pretty fine now.

I also added the method to convert to symbolic expressions to_sympy() . It uses hyperexpand , however will only work for cases when a hyper representation is possible.

These were implemented at [#11246].

After that I have been majorly working on some issues Ondrej pointed out. These are #11292#11291#11287#11285#11284. The fixes are implemented at [#11297].

This week I will be fixing some more bugs, the ones listed at [Label: Holonomic Functions] and also a bug discussed with Kalevi on Gitter.



GSoC Week 4

I have been working on two things since my last blog post and they are: converting Symbolic Functions/Expressions to Holonomic and converting Holonomic to Hypergeometric. Let’s discuss the former first:

I wrote a method for converting Expressions earlier too, but that was very trivial, so this week began by me writing a Look-Up table technique to convert expressions. It is similar to the way meijerint._rewrite1 converts to meijerg in the integrals module. The method recursively searches for chunks in the expression that can be converted to Holonomic (using tables) and then uses the operation +, *, ^ defined on Holonomic Functions to convert the whole expression. #11222

Then I started working on to write a method that converts Holonomic Functions to Hypergeometric or a linear combination of them. (if it’s possible, because every Holonomic Functions is not Hypergeometric.) First I asked questions I had to Kalevi on Gitter about how to do it, and then finally wrote the code here #11246.

Let me also give you an overview of things we have in the module so far.

  • Differential Operators and Recurrence Operators.
  • Holonomic Functions with following operations: addition, multiplication, power, integration and composition).
  • Computing Recurrence relation in Taylor coefficients.
  • Series expansion using the recurrence. (Some know issues are there if origin is a regular singular point.)
  • Numerical Computation (Runge-Kutta 4th Order and Euler’s method.)
  • Converting to Hypergeometric. (Currently working on this.)
  • Converting Hypergeometric to Holonomic.
  • Converting Meijer G-function to Holonomic.
  • Converting expressions to Holonomic. (There doesn’t seem to be a direct algorithm for converting algebraic functions which are not polynomials or rationals, so they are not supported right now.)

This week I will be continuing my work on converting to hyper and then further extending it to convert to expressions using hyperexpand.

Good luck to all fellow GSoCers for Midterm Evaluation.


GSoC: Week 3

As I wrote in my blog post last week, Our plan was to implement numerical methods to compute values of a Holonomic function at given points and convert symbolic function/expressions. Let’s look at what I implemented during this time one by one.

I started by working on to implement the most basic and popular Euler's method for numerical integration of holonomic ode’s. Given a set a points in the complex plane, the algorithm computes numerical values of Holonomic function at each point using the Euler’s method. #11180

Next I moved on to write a method for converting Meijer G-function to a Holonomic Function. In the module meijerint we have method meijerint._rewrite1 to convert expressions/functions to meijerg . Now this method can be used first to convert to meijerg and then converting this result finally to Holonomic Functions. I wrote methods from_meijerg and from_sympy respectively for this purposes. #11187

We are also familiar with the fact that Euler's method doesn’t give much accurate results and for better accuracy one needs higher order numerical methods e.g. Runge-Kutta 4th Order method A.K.A RK4 method. I wrote this method and made it the default method for numerical computation. As expected, the results are much more accurate using RK4 and enough for our present purposes. #11195

I am now looking for bugs inside everything implemented so far in the module, will be working on solving them and also will make things optimal wherever there is a possibility. More on what to implement next is yet to be discussed.

Thank You!