2

I'm having trouble trying to understand what I'm doing wrong in solving this complex integral.

I partitioned the square into 4 different parameterized curves (each curve being 1 of the sides of the square) and added the 4 integrals. The final answer I got was zero, but the book says the answer is $πi$. I cannot for the life of me understand how they got such an answer. Any tip will be greatly appreciated. Thanks!

EDIT: I parameterized the square as such

$c_1(t)=t-i$

$c_2(t)=1+it$

$c_3(t)=-t+i$

$c_4(t)=-1-it$, with $-1\leq t\leq 1$ for all the $c$ curves.

I obtained the following complex integrals via $\int_{-1}^{1} f(c(t))c'(t)dt$:

For $c_1$, $\int_{-1}^{1}\frac{1}{2(t-i)+1}dt$ = $\frac{1}{2}ln(3-2i) - \frac{1}{2}ln(-1-2i)$.

For $c_2$, $\int_{-1}^{1}\frac{i}{2(1+it)+1}dt$ = $\frac{1}{2}ln(3+2i) - \frac{1}{2}ln(3-2i)$.

For $c_3$, $\int_{-1}^{1}\frac{-1}{2(-t+i)+1}dt$ = $\frac{1}{2}ln(-1+2i) - \frac{1}{2}ln(3+2i)$.

For $c_4$, $\int_{-1}^{1}\frac{-i}{2(-1-it)+1}dt$ = $\frac{1}{2}ln(-1-2i) - \frac{1}{2}ln(-1+2i)$.

I added the 4 integrals up and they all cancelled out to zero. But I don't see how $πi$ was obtained.

