The guessing game continues

So, I started my week trying my best to figure out how to implement the third heuristic, given the fact that the Maple paper gave me no clue, on how do to it. I had also posted these questions on Math Stack and Math Overflow.

1.http://mathoverflow.net/questions/134011/best-approach-to-solve-this-pde
2.http://math.stackexchange.com/questions/423334/method-of-characteristics-a-general-doubt

The answer to the first question [1] was highly misleading, and I again wasted time trying to find the fallacy in the answer. (By the way, if anyone is able to find where the answer is supposedly wrong, please do add a comment) . Also to add fuel to the fire, the Math Overflow guys gave me a so called Tumbleweed badge, which is given to a person who asks a question with no votes, no answers, no comments, and low views for a week. Sigh.

Then Sean, gave me a paper which had a heuristic, that follows a logic that I intelligently(?) used in my eleventh and twelfth entrance examinations, assume one of the four answers given in the options, substitute it back and see which one satisfies the question best (Umm. Did I mention this somewhere before?). Okay,now more seriously,let us once again examine the PDE in question,\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}.

The algorithm is as follows:

1. Since \eta(x, y) and \xi(x, y) ,  are assumed to be bi-variate polynomials in x and y, by intuition h(x, y) should be a rational function in x  and y. There could also be cases like when h(x, y) = sin(x) and there could be a series expansion on both sides. But its best that things are kept simple and hence those cases are left alone.

2. Then we substitute h it in the equation,  reduce it into a (numerator / denominator) form, throw away the denominator,  and find the degree of the numerator. By intuition again, this is the maximum limit upto which \eta(x, y) and \xi(x,y) can reach.

3. First \eta(x, y) and \xi(x,y) are assumed to be constants and substituted in the PDE. Terms that are monomials in y are grouped together, for example y, 1, y*x, y*x{2}, y^{2}*x and the coefficients are equated to zero, this gives us a set of linear equations in the coefficients which are tried to solve for using solve(). If it gives a non-trivial solution, those are the infinitesimals.  If it doesn’t

4. Then keep iterating \eta(x,y) and \xi(x,y) . The next step would be to assume the infinitesimals to be a + b*x + c*y , and follow step 3 again. If it doesn’t work out then, a + b*x + c*y + d*x^{2} + e*x*y + f*y{2} and step 3 and so on, till the max limit given by step 2 is reached.

5. It should be understood that non-trivial solutions for a homogeneous set of equations always return a set of equations, with arbitrary constants. For now, I’ve assumed all these constants to be one. I still don’t know how effective this is.

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

Towards the end of the week, my mentor Sean Vig went out for a bike race, so I took this to my advantage, and went for a movie marathon (race) as well, for four days and did not do any work. I also learnt not to be overly-dependent on your mentor, and you can do stuff like thinking about algos, even when your mentor is taking time to review your pull requests. But for now I’ve just started work on another heuristic, and have to respond to his comments on my previous Pull Request. Till then bye.

Advertisements

2 comments

  1. Small comment: I’d try to solve the linear system by linear algebra instead of calling “solve”. This helped a bit inside the integration routines.

    1. Hello, Raoulb could you give you a small example. Did you mean solve_linear_system?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: