help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: complex line integral in octave


From: Stephen Montgomery-Smith
Subject: Re: complex line integral in octave
Date: Fri, 12 Apr 2013 08:45:03 -0500
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5

On 04/12/2013 05:29 AM, Urs Hackstein wrote:
> Dear Stephen,
> 
> thanks a lot for your long reply. Unfortunately, we are talking about
> different integrals. Your are dealing with the zero-counting integral
> \int_\alpha f ' (s)/f(s) ds, I work on the integral \int_\alpha s*f '
> (s)/f(s) ds, where * is the common multiplication. From complex function
> theory we know that it equals a, if a is the only root of f in the
> rectangle. We want to compute this root, thus method 2 doesn't work for
> us. Remains method 1: what is the best (most efficient and stable) built
> in integration command?
>  

First, you meant 2 pi I a, not a.  I'm sure it was a typo, but it is the
kind of typo that propagates into code and creates a hard to trace bug.
 (At least, that is what it does for me.)

Second, I think you have a fairly straightforward integral to compute,
so I think any numerical method should do fine.  (Unless one of the
roots lies very close or is on the curve.)

Third, if you know that there is only one root inside the rectangle, you
could use the output of Method 1 as the input to Newton's Method, which
will very quickly and accurately converge to the desired root.

Finally, friends of mine highly recommend the NIntegrate command in
recent versions of Mathematica (version 8 or higher).  It might even
handle the case where one root lies on the curve (where presumably it
correctly computes the principle value).  So perhaps you could check
your answers using the wolfram alpha web site,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]