|
From: | Urs Hackstein |
Subject: | Re: complex line integral in octave |
Date: | Mon, 15 Apr 2013 15:51:20 +0200 |
First, you meant 2 pi I a, not a. I'm sure it was a typo, but it is theOn 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?
>
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,
First, you meant 2 pi I a, not a. I'm sure it was a typo, but it is theOn 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?
>
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,
First, you meant 2 pi I a, not a. I'm sure it was a typo, but it is theOn 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?
>
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,
[Prev in Thread] | Current Thread | [Next in Thread] |