6
$\begingroup$

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?

$\endgroup$
6
  • 4
    $\begingroup$ It's almost certainly a problem with the branching of the complex log. $\endgroup$
    – Randall
    Dec 2, 2018 at 20:03
  • $\begingroup$ yes it means that b has to be less that 3 and greater than -3 to converge towards $e^z$ $\endgroup$ Dec 2, 2018 at 20:03
  • $\begingroup$ Randall can you go more into detail about the branching of the complex log? $\endgroup$ Dec 2, 2018 at 20:06
  • 1
    $\begingroup$ Not really, because it's been 20 years since I thought about this stuff intimately. You need someone with a better answer, who will certainly be along shortly. But, the complex exponential is not one-to-one, so what do you mean by "$\ln z$"? $\endgroup$
    – Randall
    Dec 2, 2018 at 20:08
  • $\begingroup$ The complex logarithm is $ln(z)$ and I know that $ln(z)$ is multivalued, along with $e^z$ like the trigonometric functions however, the formula should still be able to evaluate over all complex numbers right? $\endgroup$ Dec 2, 2018 at 20:13

1 Answer 1

3
$\begingroup$

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..

$\endgroup$
4
  • 1
    $\begingroup$ Thanks, that makes a lot of sense, it's like how arccosine needs to have a domain restriction, because otherwise it wouldn't be a function. $\endgroup$ Dec 3, 2018 at 1:06
  • 1
    $\begingroup$ That's exactly right. The complex exponential is periodic with period $2\pi i$ so you can define a branch of the logarithm whose range lies in a strip of height $2\pi$. $\endgroup$ Dec 3, 2018 at 1:20
  • $\begingroup$ Just wondering why did you choose $4\pi$ wouldn't $5\pi$ also work? $\endgroup$ Dec 3, 2018 at 1:40
  • 1
    $\begingroup$ We know that $-\pi<Arg(z)\leq \pi$ so I added on two periods of $2\pi i$ each to get $3\pi < Arg(z)\leq 5\pi$ which works since 12 is between these numbers. More generally, you want to add on some integer multiple of the period $2\pi i$ so i wouldn't expect $+5\pi$ to work. $\endgroup$ Dec 3, 2018 at 2:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .