I'm going to do the following integral over three different paths: ∮1/z dz
First Path
Around the unit circle in the complex plane. This seems to be the easiest.
z = e^(iθ

, dz = ie^(iθ

dθ
∮1/z dz = ∫ ie^(iθ

/e^(iθ

dθ, [0,2π]
= ∫ i dθ, [0,2π]
= 2πi
The Second Path
Around the oval of real radius 2 and imaginary radius 1.
To parametrize this oval:
z = 2cos(θ

+isin(θ

= (3/2 cos(θ

+3/2 isin(θ

) + (1/2 cos(θ

- 1/2 isin(θ

)
= 3/2 e^(iθ

+ 1/2 e^(-iθ
dz = 3/2 ie^(iθ

- 1/2 ie^(-iθ

dθ
∮1/z dz = ∫ [3/2 ie^(iθ

- 1/2 ie^(-iθ

] / [3/2 e^(iθ

+ 1/2 e^(-iθ

] dθ, [0,2π]
= ∫ 3/2 ie^(iθ

/ [3/2 e^(iθ

+ 1/2 e^(-iθ

] dθ + ∫ -1/2 ie^(-iθ

/ [3/2 e^(iθ

+ 1/2 e^(-iθ

] dθ, [0,2π]
= ∫ 3/2 ie^(2iθ

/ [3/2 e^(2iθ

+ 1/2] dθ + ∫ -1/2 ie^(-2iθ

/ [3/2 + 1/2 e^(-2iθ

] dθ, [0,2π]
= 1/2 ln(3/2 e^(2iθ

+ 1/2) + 1/2 ln(3/2 + 1/2 e^(-2iθ

), [0,2π]
= 1/2 ln(2) - 1/2 ln(2) + 1/2 ln(2) - 1/2 ln(2)
= 0
The Third Path
Around the unit square on the complex plane.
Going to split this into four paths, one around each side.
z = t+i, [1,-1], dz = dt
z = -1+it, [1, -1], dz = idt
z = t-i, [-1,1], dz = dt
z = 1+it, [-1,1], dz = idt
∮1/z dz = ∫ 1/(t+i) dt [1,-1] + ∫ i/(-1+it) dt [1,-1] + ∫ 1/(t-i) dt [-1,1] + ∫ i/(1+it) dt [-1,1]
= ln(t+i) [1,-1] + ln(-1+it) [1,-1] + ln(t-i) [-1,1] + ln(1+it) [-1,1]
= ln(1+i) - ln(-1+i) + ln(-1+i) - ln(-1-i) + ln(-1-i) - ln(1-i) + ln(1-i) - ln(1+i)
= 0
What am I doing wrong? I don't understand why 1/z is holomorphic when the path of integration is not a circle.