Limit[ 1/Sqrt[ 4 z^2 + 4 z + 2]3], z -> ComplexInfinity] Limit[ 1/Sqrt[ 4 z^2 + 4 z + 2], z -> ComplexInfinity] Limit[ 1/Sqrt[ 4 z^2 + 4 z + 3], z -> ComplexInfinity] increment of t by 2Pi implies multiplication of the integrand by -1 (when r is small only the first term in Sqrt is affected by increment of t while the second one remains constant approximately, in the limit r -> 0 it is -I Sqrt[2]). Moreover the both integrals iC2 and iC4 as well as iC5 and iC7 are oriented oppositely, thus iC2 + iC4 == 2 iC2 and iC5 + iC7 == 2 iC7. However iC1 == - iC8 because the integrand changed the sign two times when we moved around the singularities. We need to parametrize z on $C_2$ and C_4$C_4$ with z == z[t] -> t z1 and with z == z[t] -> t z2 on $C_5$ and $C_7$ respectively. Concluding all of the above remarks we find that:
increment of t by 2Pi implies multiplication of the integrand by -1 (when r is small only the first term in Sqrt is affected by increment of t while the second one remains constant approximately, in the limit r -> 0 it is -I Sqrt[2]). Moreover the both integrals iC2 and iC4 as well as iC5 and iC7 are oriented oppositely, thus iC2 + iC4 == 2 iC2 and iC5 + iC7 == 2 iC7. However iC1 == - iC8 because the integrand changed the sign two times when we moved around the singularities. We need to parametrize z on $C_2$ and C_4 with z == z[t] -> t z1 and with z == z[t] -> t z2 on $C_5$ and $C_7$ respectively. Concluding all of the above remarks we find that:
increment of t by 2Pi implies multiplication of the integrand by -1 (when r is small only the first term in Sqrt is affected by increment of t while the second one remains constant approximately, in the limit r -> 0 it is -I Sqrt[2]). Moreover the both integrals iC2 and iC4 as well as iC5 and iC7 are oriented oppositely, thus iC2 + iC4 == 2 iC2 and iC5 + iC7 == 2 iC7. However iC1 == - iC8 because the integrand changed the sign two times when we moved around the singularities. We need to parametrize z on $C_2$ and $C_4$ with z == z[t] -> t z1 and with z == z[t] -> t z2 on $C_5$ and $C_7$ respectively. Concluding all of the above remarks we find that:
To get a general view on the issue we'll discuss two choices of contours (there are possible many other). Mathematica chooses arbitrary assumes the branch cuts of the function, it can be easily seen from e.g. ContourPlot or Plot3D of the real and imaginary parts of the integrand, e. Ong.
With[{z1 = 1/2 (-1 - I Sqrt[2]), z2 = 1/2 (-1 + I Sqrt[2])}, GraphicsRow[ Table[ ContourPlot[ g[1/Sqrt[4 (x + I y - z1) (x + I y - z2)]], {x, -1.5, 1.5}, {y, -1.5, 1.5}, ColorFunction -> "GrayYellowTones", Epilog -> {Cyan, Thick, Circle[{0, 0}], Red, PointSize[0.02], Point[{Re @ #, Im @ #}& /@ {z1, z2}]}, Contours -> 11], {g, {Re, Im}}]]] 
On the other hand using the Cauchy Integral Theorem we can choose appropriate contours to perform needed calculations. The main problem here is providing a clear graphical presentation of chosen contours.
Let's defniedefine a function which will be used to draw contours:
we can denotedenoting integrals over contours $\;C, C_1,\dots,C_8\;$ by iC, iC1, iC2, ..., iC8., Fromfrom the Cauchy theorem we have:
To calculate another integrals we need to observe that after moving around the small contours $C_3$ and $C_6$ the phase changes according to the rule: t -> t + 2Pi, taking e.g.
the phase changes according to rule:increment of t -> t + by 2Pi, therefore implies multiplication of the integrand has to be multiplied by -1 (when r is small only the first term in Sqrt is affected by increment of t while the second one remains constant approximately, in the limit r -> 0 it is -I Sqrt[2]). Moreover the both integrals iC2 and iC4 as well as iC5 and iC7 are calculated with opposite directionsoriented oppositely, thus iC2 + iC4 == 2 iC2 and iC5 + iC7 == 2 iC7. However iC1 == - iC8 because the integrand changed the sign two times when we moved around the singularities. We need to parametrize z on $C_2$ and C_4 with z == z[t] -> t z1 and with z == z[t] -> t z2 on $C_5$ and $C_7$ respectively. Concluding all of the above remarks we find that:
Module[ {z1 = 1/2 (-1 - I Sqrt[2]), z2 = 1/2 (-1 + I Sqrt[2]), z11, z22, r = 1/10, δ, δ1}, {z11,z22} = {Re @ #, Im @ #}& /@ {z1, z2}; δ = 2 r; δ1 = δ/7; ParametricPlot[{cp[{0, 0}, 1, t, Pi, δ1], cp[z11, r, t, Pi/2, δ], cp[z22, r, t, -Pi/2, δ]}, {t, 0, 2 Pi}, PlotStyle -> ConstantArray[{Thick, Darker@Blue}, 3], AxesStyle -> Arrowheads[0.03], PlotRange -> {{-1.25, 1.1}, {-1.1, 1.1}}, Epilog -> {Darker @ Blue, Thick, Line @ { { cp[z11, r, Pi/2 -δ, 0, 0], cp[z22, r, δ, -Pi/2, 0]}, { cp[z11, r, Pi/2 + δ]δ, 0, 0], {-1/2 - Sin[δ1], -δ1}, {-1, -δ1}}, { cp[z22, r, Pi/2 - δ, Pi, 0], {-1/2 - Sin[δ1], δ1}, {-1, δ1}}}, Darker @ Magenta, Dashing[{0.035, 0.013}], Thickness[0.004], Line @ {{z11, z22}, {{-1.2, 0}, {-1/2, 0}}}, Red, PointSize[0.015], Point[{z11, z22}]}, ImageSize -> 750]] To get a general view on the issue we'll discuss two choices of contours (there are possible many other). Mathematica arbitrary assumes the branch cuts of the function, it can be easily seen from e.g. ContourPlot or Plot3D of the real and imaginary parts of the integrand. On the other hand using the Cauchy Integral Theorem we can choose appropriate contours to perform needed calculations. The main problem here is providing a clear graphical presentation of chosen contours.
Let's defnie a function which will be used to draw contours:
we can denote integrals over contours $\;C, C_1,\dots,C_8\;$ by iC, iC1, iC2, ..., iC8. From the Cauchy theorem we have:
To calculate another integrals we need to observe that after moving around the small contours $C_3$ and $C_6$, e.g.
the phase changes according to rule: t -> t + 2Pi, therefore the integrand has to be multiplied by -1. Moreover the both integrals iC2 and iC4 as well as iC5 and iC7 are calculated with opposite directions thus iC2 + iC4 == 2 iC2 and iC5 + iC7 == 2 iC7. However iC1 == - iC8 because the integrand changed the sign two times. We need to parametrize z on $C_2$ and C_4 with z == z[t] -> t z1 and with z == z[t] -> t z2 on $C_5$ and $C_7$ respectively. Concluding all of the above remarks we find that:
Module[ {z1 = 1/2 (-1 - I Sqrt[2]), z2 = 1/2 (-1 + I Sqrt[2]), z11, z22, r = 1/10, δ, δ1}, {z11,z22} = {Re @ #, Im @ #}& /@ {z1, z2}; δ = 2 r; δ1 = δ/7; ParametricPlot[{cp[{0, 0}, 1, t, Pi, δ1], cp[z11, r, t, Pi/2, δ], cp[z22, r, t, -Pi/2, δ]}, {t, 0, 2 Pi}, PlotStyle -> ConstantArray[{Thick, Darker@Blue}, 3], AxesStyle -> Arrowheads[0.03], PlotRange -> {{-1.25, 1.1}, {-1.1, 1.1}}, Epilog -> {Darker @ Blue, Thick, Line @ { { cp[z11, r, Pi/2 -δ, 0, 0], cp[z22, r, δ, -Pi/2, 0]}, { cp[z11, r, Pi/2 + δ], 0, 0], {-1/2 - Sin[δ1], -δ1}, {-1, -δ1}}, { cp[z22, r, Pi/2 - δ, Pi, 0], {-1/2 - Sin[δ1], δ1}, {-1, δ1}}}, Darker @ Magenta, Dashing[{0.035, 0.013}], Thickness[0.004], Line @ {{z11, z22}, {{-1.2, 0}, {-1/2, 0}}}, Red, PointSize[0.015], Point[{z11, z22}]}, ImageSize -> 750]] To get a general view on the issue we'll discuss two choices of contours (there are possible many other). Mathematica chooses arbitrary branch cuts of the function, it can be easily seen from e.g. ContourPlot or Plot3D of the real and imaginary parts of the integrand, e.g.
With[{z1 = 1/2 (-1 - I Sqrt[2]), z2 = 1/2 (-1 + I Sqrt[2])}, GraphicsRow[ Table[ ContourPlot[ g[1/Sqrt[4 (x + I y - z1) (x + I y - z2)]], {x, -1.5, 1.5}, {y, -1.5, 1.5}, ColorFunction -> "GrayYellowTones", Epilog -> {Cyan, Thick, Circle[{0, 0}], Red, PointSize[0.02], Point[{Re @ #, Im @ #}& /@ {z1, z2}]}, Contours -> 11], {g, {Re, Im}}]]] 
On the other hand using the Cauchy Integral Theorem we can choose appropriate contours to perform needed calculations. The main problem here is providing a clear graphical presentation of chosen contours.
Let's define a function which will be used to draw contours:
denoting integrals over contours $\;C, C_1,\dots,C_8\;$ by iC, iC1, iC2, ..., iC8, from the Cauchy theorem we have:
To calculate another integrals we need to observe that after moving around the small contours $C_3$ and $C_6$ the phase changes according to the rule: t -> t + 2Pi, taking e.g.
increment of t by 2Pi implies multiplication of the integrand by -1 (when r is small only the first term in Sqrt is affected by increment of t while the second one remains constant approximately, in the limit r -> 0 it is -I Sqrt[2]). Moreover the both integrals iC2 and iC4 as well as iC5 and iC7 are oriented oppositely, thus iC2 + iC4 == 2 iC2 and iC5 + iC7 == 2 iC7. However iC1 == - iC8 because the integrand changed the sign two times when we moved around the singularities. We need to parametrize z on $C_2$ and C_4 with z == z[t] -> t z1 and with z == z[t] -> t z2 on $C_5$ and $C_7$ respectively. Concluding all of the above remarks we find that:
Module[ {z1 = 1/2 (-1 - I Sqrt[2]), z2 = 1/2 (-1 + I Sqrt[2]), z11, z22, r = 1/10, δ, δ1}, {z11,z22} = {Re @ #, Im @ #}& /@ {z1, z2}; δ = 2 r; δ1 = δ/7; ParametricPlot[{cp[{0, 0}, 1, t, Pi, δ1], cp[z11, r, t, Pi/2, δ], cp[z22, r, t, -Pi/2, δ]}, {t, 0, 2 Pi}, PlotStyle -> ConstantArray[{Thick, Darker@Blue}, 3], AxesStyle -> Arrowheads[0.03], PlotRange -> {{-1.25, 1.1}, {-1.1, 1.1}}, Epilog -> {Darker @ Blue, Thick, Line @ { { cp[z11, r, Pi/2 -δ, 0, 0], cp[z22, r, δ, -Pi/2, 0]}, { cp[z11, r, Pi/2 + δ, 0, 0], {-1/2 - Sin[δ1], -δ1}, {-1, -δ1}}, { cp[z22, r, Pi/2 - δ, Pi, 0], {-1/2 - Sin[δ1], δ1}, {-1, δ1}}}, Darker @ Magenta, Dashing[{0.035, 0.013}], Thickness[0.004], Line @ {{z11, z22}, {{-1.2, 0}, {-1/2, 0}}}, Red, PointSize[0.015], Point[{z11, z22}]}, ImageSize -> 750]]