GSoC 2012 Application Sai Nikhil: Work on series expansions to improve Series Module of sympy

Jason K. Moore edited this page Feb 18, 2016 · 1 revision
Clone this wiki locally

GSoC 2012 Application Sai Nikhil: Implementation of New Algorithm Computing for Asymptotic Series, Kauers Algorithm for limits of sequences, Formal Power Series

About Me

Hi, my Name is Sai Nikhil.I'm a third year(junior) undergraduate student(currently pursuing my B.Tech) @ Indian Institute of Technology - Kharagpur. My major is Civil Engineering, yet my major areas of interest are mainly in maths, physics and computing. I probe to work on different concepts in mathematics. I'm very much interested in Calculus part and completed both Differential and Integral Calculus(including Transform Calculus) courses at engineering level.

IRC: sai_nikhil on freenode
Github username: tsndiffopera

My Coding Skills

  • I work for most of my time on Linux(Ubuntu-32 bit). I even have windows7(32 bit) installed on my computer.
  • I've been using python since 6 months, and would like to accept myself as an amateur. I also have an experience in other programming languages(C, Java, PHP) for around 3 years.Also, I have made several web-apps, of which one is at my personal website[1] , and other one for Yahoo! HACKU Contest @ my campus[2] (whose references are mentioned below). has experience with various search engine API's and also know the technique of parsing XML with Python, PHP, Java and Javascript.
  • I'm quite comfortable with git now(after I started contributing to sympy and discussions with admins over IRC).

My Project

As part of GSOC 2012 sympy project on series expansions, I wanted to Implement "Kauers Algorithm" for finding limits of sequences, "A New Algorithm Computing for Asymptotic Series" by Dominik Gruntz, improve series expansions and limits, and also implement formal power series. To be honest, I'm new to concept of symbolic asymptotics, and if I was provided a clear reference by a mentor, then I would make myself familiar to the concept before I begin my official coding and integrate it with my gsoc work.

As I already mentioned above, that my main areas of interest in Mathematics are Calculus and Functional Analysis. Therefore, I would like to state that series expansions are a fantasy for me(to be honest) and so, will put my sincere effort in implementing my project ideas.

I completed both Differential and Integral Calculus(courses) at engineering level and I'm familiar with symbolic computation of limits using gruntz algorithm and limits of sequences using Kauers Algorithm. The references we used to follow here are:

  • Differential Calculus and Integral Calculus by Shanti Narayan ,
  • Differential Calculus and Integral Calculus by N Piskunov ,
  • Advanced Engineering Mathematics By Kreyszig (for Numerical Methods and their analysis),
  • Advanced Engineering Mathematics by Jain and Iyengar (for Transform Calculus and Numerical Analysis) ,
  • On Computing Limits in a Symbolic Manipulation System (By Dominik Gruntz) ,
  • Computing Limits of Sequences (By Mauel Kauers) ,
  • Also, I have a pdf for "Implementation of New Algorithm Computing for Asymptotic Series" by Dominik gruntz, and I'll go through this and try to know more about the algorithm during the period between I was selected for gsoc and dive into actual coding.

As the above references clearly state that my areas of knowledge, match with the requirements for one to apply for this project, I'm interested to work under this project for GSOC 2012.

I have no problem to work for work for atleast 40 hrs. per week(as I spend more time than this on my assignments during my academic course time :) ). And I'm sure, if I'm into GSOC, I'm not going to take any vacation.

Implementation details

Week 1 and Week 2 (Issues on limits and series expansions):

Currently many issues on issue tracker, are due to a minor error in implementing Gruntz Algorithm in and .I gave a look at and will fall on it deeply to know where the implementation has gone wrong.

Week 3 (Problems on Wiki Page):

Clear problems on series at the wiki page .and also go through the current situation.

Week 4 and Week 5 (Implementing Manuel Kauers Algorithm):

The main idea of the algorithm is to bring the sequence in both numerator and denominator to most simplified polynomial form so that, one can conclude the results as follows:

If p1 is numerator and p2 is denominator, then implementation of algorithm helps is comparing both p1 and p2, so that, it gives the respective results as, p1 < p2, p1 > p2, p1 ~ p2 . If p1 < p2, then obviously limit tends to zero and for p1 > p2 the limit tends to +/-oo and if p1 ~ p2, this becomes most complicated case and the algorithm is intended to follow the rules as demonstrated by following examples:

>>> kauer((7*x**5+3*x**3+2)/(8*x**5+2*x+1), x, oo)

Suppose 'Sum' be the function to compute sum symbolically.Then According to Kauer's algorithm implementation, the outputs of following results would be:

>>> kauer(Sum(k**2*(Sum(Pow(2,i)/i, (i,1,k)), (k,1,n))/(n*2**n) , n , oo)

>>> kauer(n**3*((Sum(Pow(2,k)/k**2)**2)/(2**n*(Sum(Pow(2,k)/k), (k,1,n)) , n , oo)


Week 6 and week 7 (Formal Power Series) :

Since the concept of formal power series is not so easy, I must get more familiar with formal power series by gathering more references from my mentor, to implement it in sympy, as per instructions given by him and I'm sure I will be able to do this in 2-3 days.

Later, apply the concept of formal power series in combinatorics, to provide representations of numerical sequences and of multisets, and method of generating functions (for giving concise expressions for recursively defined sequences regardless of whether the recursion can be explicitly solved).

Week 8 , week 9 and week 10 (New Algorithm Computing for Asymptotic Series) :

Work on "Implementation of New Algorithm Computing for Asymptotic Series by Dominik Gruntz". As stated earlier that I would read the pdf I have queries I'll browse over internet or ask my mentor to get them cleared to most extent. Later, I start to code on this for atleast two weeks.

Week 11 and Week 12 (code refining/fake-grace period) :

Go through my code and find if there any bugs in my implementation and also keep this time as a fake-grace period (I mean in case if I was not able to do my things in time by 10 weeks, I'll sure be able to complete them by this time).I would also like to state one more thing, that if at all I'm fast enough that I completed my project within time, I promise to go through asymptotic series and implement symbolic asymptotics also, but I cannot guarantee, I can do this.All I can assure is that my submissions will be made within the deadline mentioned above.

Sympy Contribution and Patch Requirement

I've gone through the issue tracker and submitted pull requests for three issues (of which one is my own issue). There are referenced at the following links: [3][4][5]


  1. [1]
  2. [2]
  3. [3]
  4. [4]
  5. [5]