2
$\begingroup$

We have function $\frac{1}{x-\frac{i}{2}}$ which has one singular point $x=\frac{i}{2}$ so if we integrate around it we get by Residue theorem $2 \pi i$.

Integrate[1/(x-I/2),{x,-1,1,1+I,-1+I,-1}]
(* 2 Pi I *)

I constructed the rectangular path {x,-1,1,1+I,-1+I,-1} manually.

Now I want to do the same integral but instead use a circle path.

I tried:

Integrate[1/((a+I b)-I/2),{a,b}\[Element]Circle[{0,1/2},1]]
(* 0 *)

But it seems it is not a circle around the singular point as the result is 0. What am I doing wrong?

$\endgroup$
2
  • 3
    $\begingroup$ It looks to me that you'd need to do it manually for now: Integrate[(1/(z - I/2) /. z -> I/2 + Exp[I t]) D[I/2 + Exp[I t], t], {t, 0, 2 π}] $\endgroup$ Commented Jul 5, 2022 at 20:13
  • $\begingroup$ That is more work than with a rectangular path. I hoped for something like "I provide center of a circle in complex plane and its radius then compute me the integral". $\endgroup$ Commented Jul 5, 2022 at 20:21

1 Answer 1

2
$\begingroup$

How about this:

f[z_] := 1/(z - I/2)
intF[f_, c_, r_] := 
 NIntegrate[(f[z] /. z -> c + r Exp[I t]) I r Exp[I t], {t, -Pi, Pi}]
intF[f, I/2, 1/2]

(* 0. + 6.28319 I *)

$\endgroup$
1
  • $\begingroup$ Yes, that is what J. M. suggested in his comment. $\endgroup$ Commented Jul 6, 2022 at 20:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.