Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-04-03 Thread arpit goyal
Is it necessary to have a pull request before 6, i am working on a patch but i have not completed it yet, so i will commit my patch only when i complete it, so is it necessary to have a pull request before 6 or we have time before 20 april. Best, Arpit On Sat, Mar 31, 2012 at 5:43 PM, arpit

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-04-03 Thread Tom Bachmann
As Aaron explained elsewhere, the PR has to be submitted by the 6th. On 03.04.2012 10:54, arpit goyal wrote: Is it necessary to have a pull request before 6, i am working on a patch but i have not completed it yet, so i will commit my patch only when i complete it, so is it necessary to have a

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-04-03 Thread Aaron Meurer
Yes, sorry, but we need to have time to review the patch, so it can be merged before the patch deadline. Furthermore, the patch plays a significant role in the review process, so we need this information when reviewing applications. Aaron Meurer On Tue, Apr 3, 2012 at 3:55 AM, Tom Bachmann

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-04-03 Thread arpit goyal
Will try my best to complete it before the deadline. Thanks Arpit Goyal On Tue, Apr 3, 2012 at 9:51 PM, Aaron Meurer asmeu...@gmail.com wrote: Yes, sorry, but we need to have time to review the patch, so it can be merged before the patch deadline. Furthermore, the patch plays a significant

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-31 Thread Tom Bachmann
On 30.03.2012 16:27, arpit goyal wrote: - check convergence How do you want to do that? What information about the function do you need for this? How is it obtained and stored? Fort this i have thought to check for different type of integrands possible: 1)f(x)= p(x)/q(x) , check

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-31 Thread arpit goyal
Thanks tom for the review , please let me know if any thing else i should change in my proposal to make it more explanatory and meaningful. Regards Arpit Goyal On Sat, Mar 31, 2012 at 3:25 PM, Tom Bachmann e_mc...@web.de wrote: On 30.03.2012 16:27, arpit goyal wrote: - check convergence

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-31 Thread Tom Bachmann
Which one is your proposa? https://github.com/sympy/sympy/wiki/Arpit-Goyal-:-Definite-integration-using-residue or https://github.com/sympy/sympy/wiki/Arpit-Goyal-:Definite-integrals-Using-Residue ? On 31.03.2012 10:58, arpit goyal wrote: Thanks tom for the review , please let me know if

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-31 Thread arpit goyal
https://github.com/sympy/sympy/wiki/Arpit-Goyal-:-Definite-integration-using-residue i don't know why there are two urls , but they both are my proposal and identical one. I have updated above one so please follow the above one only. On Sat, Mar 31, 2012 at 3:36 PM, Tom Bachmann e_mc...@web.de

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-31 Thread arpit goyal
I have included an example which i tried manually (it can be done manually) , and then i have listed the steps taken and will be used to frame the algorithms . Please have a look and tell me if have to be more explanatory on this one. On Sat, Mar 31, 2012 at 3:44 PM, arpit goyal

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-31 Thread Tom Bachmann
Hi, I'm not quite sure about your convergence comment in the example (we integrate over a compact contour ... we only need the integrands to be continuous on it?). Aside that, this proposal looks very promising (I think). I would advise you to upload it to melange (note that it can still be

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-31 Thread arpit goyal
Ohh sorry , i was just following the steps , i just realised that we need not have to have condition for convegence if integrating on a contour. Thanks for pointing the mistake , i would have not considered it . Arpit On Sat, Mar 31, 2012 at 5:35 PM, Tom Bachmann e_mc...@web.de wrote: Hi,

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-30 Thread arpit goyal
https://github.com/sympy/sympy/wiki/Arpit-Goyal-:-Definite-integration-using-residue I have added my application ,please review it and suggest me what changes should be done. On Thu, Mar 29, 2012 at 7:33 PM, Tom Bachmann e_mc...@web.de wrote: I think it is definitely worth pursuing (and this

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-30 Thread Tom Bachmann
Hi, I think this is a good start. What lacks, however, is details on how your code is actually supposed to *work*. For example: - extending solve Have you looked at the code? Do you know how it finds solutions and if the extensions you have in mind are easy/difficult? - fixing residue Same

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-30 Thread arpit goyal
On Fri, Mar 30, 2012 at 7:08 PM, Tom Bachmann e_mc...@web.de wrote: Hi, I think this is a good start. What lacks, however, is details on how your code is actually supposed to *work*. For example: - extending solve Have you looked at the code? Do you know how it finds solutions and if the

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-30 Thread Aaron Meurer
Just a minor point, but in SymPy infinity is spelled oo (oh oh), not 00 (zero zero). Aaron Meurer On Fri, Mar 30, 2012 at 7:12 AM, arpit goyal agmp...@gmail.com wrote: https://github.com/sympy/sympy/wiki/Arpit-Goyal-:-Definite-integration-using-residue I have added my application ,please

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-30 Thread arpit goyal
My typing mistake ,sorry for that. On Sat, Mar 31, 2012 at 12:09 AM, Aaron Meurer asmeu...@gmail.com wrote: Just a minor point, but in SymPy infinity is spelled oo (oh oh), not 00 (zero zero). Aaron Meurer On Fri, Mar 30, 2012 at 7:12 AM, arpit goyal agmp...@gmail.com wrote:

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-29 Thread arpit goyal
Well , now as i have all the constraints and milestones to work on for the project ,so please suggest me if it is a worth idea for GSOC ? I will be submitting my proposal soon. On Thu, Mar 29, 2012 at 12:29 AM, Aaron Meurer asmeu...@gmail.com wrote: On Wed, Mar 28, 2012 at 6:12 AM, Tom Bachmann

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-29 Thread Tom Bachmann
I think it is definitely worth pursuing (and this should presumably be assumed of anything on the ideas list), but much depends on the specifics of your proposal. On 29.03.2012 13:41, arpit goyal wrote: Well , now as i have all the constraints and milestones to work on for the project ,so

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-28 Thread Tom Bachmann
Note also that, for computing with residues, you don't need a precise list of the poles, just a *superset*. Just as you don't need precise knowledge of the growth of the function, just an upper bound (although here you probably want to be tighter). So it might be best to look at all parts of

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-28 Thread arpit goyal
Tom, Sorry but I don't understand your point. As we do require precise list of poles (i might be wrong ,it is just what i know), as we reqire summatin of all the residues at the poles , so if any one is left ,it will change the answer. On Wed, Mar 28, 2012 at 5:42 PM, Tom Bachmann

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-28 Thread arpit goyal
Sorry my bad , i misread , you mention *superset* . so no ples will be left out . On Wed, Mar 28, 2012 at 6:10 PM, arpit goyal agmp...@gmail.com wrote: Tom, Sorry but I don't understand your point. As we do require precise list of poles (i might be wrong ,it is just what i know), as we reqire

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-28 Thread arpit goyal
Now this means Definite Integration using residues has to cross these hurdles : 1)Modify solve() for periodic functions ,it works very well for polynomial. 2)Modify residue() function 3) Convergence of the integrand . 4)Categorise the Integrand On Wed, Mar 28, 2012 at 6:14 PM, arpit goyal

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-28 Thread Tom Bachmann
Also, given a concrete integral, transform it into one in the complex plane. This requires appropriate choice and representation of contour. Figure out which (potential) poles lie inside the contour. On 28.03.2012 14:49, arpit goyal wrote: Now this means Definite Integration using residues

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-28 Thread arpit goyal
Yes , that indeed is the important part .Choice of poles will be dependent on in which category our integrand come . For ex. integral (1/(1+x**3) ,we just have to consider one pole and take the contour 2pi/3 part of the circle of radius R .(0 angle2pi/3). On Wed, Mar 28, 2012 at 7:34 PM, Tom

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-28 Thread Aaron Meurer
On Wed, Mar 28, 2012 at 6:12 AM, Tom Bachmann e_mc...@web.de wrote: Note also that, for computing with residues, you don't need a precise list of the poles, just a *superset*. This reminds me of another point. Aside from symbolic parameters changing the contour needed for convergence, it can

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-27 Thread arpit goyal
This means i have to first of all , modify the solve() and residue() function then work on finding the definite integral. I have done a course on Numerical Methods and Computation and do studied about finding roots of a function . But i did not find them very much efficient. Please can any one

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-27 Thread Aaron Meurer
Numerically calculating the roots is not very useful. If we wanted to use numerics, we would just compute the integral numerically in the first place. I suppose a numeric root counting algorithm could be useful for verifying that you have all the roots. You should focus of classes of functions

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-27 Thread arpit goyal
Can you tell me what algorithms are used to find the roots. I will try digging more about it and see if the problem can be resolved. On Tue, Mar 27, 2012 at 9:36 PM, Aaron Meurer asmeu...@gmail.com wrote: Numerically calculating the roots is not very useful. If we wanted to use numerics, we

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-27 Thread Aaron Meurer
Take a look at sympy/solvers/solvers.py. Aaron Meurer On Tue, Mar 27, 2012 at 11:22 AM, arpit goyal agmp...@gmail.com wrote: Can you tell me what algorithms are used to find the roots. I will try digging more about it and see if the problem can be resolved. On Tue, Mar 27, 2012 at 9:36 PM,

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-26 Thread arpit goyal
Convergence of the integrand can be tested for the five cases I stated previously like If are integration is of type F(x)/Q(x) then if Deg(Q(x))-Deg(Q(x))=2 then it is good to integrate using residues. Similiary for trignometric function we can check after substituting the trignometric function

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-26 Thread arpit goyal
While looking sympy tracker i come across issue 3179http://code.google.com/p/sympy/issues/detail?id=3179 which is integrate(1/(cos(x)+2),(x,0,2*pi)) ans gives zero but answer must be 2*pi/3 and this is a direct application of residues , trignometric functions category. on the other bolcked on

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-26 Thread Aaron Meurer
On Mon, Mar 26, 2012 at 2:54 AM, arpit goyal agmp...@gmail.com wrote: Convergence of the integrand can be tested  for the five cases I stated previously  like If are integration is of type F(x)/Q(x) then if Deg(Q(x))-Deg(Q(x))=2 then it is good to integrate using residues. Similiary for

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-26 Thread Aaron Meurer
I would try Meijer G first because the result is generally going to be better. For example, it will just give you the convergence conditions (they might not be tight, but in my experience they usually are). Also, as Tom noted, residue() is very buggy, in the sense that it often gives just plain

[sympy] Definite integrals using residues [gsoc 2012]

2012-03-25 Thread arpit goyal
I am a second year undergraduate ,doing my major in Mathematics and functions. I have done a course in Complex analysis and conider myself good at it. I am interested in the idea of definite integral using residues ,and i have come up with the structure of which function can be integrated using

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-25 Thread Joachim Durchholz
Sounds like you have looked into the code and have an overall strategy, which is a very good start. The Meijer G-function integration may work in cases where residues don't. Do you have a plan how to detect such cases? (I'm much more a programming expert than a math expert, so others may

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-25 Thread arpit goyal
Yes ,you are right , Meijer G-functions has it's own importance . Integration using Residues as stated in previous mail is applicable in finding those Integrals who fall in the five category stated above. What i plan is to categorize function by their category in which they fall , Like if the

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-25 Thread Aaron Meurer
I think the best way would be to just try the Meijer G code first, and only fall back to residues if that fails. Another thing to consider is that if an integral has symbolic coefficients, the choice of contour may depend on the value of the paramater. For example, for Fourier-type integrals

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-25 Thread Joachim Durchholz
Am 26.03.2012 03:26, schrieb Aaron Meurer: I think the best way would be to just try the Meijer G code first, and only fall back to residues if that fails. How quickly can the residues code find out whether it will work on a given integral? If that is quick, trying residues first would be

Re: [sympy] Definite integrals using residues [gsoc 2012]

2012-03-25 Thread Tom Bachmann
Many kinds of (real) definite integrals can be found using the results for contour integrals in the complex plane. As values of contour integrals can usually be written down with very little difficulty. We simply have to locate the poles inside the contour, find the residues at these poles, and