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] I need to compute the contour integral over the upper semicircle C using sympy. The integral is given by ∫_C z^2 dz for z = (5/2) e^(iθ) with θ from 0 to π. I'll parameterize the contour and use sympy to compute the exact value. [/THOUGHT] [PYTHON] import sympy as sp theta = sp.symbols('theta') z = (5/2) * sp.exp(sp.I * theta) dz = sp.diff(z, theta) f_z = z**2 integral = sp.integrate(f_z * dz, (theta, 0, sp.pi)) print(sp.simplify(integral)) [/PYTHON]
[THOUGHT] The Python output of -10.4166666666667 corresponds to the exact fraction -125/12. Since the integral is given as -p/q and p and q are positive integers that are relatively prime, we have p = 125 and q = 12. Therefore, p + q = 137. [/THOUGHT]