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 with , . Then and . Compute 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 , so , , hence .