How would you be able to calculate a contour integral of 1/(((z-1)^2)*(z-i))
over the contour |z-1| = 1
? Not sure how to type that in :/
-
5$\begingroup$ There are at least a few answers at MSE discussing how to deal with contour integrals e.g. Paths integrals in the complex plane or How do I find line integrals? or How to calculate contour integrals with Mathematica?. $\endgroup$– ArtesCommented Oct 11, 2015 at 0:02
-
1$\begingroup$ If you had a specific problem with this integral, try to expose it clearly, however I find your question simply a duplicate of the one in the first link. $\endgroup$– ArtesCommented Oct 11, 2015 at 0:06
-
1$\begingroup$ its not a duplicate as my integral is shifted to the right $\endgroup$– JohnCommented Oct 11, 2015 at 0:24
2 Answers
With
f[z_] := 1/((z - 1)^2*(z - I))
the contour integral around a circle centered at z == 1
can be parameterized by arc length around the circle.
Integrate[(f[z] /. z -> 1 + Cos[t] + I Sin[t]) D[1 + Cos[t] + I Sin[t], t],
{t, 0, 2 Pi}]
(* π *)
which, of course, is equal to the residue at z == 1
, multiplied by 2 π I
. (The pole at z == I
is outside the contour and so does not contribute to the integral.)
Alternatively, the integral can be performed over a region.
reg = ParametricRegion[{1 + Cos[t], Sin[t]}, {{t, 0, 2 Pi}}];
Integrate[(f[z] /. z -> x + I y) (-y + I (x - 1)), {x, y} ∈ reg]
which gives the same result. (-y + I (x - 1))
is the equivalent of D[1 + Cos[t] + I Sin[t], t]
.
Let me know if your answer matches with the one using
f[z_] := 1/((z - 1)^2*(z - I))
Int[a_] := 2*Pi*I*Total[(Residue[f[z], {z, #1}] & ) /@ {0, a}]
So for a=1
, you get Pi
-
-
-
$\begingroup$ well I did my integral by hand and just wanted to confirm my answer, I got pi when computing my integral $\endgroup$– JohnCommented Oct 11, 2015 at 0:25
-
$\begingroup$ Sorry, I didn't notice the a part. Thank you!! Just wanted to confirm $\endgroup$– JohnCommented Oct 11, 2015 at 0:25
-
$\begingroup$ I would give you an up vote but I need to be 15 rep to do that :c $\endgroup$– JohnCommented Oct 11, 2015 at 0:26