stthomas
  • 143
  • 2
    There must be a mistake in your calculation. The correct answer is $\pi i$. How can we answer your question if you don't show your work? – Kavi Rama Murthy Mar 23 '18 at 05:50
  • @KaviRamaMurthy Added work. Thanks for the tip! – stthomas Mar 23 '18 at 06:17
  • You probably used the "rule" $\ln(zw)=\ln(z)+\ln(w)$, which does not hold for every $(z,w)$ in the complex plane. – Did Mar 23 '18 at 06:20
  • In any case you'll need $\ln(z) = ln|z| + i;arg(z)$ at some stage. – Raphael J.F. Berger Mar 23 '18 at 07:43
  • In $c_3$ and $c_4$ I think its wrong to go to $-dt$ since you are actually evaluating $t$ from 0 to 1 in your parametrisation in the positive direction. So you double the minus signs hence you get 0 because you go not the right way around the curve, but change directions. – Raphael J.F. Berger Mar 23 '18 at 07:49
  • $c_1$ is correct. $c_2$ is wrong its actually $\frac{1}{2}(ln(-3 i + 2) - ln (-3 i -2)$. – Raphael J.F. Berger Mar 23 '18 at 08:09
  • $c_3$ is up to the wrong sign, correct as well but $c_4$ is wrong again including the correct sign its $c_4 = \frac{1}{2}(ln(i+2)-ln(i-2))$. – Raphael J.F. Berger Mar 23 '18 at 08:15
  • When corretcly done $c_1+c_2+c_3+c_4$ adds to $\frac{1}{2}(ln(3-2i)-ln(-3-2i)+ln(2-i)-ln(-2-i)+ln(2-3i)+ln(-2-3i)+ln(1-2i)-ln(-1-2i))=i \pi$ – Raphael J.F. Berger Mar 23 '18 at 08:36
  • what is your definition of $\ln(z)$, and have you seen the Residue theorem ? – mercio Mar 23 '18 at 10:41
  • $ln(z)=ln|z|+i \arg z $ kind of overloaded. There is a bit of mess in the conventions ($ln,ld,lg,log,Log,...$) internationally, I mean. Yes, I use the Residue theorem not to solve that, since I thought its better to go for elementary methods here. Should I have mentioned in your personal opinion that the path goes around the singularity $z=-\frac{1}{2}$? – Raphael J.F. Berger Mar 23 '18 at 11:33

3 Answers3

3

Whatever it is that you call $\ln$, it is not true that integrating $\frac 1z dz$ on the segment from $a$ to $b$ is $\ln(b)-\ln(a)$ for every segment not going through $0$.

Notice that your integrals are all of the form $\int_{-1}^1 f(t)dt$ where $f(t)$ has positive imaginary part when $t \in [-1;1]$. Therefore, the integrals themselves should all have positive imaginary part.

To detect which one of your computation is wrong, you can evaluate numerically the logarithms (however it is that you define them) and check the ones that give a result with a negative imaginary part.

You can probably find why it is wrong by carefully checking your definition of $\ln$

mercio
  • 50,180
1

$$ I:=\oint_C\frac{1}{2z+1}\mathrm{d}z $$ The idea of your integration path is correct. Only in $c_3$ and $c_4$ you fail to implement it correctly, when you use $-t+i$ you actually have to go from $-1$ to $+1$ in positive direction $dt$ not in negative $-dt$ to get the right orientation. You do not have to transform anything, but just construct the right path.

(I use the name $ln$ for the complex logarithm like OP did. Conventions on that are not the same in all countries.).

$$\begin{align}I & = \int_{-1}^{1}\frac{1}{2(t-i)+1}dt + \int_{-1}^{1}\frac{i}{2(1+it)+1}dt + \int_{-1}^{1}\frac{1}{2(-t+i)+1}dt + \int_{-1}^{1}\frac{i}{2(-1-it)+1}dt \\ & = \frac{1}{2}\bigg[ \ln(-1-2 i + 2t) + \ln(-i+2t) + \ln(-3i + 2t) + \ln(1-2i+2t) \bigg]^{1}_{-1}\\ &= \frac{1}{2}[\ln(3-2i)-\ln(-3-2i)+\ln(2-i)-\ln(-2-i)+\ln(2-3i)-\ln(-2-3i)+\ln(1-2i)-\ln(-1-2i)] \\ &= \frac{i}{2}\big[(\arg(3-2i)-\arg(-3-2i))+(\arg(2-i)-\arg(-2-i))+(\arg(2-3i)-\arg(-2-3i))+(\arg(1-2i)-\arg(-1-2i))\big]\\ &=\frac{i}{2}\big[\arctan(-\frac{2}{3})-(\arctan(\frac{2}{3})-\pi)+\arctan(-\frac{3}{2})-(\arctan(\frac{3}{2})-\pi)+\\ &\;\;\;+ \arctan(-\frac{1}{2})-(\arctan(\frac{1}{2})-\pi)+\arctan(-\frac{2}{1})-(\arctan(\frac{2}{1})-\pi)\big] \\ &= \frac{i}{2}\big[\pi - 2 \arctan(\frac{2}{3}) +\pi - 2 \arctan(\frac{3}{2}) + \pi - 2 \arctan(\frac{1}{2}) +\pi - 2 \arctan(\frac{2}{1})\big] \\ &= \frac{i}{2}\big[4 \pi -2[\arctan(\frac{2}{3})+\arctan(\frac{3}{2})+\arctan(\frac{1}{2})+\arctan(2) ] \big]\\ &= \frac{i}{2}(4\pi-2(\frac{\pi}{2}+\frac{\pi}{2}))\\ &= i \pi. \end{align}$$

Using $\arctan|\frac{a}{b}|+\arctan|\frac{b}{a}|=\frac{\pi}{2}.$

Edit: Since the paramterisations of the curves (lines) of the integrals are continuously differentiable we can evaluate the integrals in the way like integrals of a real variable. The residue theorem was not used here, since the choice of the loop suggests that it should be done on elementary level.

Raphael J.F. Berger
  • 1,697
  • 14
  • 25
  • Who votes that down? Most of all why? – Raphael J.F. Berger Mar 23 '18 at 11:37
  • But the parametrization of the curves are all positive aren't they? Since it's going about the square in counter-clockwise orientation? I'm not sure I understand what you're trying to say when you write "−t+i you actually have to go from −1 to +1 in positive direction dt". Isn't it already going in the positive direction? – stthomas Apr 11 '18 at 20:36
  • You got the sign wrong in $c_3$ (and also in $c4)$, because in $c_3$ for example you start the integral at $t=-1$ and go to $t=+1$ and you do that in the expression $-t+1$, but that means you go from $-(-1)+i$ to $-(+1)+i$, and that is the wrong direction. Note it is so even before you consider $dt\to -dt$ so its contructed wrongly. OK? – Raphael J.F. Berger Apr 11 '18 at 21:00
  • When you want to go from $-1+i$ to $1+i$ you either start in your expressions the integral at $t=1$ and go to $t=-1$ or you use simply $z\to t+i$ as $c_3$. – Raphael J.F. Berger Apr 11 '18 at 21:02
1

More elegantly but non elementary we can use the Residual theorem: Meaning, it does not matter for the loop integral if we go round the singularity in the square path $C$ or along any other one which can be smoothly transformed from $C$ (meaning not crossing any singularities upon transformation). E.g. the unit circle $C'=\{e^{i t}| t\in[0,2\pi]\}$. So $$I:=\oint_{C}\frac{1}{2z-1}dz = \oint_{C'}\frac{1}{2z-1}dz.$$ For convenience before integration we shift the function by $+\frac{1}{2}$ along the real axis ($z\rightarrow z'+\frac{1}{2}$), and using again the Residual theorem (to keep the curve fixed while shifting the function) we get: $$ \oint_{C'}\frac{1}{2z-1}dz = \oint_{C'}\frac{1}{2z'}dz'$$ (we do not cross the singularity in this operation).

For convenience we rename everything to drop all the primes. Then we use $z\rightarrow\exp(i t)$ which requires $dz = i \exp(i t) dt.$

So $$ I= \oint_{C}\frac{1}{2z}dz = \int_{0}^{2\pi}\frac{i \exp(i t)}{2 \exp(i t) }dt = \frac{i}{2}2 \pi = i \pi.$$

Raphael J.F. Berger
  • 1,697
  • 14
  • 25