Asked
Active
Viewed 20 times
0
-
Don't you just write down the answer? – Angina Seng Jun 12 '19 at 18:03
1 Answers
3
Mathematica is great at checking contour integration results, even very complicated ones. If you're taking Complex Analysis, it's a good idea to learn how to check your work. This is an easy one because by the Residue Theorem, it's zero. But suppose it was a very complicated one and I solved it analytically and found it to be zero. How could I check my work? I would numerically integrate it as follows:
myz[t_] := 1 + 1/2 Exp[I t];
myf[z_] := 1/(z^2 (z^2 + 4));
NIntegrate[myf[z] D[myz[t], t] /. z -> myz[t], {t, 0,
2 \[Pi]}]
2.17925*10^-17 - 3.14419*10^-17 I
Dominic
- 440
