GSoC 2012 Application Tarun Gaba: Differential Equations Ordinary and Partial - sympy/sympy GitHub Wiki

GSoC 2012 Application Tarun Gaba: Differential Equations Ordinary and Partial

TITLE :-

To extend the SymPy module to handle Systems of Differential Equations,Initial Value Problems in Ordinary Differential Equations and Partial Differential Equations.

Name and contact info :-

Tarun Gaba

E-mail :- [email protected]

IRC :- tarzzz on FREENODE

GitHub Username :- tarzzz

blog :- http://tarzzzsympy.wordpress.com

About The Applicant :-

I am currently pursuing undergraduate engineering course from Institute Of Technology, Banaras Hindu University, Varanasi, India in Metallurgical Engineering Department,Part II. Although from Metallurgical Engineering, I have sufficient experience in coding in C, java and Python to be able to bring out the deliverables mentioned below by the end of the summer-coding season. I have two semesters worth knowledge of Advanced Engineering Mathematics. I had done a simulation project on 'Stereographic Projections' as a part of a college project and it was a simulation based on python module 'visual'. I have also sent a patch in sympy which can be checked here:-

https://github.com/sympy/sympy/pull/1180

Introduction :-

SymPy module has a pretty decent solver for solving Ordinary Differential Equations and a little basic coding has been implemented in Partial Differential Equations.

My proposal consists of following contributions :-

  1. To extend the differential equations solver for solving a type of equations “Bessel's equation” which will cover many sorts of ODE's

  2. To extend the differential equations solver for solving the Initial Value Problems and Systems Of Differential Equations .

  3. To extend the solver for solving Partial Differential Equations including some types like wave equations,heat equations and Laplace equations.(including initial value problems for the same)

  4. To extend the Symbolic Integrator to include certain specific 'Types' of integrals which have currently not been implemented like trigonometric integrals of type 'sintan', 'sinsec' etc and polynomials of these functions.

Implementation :-

I would like to give a brief description on the algorithms to be utilised for the above mentioned deliverables. As a little extension i will try to post all the required algorithms (in pseudo code) alongwith the methods used on my blog. http://tarzzzsympy.wordpress.com

  1. For extension of integrals I would be using substitution methods to simplify the integrals and then push it through Risch or corrseponding function to integrate it

  2. For solving Bessel's equation (a type of ordinary differential equation) i am going to use a power series method called Frobenius method (http://en.wikipedia.org/wiki/Frobenius_method). and also include it as a hint to the "dsolve" function.

  3. For solving Initial Value Problems in differential Equations a new set of arguments will be introduced to "dsolve" function which will involve taking initial values((f(x0)) as input and giving the particular solution of the equation.

  4. For solving a Linear system of Differential Equations (y' = Ay + g in matrix notation) method will include solving for the eigen-values and eigen-vector or "A" and then finding out the solution. The user inteferace will be similar as that for system of linear equations.

  5. for solving pde's i will write a very brief algorithm here. The user inteferace will be similar as that of ordinary differential equations using the "hint" and "best_hint" concepts and taking boundary values in the form of arguments.

i) 1-D wave equation / heat equation :- the equation types are different but their solving methodology is somewhat similar which consists of a) Applying method of separation of variables (product method) to obtain two ode's. b) determining solution which which satisfies the boundary conditions and getting eigen-functions for corresponding eigen-values. c) building up the final solution for the wave / heat equation.

ii) 2-D wave equation (rectangular membrane problem) :- a) separation of variables to get three ordinary differential equations. b) applying boundary values which would be taken as arguments. c) building up the final solution.

iii) Laplace's Equation (2-D/3-D) :- Only "First Boundary Value Problem / Dirichlet's Problem" will be taken. a) Converting the problem into spherical coordinates. b) Using separation of variables changing it into an ordinary differential equation. c) building the solution in rectangular/cartesian coordinates.

Description of the work (By Timeline) :-

I will finish my semester by around 8-10th of may and after that I would be totally dedicated to my GSoC project for the whole summer.

Community Bonding Period :-

I will exhaustively read the code of the currently implemented sympy solvers and integrals and interact with the mentors to find out the currently implemented 'strengths and weaknesses' of the solvers and integrals.

Coding Period :-

i will start the actual coding work by 21st of May and the summer programme (weekly) would be as follows :-

  1. (21 - 27 may) Initializing the summer work by writing some code for the Integration function in 'Integrals”.This is done as a first step because differential equations involve integration at many steps and their further implementation (as proposed) will require strong and exhaustive Integration functions. Also writing the suitable tests for the same.

  2. (28 May - 3 June) Starting the code for Bessel's equation and its different types. Writing the tests for the same

  3. (4 - 10 June) Starting the code for the Initial Value Problems in the ordinary differential equations. This will include extending the arguments of the “dsolve” function to accommodate for the initial value problems.

  4. (11 - 17 June) Finish up the initial value problems and writing the suitable tests for it. Starting up with the systems of differential equations.

  5. (17 - 24 June) Finishing up the systems of differential equations and starting work on PDE’s. Starting with the Wave Equations.

  6. (24 June - 1 July) Finishing Wave Equations and its tests and starting for One-Dimensional Heat Equations.

  7. (2 - 8 july) Finishing One-Dimensional Heat Equations and starting for Two-Dimensional Heat Equations.

  8. (9 - 15 July) Starting up Two-Dimensional Laplace Equations.

  9. (16 - 22 July) Starting up Two-Dimensional Poisson Equations.

  10. (23 - 29 July) Starting up Three-Dimensional Laplace Equations.

  11. (30 July - 5 August) Finishing up Three-Dimensional Laplace Equations and writing tests for the same.

  12. (6 - 13 August) Wrapping up and checking for errors etc remaining (if any).

References And Sources :-

I own copies of "ADVANCED ENGINEERING MATHEMATICS" by "Erwin Kreyszig" "Wolfram Mathematica 8" which will help me in establishing algorithms required for my project.

I also have a blog on which i will keep updating my project progress and hints of algorithms being used for the same. http://tarzzzsympy.wordpress.com