# complex integral

#### Ruun

##### New member
Hi all!

I have to perform this complex integration over three curves, the first one is $$C=\{ z \in \mathbb{C} : |z|=2 \}$$ and the function to integrate is

$$f(z)=\frac{z^2}{e^{2z}+1}$$

If I do the usual change of variables $$z=2e^{i\theta}$$ and integrate from $$\theta = 0 \rightarrow \theta = 2\pi$$ the denominator term is gives me trouble, because of the double exponential.

Another way I was thinking, it was Cauchy's theorem. As $$f(z)$$ has no poles then (I'm not sure of this) the sum of all residues is $0$ so the integral is $0$ too. But there are $z \in \mathbb{C}$ such that $e^{2z}+1 = 0$, given by $z_{n}=\frac{1}{2}i(\pi + 2\pi n), n \in \mathbb{Z}$ and $z_{0}$ is inside $C$ wich I think that is no pole, but the function goes to infinity, so it is not analytical there.

Last edited:

#### AlexYoucis

##### New member
Hi all!

I have to perform this complex integration over three curves, the first one is $$C=\{ z \in \mathbb{C} : |z|=2 \}$$ and the function to integrate is

$$f(z)=\frac{z^2}{e^{2z}+1}$$

If I do the usual change of variables $$z=2e^{i\theta}$$ and integrate from $$\theta = 0 \rightarrow \theta = 2\pi$$ the denominator term is gives me trouble, because of the double exponential.

Another way I was thinking, it was Cauchy's theorem. As $$f(z)$$ has no poles then (I'm not sure of this) the sum of all residues is $0$ so the integral is $0$ too. But there are $z \in \mathbb{C}$ such that $e^{2z}+1 = 0$, given by $z_{n}=\frac{1}{2}i(\pi + 2\pi n), n \in \mathbb{Z}$ and $z_{0}$ is inside $C$ wich I think that is no pole, but the function goes to infinity, so it is not analytical there.

Those are indeed poles. Cauchy's theorem says that since $C$ bounds a simply connected region where $f$ is meromorphic then $\displaystyle \oint_C f\;dz$ is the sum of the residues at these finitely many points. So, you are correct, $f$ is holomorphic on the interior of $C$ minus $\frac{\pi i}{2}$ and so Cauchy's theorem tells you that $\displaystyle \oint f\;dz=2\pi i\text{Res}(f,\tfrac{1}{2}\pi i)$. So, what is this residue? How can we compute it?

#### Ruun

##### New member

The residue is:

$$\lim_{z\to i\pi/2}\left(z-\frac{i\pi}{2}\right)\frac{z^2}{e^{2z}+1}$$

Now, the "problem" is that I don't know to "factorize" $e^{2z}+1=0$, to cancel with $\left(z-\frac{i\pi}{2}\right)$ I was thinking in circular and hyperbolical functions, but they do not solve my problem as far as I can see:

$$e^{2z}=2(\cosh(z)+\sinh(z))$$

and

$$\cos(iz)=\cosh(z), \sin(iz)=-\sinh(z)$$

we have that

$$\lim_{z\to/2 i\pi}e^{2z}=\lim_{z \to i\pi/2}2(\cosh(z)+\sinh(z))=2(\cosh(i \pi/2 ) + \sinh(i\pi/2))=2(\cos(\pi/2)-\sin(\pi/2))=-2$$

but the factor $(z-i\frac{\pi}{2})$ goes to zero, and it can't go to zero, because there will be no pole afterall at $z=i\frac{\pi}{2}$, given you said that there is a pole.

#### ThePerfectHacker

##### Well-known member
Here is a hint for you.

Suppose that $f(z) = \frac{g(z)}{h(z)}$ where $g$ and $h$ are holomorphic functions. Suppose that at $p$ we have that $h(p)=0$ but $g(p)\not = 0$.
Then $f$ will have a pole at point $p$. Suppose further that $h'(p) \not = 0$ then prove that $\text{res}(f,p) = \frac{g(p)}{h'(p)}$.

