Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on a problem in Gamelin's Complex Analysis (Chapter IV, Section 2, page 109, exercise #4). I'm asked to consider the branch of $f(z)=\sqrt{z^2-1}$ on $D=C\setminus (-\infty,1]$ that is positive on the interval $(1,\infty)$.

Under these conditions, one can supposedly show that $F(z)=\log\left(z+\sqrt{z^2-1}\right)$ is analytic on $D$ and $F'(z)=f(z)$. Thus, if $\gamma(t)=2e^{i\theta}$, where $-\pi/2\le\theta\le\pi/2$, then:

$$\begin{align*} \int_{\gamma}\frac{dz}{\sqrt{z^2-1}} &=\log\left(z+\sqrt{z^2-1}\right)\bigg|_{-2i}^{2i}\\ &=\log\left(2i+\sqrt{(2i)^2-1}\right)-\log\left(-2i+\sqrt{(-2i)^2-1}\right)\\ &=\log\left(2i+\sqrt{-5}\right)-\log\left(-2i+\sqrt{-5}\right)\\ &=\log(2i+\sqrt5i)-\log(-2i+\sqrt5i) \end{align*}$$

The last step here is very suspicious to me at the moment. Continuing:

$$\begin{align*} \int_{\gamma}\frac{dz}{\sqrt{z^2-1}} &=\log((2+\sqrt5)i)-\log((-2+\sqrt5)i)\\ &=\left[\log(2+\sqrt5)+i\frac{\pi}{2}\right]-\left[\log(-2+\sqrt5)+i\frac{\pi}{2}\right]\\ &=\log\frac{2+\sqrt5}{-2+\sqrt5}\\ &=\log(9+4\sqrt5) \end{align*}$$

Mathematica agrees, although I think they have a different definition for the branch cut.

g = Function[z, Log[z + Sqrt[z^2 - 1]]]

g[2 I] - g[-2 I] // ComplexExpand


log(2 + Sqrt[5]) - log(Sqrt[5] - 2)

Now, Murray Eisenberg wrote some nice code to compute a contour integral using midpoint sums.

enter image description here

Now, when I take advantage of this routine, here is the result.

enter image description here

Which of course, suggests that the answer is $i\pi$.

Any thoughts?

Additional Comment I've come up with this image:

enter image description here

For any $z$ not on the cut, we have

$$ \begin{align*} z-1&=r_1e^{i(\theta_1+2k\pi)}\\ z+1&=r_2e^{i(\theta_2+2m\pi)}\\ \end{align*} $$

where $r_1$ and $r_2$ are the lengths (magnitudes) of $z-1$ and $z+1$. Hence: $$ \begin{align*} \sqrt{z^2-1} &=\sqrt{z-1}{z+2}\\ &=\sqrt{r_1}\sqrt{r_2}e^{i(\theta_1/2+\theta_2/2+(k+m)\pi)} \end{align*} $$

When we evaluate this expression on the real axis and get a positive result for $x>1$, this tells us that $k+m$ must be an even integer. When $k+m$ is odd, the sign of the answer changes. Hence, let's use $k+m=0$ for our branch and write:


Now, when $z=2i$, we can show that $$ \begin{align*} \theta_1&=\frac{\pi}{2}-\tan^{-1}2\\ \theta_2&=\tan^{-1}2, \end{align*}$$ so $\theta_1/2+\theta_2/2=\pi/2$. Hence, at $z=2i$, $\sqrt{z^2-1}$ will equal its magnitude times $e^{i\pi/2}$, that is, times $i$.

On the other hand, note that $\alpha_1/2+\alpha_2/2=-\pi/2$, so at $z=-2i$, $\sqrt{z^2-1}$ will have the same magnitude, but times $e^{-i\pi/2}$, or times $-i$.

share|cite|improve this question
There's also the issue of what branch of log is being used in your symbolic evaluation. – murray Mar 12 '13 at 22:38
Gamelin has you show that $z+\sqrt{z^2-1}$ is never nonpositive and real on $D$ in part (a) of this exercise, so you can use the principal branch of the logarithm. – David Moews Mar 12 '13 at 22:41

If $\phi(z)$ is the branch of $\sqrt{z^2-1}$ with a branch cut at $(-\infty,1]$ which is positive on $(1,\infty)$, then $\phi(2i)=\sqrt{5}i$ and $\phi(-2i)=-\sqrt{5}i$. So (writing $\text{Log}$ for the principal value of the logarithm as Gamelin does) $$\begin{align*} \text{Log}\left(z+\phi(z)\right)\bigg|_{-2i}^{2i} &=\text{Log}\left(2i+\phi(2i)\right)-\text{Log}\left(-2i+\phi(-2i)\right)\\ &=\text{Log}((2+\sqrt{5})i)-\text{Log}((2+\sqrt{5})(-i))\\ &=\pi i, \end{align*}$$ in agreement with the numerical result.

To see that $\phi(2i)=\sqrt{5}i$, let $z$ move along a path from $2$ to $2i$ in the closed first quadrant, for example, $\theta\mapsto z(\theta):= 2e^{i\theta}$, $0\le \theta\le \pi/2$. Then $z(\theta)^2-1=4 e^{2i\theta}-1$ will travel from $3$ to $-5$, always remaining in the closed upper half-plane. Since $\phi(z)$ was defined to be positive on $(1,\infty)$, $\phi(2)=\sqrt{3}>0$, so $\phi(z)$ must also travel along a path in the closed first quadrant. Therefore $\phi(2i)$ is $\sqrt{5}i$ rather than $-\sqrt{5}i$. Proving that $\phi(-2i)=-\sqrt{5}i$ can be done in the same way, by moving $z$ on a path from $2$ to $-2i$ in the closed fourth quadrant and observing that, since $z^2-1$ moves along a path in the closed lower half-plane, $\phi(z)$ must travel along a path in the closed fourth quadrant.

share|cite|improve this answer
I think I agree. Now, the issue here is "Why is $\phi(-2i)=-\sqrt5i$? How can we show this? – David Mar 12 '13 at 23:01
I commented on this above. – David Moews Mar 12 '13 at 23:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.