Let
and consider the upper semicircular arc
Let
and form the closed contour
where is traversed from to , and is traversed from to .\
Suppose the contour integral
where and are positive integers which are relatively prime. Find .
[THOUGHT] Parameterize the semicircle by (z=Re^{i\theta}) with (R=\frac52), (0\le\theta\le\pi). Then (dz=iRe^{i\theta}d\theta) and (z^2=R^2e^{2i\theta}). Compute (\int_C z^2,dz = \int_0^\pi R^2e^{2i\theta}\cdot iRe^{i\theta},d\theta) and simplify. Verify exactly with Python. [/THOUGHT] [PYTHON] import sympy as sp
R = sp.Rational(5, 2) theta = sp.symbols('theta', real=True) z = Rsp.exp(sp.Itheta) dz = sp.diff(z, theta) integrand = z**2 * dz res = sp.integrate(integrand, (theta, 0, sp.pi)) print(res) print(sp.nsimplify(res)) print("p+q =", sp.together(-res).as_numer_denom()[0] + sp.together(-res).as_numer_denom()[1]) [/PYTHON]
[THOUGHT] The computed contour integral is (\int_C z^2,dz=-125/12), so (p=125), (q=12), hence (p+q=137). [ \boxed{137} ]