Do this exercise first then apply this result to your problem!

Last edited:

#### PaulRS

##### Member
No, it is indeed a pole because actually $\lim_{z\to i\pi/2}e^{2z}+1 = 0 \neq -1$ as you calculated.

We have: $\sin(i\cdot z) = - \displaystyle\frac{\sinh(z) }{\color{red} i}$

Now as for your residue note that:

$$\lim_{z\to i\pi/2} \left( z - \frac{i\pi}{2} \right) \frac{z^2}{e^{2z}+1} = \lim_{z\to i\pi/2} \left( z - \frac{i\pi}{2} \right) \frac{z^2}{ \left( f\left( \frac{i\pi}{2} \right) + f^\prime\left( \frac{i\pi}{2} \right) \cdot \left( z - \frac{i\pi}{2} \right) + \varepsilon(z) \cdot \left(z - \frac{i\pi}{2}\right) \right) }$$

where $f(z) := e^{2z} + 1$ and $\displaystyle\lim_{z\to i\pi/2} \varepsilon(z) = 0$ because $f$ is complex differentiable there (in fact, it is analytic on $\mathbb{C}$ ).

Thus:

$$\lim_{z\to i\pi/2} \left( z - \frac{i\pi}{2} \right) \frac{z^2}{e^{2z}+1} = \lim_{z\to i\pi/2} \left( z - \frac{i\pi}{2} \right) \frac{z^2}{ f^\prime\left( \frac{i\pi}{2} \right) \cdot \left( z - \frac{i\pi}{2} \right) + \varepsilon(z) \cdot \left(z - \frac{i\pi}{2}\right) } = ...$$

Last edited:

#### Ruun

##### New member
Here is a hint for you.

Suppose that $f(z) = \frac{g(z)}{h(z)}$ where $g$ and $h$ are holomorphic functions. Suppose that at $p$ we have that $h(p)=0$ but $g(p)\not = 0$.
Then $f$ will have a pole at point $p$. Suppose further that $h'(p) \not = 0$ then prove that $\text{res}(f,p) = \frac{g(p)}{h'(p)}$.

Do this exercise first then apply this result to your problem!
Hi, thanks for the hint!

Ok, now I see it, after some google research, that your result for the pole is the same as L'Hôpital's rule

$$\lim_{z\to p}(z-p)\frac{g(z)}{h(z)}=\lim_{z \to p}\frac{g(z)}{\frac{h(z)}{z-p}}=\lim_{z \to p}\frac{g(z)}{\frac{h(z)-h(p)}{z-p}}=\lim_{z \to p}\frac{g(z)}{h'(z)}=\frac{g(p)}{h'(p)}$$

wich is not $0$ nor $\infty$ so problem solved after substitution

No, it is indeed a pole because actually $\lim_{z\to i\pi/2}e^{2z}+1 = 0 \neq -1$ as you calculated.

We have: $\sin(i\cdot z) = - \displaystyle\frac{\sinh(z) }{\color{red} i}$

Now as for your residue note that:

$$\lim_{z\to i\pi/2} \left( z - \frac{i\pi}{2} \right) \frac{z^2}{e^{2z}+1} = \lim_{z\to i\pi/2} \left( z - \frac{i\pi}{2} \right) \frac{z^2}{ \left( f\left( \frac{i\pi}{2} \right) + f^\prime\left( \frac{i\pi}{2} \right) \cdot \left( z - \frac{i\pi}{2} \right) + \varepsilon(z) \cdot \left(z - \frac{i\pi}{2}\right) \right) + 1}$$

where $f(z) := e^{2z} + 1$ and $\displaystyle\lim_{z\to i\pi/2} \varepsilon(z) = 0$ because $f$ is complex differentiable there (in fact, it is analytic on $\mathbb{C}$ ).

