Why does calculating $\exp z$ using $\ln z$ via newton-raphson method fail to converge?

261 Views Asked by At

I am trying to calculate $\exp z$ using $\ln z$ via Newton-Raphson method $$x_{n+1} = x_n-\frac{f(x_n)}{f^{'}(x_n)}$$and got the formula $$x_{n+1}=x_n-\frac{\ln x_n-z}{\frac{1}{x_n}}$$ where $z = a + bi$ is the value i'm trying to iterate to. However this formula only converges when $-3< b < 3$. But, if $z$ is instead any real number the formula converges accurately. Why does the formula not converge to any complex $z$, and how can I fix it so that it does?

1

There are 1 best solutions below

4
On BEST ANSWER

The complex, principal logarithm $\text{Log}(z)$ is defined by $$ \text{Log}(z) = \ln|z| + i \ \text{Arg}(z), $$ where $\text{Arg}$ stands for the principal argument of $z$ - that is $\text{Arg}(z)$ represents the angle that $z$ makes against the positive real axis when viewed in polar form. By the principal argument, we mean that $$-\pi < \text{Arg}(z) \leq \pi.$$ As a result, $\text{Log}(w) = z$ has no solution if $|\text{Im}(z)|>\pi$ so you cannot to expect to use that formulation to compute $e^z$.

To fix this, you can define your own branch of the logarithm with the appropriate value of it's imaginary part. For example, since 12 is between $3\pi$ and $5\pi$, you can define your logarithm by $$ \text{LOG}(z) = \ln|z| + i \ (\text{Arg}(z) + 4\pi). $$ Here's a simple implementation in Sage..