A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.
7

I can offer a suggestion for your first question: If you know your poles are somewhere along the real axis, you could localize them quite efficiently using Rational interpolation/approximation. This amounts to finding polynomials $p(x)$ and $q(x)$ such that $$f(x) \approx \frac{p(x)}{q(x)}$$ for $x$ in some interval. The poles of $f(x)$ should then match ...


6

As Brian Borchers pointed out, the question only makes sense up to factors of $2\pi$. I'll assume that you want an answer in $[0, 2\pi)$ then. If there are really big contrasts in the magnitudes $|z_1|, \ldots, |z_n|$ of the numbers you're looking at, you could get some bogus results because of cancellation errors. In that case, it might arguably be better ...


5

Note: I'm somewhat worried at this point that the integral values Mathematica gives me are bogus. I thought it was working because it gave a sensible-looking result in a short time, but it might be the case that the method it tries to use is buggy or that I did something wrong. So it might be that the code below isn't working at all, I don't know, sorry. ...


4

Let us parameterize the curve you are looking for by $(x(t),y(t))$ and let us for a moment assume that at all points on this curve $\nabla f(x(t),y(t)) \neq 0$, i.e., the curve never intersects another isocontour line. Then you know that at each point the tangent to the curve $(x(t),y(t))$ is parallel to the isocontour levels of $f$, i.e., that it is ...


4

The approach of using two equations for the real and imaginary parts of an equation is often used. It may lead to more cumbersome formulas, but it is definitely possible and common. An example where this is done in deal.II (a library that I maintain) is here: https://www.dealii.org/developer/doxygen/deal.II/step_29.html


3

While it's especially well-suited for polynomial systems, Smale's $\alpha$-theory gives a way to be certain that the Newton iterates for a nonlinear analytic system will converge, and also gives a criterion for when two distinct initial guesses do or do not converge to the same root. To use it, you'll need both derivatives and bounds on the growth of the ...


2

Since you have an explicit parametric representation, the easiest way is direct rasterization of a rectilinear patch. You don't say what kind of projection you want, so for concreteness say we want an orthographic (orthogonal) projection onto a 3D hyperplane defined by a linear function $A : \mathbb{R}^3 \to \mathbb{R}^4 = \mathbb{C}^2$. Given a point $y \...


2

Because $\mbox{arg}$ wraps around at $2\pi$, the problem is ill-conditioned. You can get a forward error of $2\pi$ (when the sum of the arguments is close to a multiple of $2\pi$) with a backward error that approaches 0. This is true of both of the methods you've proposed.


1

It does indeed work to linearize the forward mode this way, and will correspond to machine precision. The reverse or adjoint mode doesn't work this way despite my wishes to the contrary. The derivation I posted doesn't correspond exactly to machine precision, but the numerical tests I did showed that the magnitude of the error depends on the linear tolerance ...


1

To sum the argument works faster and the calculus error is smaller. I think that that is the best way. If we perform the product $ Z = z_1 \times z_2 \times ... \times z_n $ the error will be: $$ dZ = z_2 z_3 ... z_n dz_1 + z_1 z_3 .... z_n dz_2 + ... + z_1 z_2 ... z_{n-1} dz_n $$ We conclude that: $$ dZ \approx Z \, (1/z_1 + 1/z_2 + ... 1/z_n) \, dz $$ ...


1

I think the way to go is to parametrize the integral with a real parameter and integrate the real and imaginary parts seperately. Implementing this is subtle, the implementation depends from case to case.


1

I answered a similar question here. That method works if you have a good way of solving the segment intersection query (easiest if your $f$ returns a signed value so that you can use sign-based bisection). Otherwise, I would try analysis. You can compute the gradient of $f$ with respect to $x$ and $y$ presumably. It's best to carry out the differentiation ...


Only top voted, non community-wiki answers of a minimum length are eligible