Thus:

$$\lim_{z\to i\pi/2} \left( z - \frac{i\pi}{2} \right) \frac{z^2}{e^{2z}+1} = \lim_{z\to i\pi/2} \left( z - \frac{i\pi}{2} \right) \frac{z^2}{ f^\prime\left( \frac{i\pi}{2} \right) \cdot \left( z - \frac{i\pi}{2} \right) + \varepsilon(z) \cdot \left(z - \frac{i\pi}{2}\right) } = ...$$
Hi, thanks for your post, sorry for the huge $\sin(z)$ fail, I try to avoid that kind of silly mistakes but it seems to be some unavoidable part of my math skills...

I'm afraid I fail to see where the denominator comes from, specifically the $\varepsilon(z)$ term. Is the 2nd and higher order derivatives for the complex series of $e^{2z}$?. If so, shouldn't be $(z-i\pi/2)^2$ the third term? Then I wouldn't cancel with the numerator I know but I don't get it. And the $+1$ term? I don't get it too

#### PaulRS

##### Member
I'm afraid I fail to see where the denominator comes from, specifically the $\varepsilon(z)$ term. Is the 2nd and higher order derivatives for the complex series of $e^{2z}$?. If so, shouldn't be $(z-i\pi/2)^2$ the third term? Then I wouldn't cancel with the numerator I know but I don't get it. And the $+1$ term? I don't get it too

Actually you are right about the $+1$, it shouldn't be there, copy paste typo.

I will put the rest in a different way if you like, we may write: $\displaystyle\lim_{z\to i\pi/2} \frac{f(z) - f\left(i\pi/2\right)}{z - i\pi/2 } = f^\prime\left(i\pi/2\right)$ $(*)$

In this case $f\left(i\pi/2\right) = 0$ so $\displaystyle\lim_{z\to i\pi/2} \frac{f(z)}{z - i\pi/2 } = f^\prime\left(i\pi/2\right)$ and $\displaystyle\lim_{z\to i\pi/2} \frac{(z - i\pi/2) \cdot z^2}{ f(z) } =\displaystyle\lim_{z\to i\pi/2} \frac{z^2}{ \frac{f(z)}{z - i\pi/2 } } = \frac{\lim_{z\to i\pi/2} z^2}{\lim_{z\to i\pi/2} \frac{f(z)}{z - i\pi/2 } }$ (the last equality holds since both limits are defined and the denominator's limit is not 0).

Note that $(*)$ is indeed equivalent to having $f(z) = f\left(i\pi/2\right) + f^\prime\left(i\pi/2\right) \cdot (z - i\pi/2 ) + (z - i\pi/2 ) \cdot \varepsilon(z)$ for some function $\varepsilon(z)$ satisfying $\varepsilon(z) \to 0$ as $z \to i\pi/2$. This is what being differentiable is all about!

#### Ruun

##### New member
Thank you, now I get it! I didn't know the $\varepsilon(z)$ thing, my math training is the one I am being given in my physics undergraduate courses so it's quite mechanical and we don't care too much about math rigor. Such a bad mistake in my opinion, but I'm my spare time, wich is not as much as I wanted, I try to reinforce my math training.

So problem solved, thank you!

#### Ruun

##### New member
To be sure if I understood this, my answer to the first integral is $i\pi^3/4$.

If $c=\{2+e^{i\theta} : \theta \in [0,2\pi] \}$ as the poles are all in the imaginary axis, and $c$ is the circle of radius $1$ and center $2$ it never touches the imaginary axis, therefore no poles inside $c$, so the integral is $0$.

And finally if $c=\{z \in \mathbb{C}: |z-4i|=1\}$ is the circle of radius $1$ and center $4i$ this time there are two poles inside $c$ $z_{1}=i7\pi/2$ and $z_{2}=i9\pi/2$, my result is that the integral is $i65\pi^3/4$