The guessing game (still) continues

Hello, before I go on with my weekly update, I would like to say that I’m really struggling to find good names for each of my blog posts. As you know, I’m not a really creative person, and Week 1, Week 2 and so sound so mainstream, so I decided to add a “still” , in between the title of my previous blog post in a sudden fit of creative exuberance. After all if movies can have sequels, blog posts can have them too. [Oh and please don’t say I did not read this blog post because I had missed the prequel]

So this is what I was upto the previous week, with respect to my GSoC project and SymPy

1. Get the third heuristic PR merged:
I had described the algorithm that I followed in my previous blog post.  https://manojbits.wordpress.com/2013/06/26/the-guessing-game-continues/ .  I made few minor changes, to the algorithm, as advised by Sean.

• Instead of substituting, $h$ in the PDE $\frac{\partial \eta}{\partial x} + (\frac{\partial \eta}{\partial y} - \frac{\partial \xi}{\partial x}) * h(x, y) - \frac{\partial \xi}{\partial y}*h(x,y)^{2} - \xi*\frac{\partial h}{\partial x} - \eta*\frac{\partial h}{\partial y}$ and using dummy symbols, to find the maximum degree upto which I need to iterate $\xi$ and $\eta$, one can simply $h, \frac{\partial h}{\partial x}, \frac{\partial h}{\partial y}, h**2$. If all of them are positive, then the degree limit would be the maximum among these, Otherwise, the degree limit would be the difference between the maximum degree and the minimum degree
• I hadn’t read the documentation pretty well. There already was a function in SymPy called Poly().as_dict(), which would give the power of the respective variables, and the coefficients in dict form. Great, that just reduced my 15 line separatevars code into one line.
from sympy import *
from sympy.abc import x, y
Poly(3*x*y + x**2).as_dict()
{(1, 1): 3, (2, 0): 1}

• Also, it was agreed that If I find an infinitesimal, by this method that is already there, still the for loop would break, and the code would no more look for bivariates

The merged source code can be found here: https://github.com/sympy/sympy/pull/2196

2.  The fourth heuristic: If you had read my rant on the previous post, regarding the inability of anyone to give me any insight onto how to solve the PDE for $\frac{\partial \chi}{\partial x} + h*\frac{\partial \chi}{\partial y} - \chi*\frac{\partial h}{\partial y}$. I finally though that I would follow the same algorithm as I had mentioned in the third heuristic, since $\chi$ is a bivariate polynomial in $x$ and $y$ . A minor difference would be that $\chi$ cannot be a constant since it gives a trivial solution. Also after finding $\chi$, by this method, $\xi$ and $\eta$ can be found by this $\eta = \xi*h + \chi$. An interesting way, as suggested by mentor would be to simply rearrange the equation, which would give $\frac{\chi}{h} = -\xi + \frac{\eta}{h}$ , which would mean when I divide $\chi$ with $h$, it would give me $-\xi$ as the quotient and $\eta$ as the remainder.

The unmerged source code can be found here: https://github.com/sympy/sympy/pull/2214 . (Sean is yet to give his comments)

I had a very brief look, at the fifth heuristic yesterday , it looks pretty scary, but of course I’ve survived through scarier things in life. Also I tried to review two other Pull Requests, https://github.com/sympy/sympy/pull/2207https://github.com/sympy/sympy/pull/2010 . I have to admit I didn’t do a really good job, but then I at least tried.

I guess that it for the previous week.

P.S : I think I am a freelancer now.