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 .
[PYTHON] from sympy import symbols, integrate, exp, I, pi, Rational
Define the variable
theta = symbols('theta', real=True)
Define the path C: z = (5/2) * exp(i * theta) for theta from 0 to pi
r = Rational(5, 2) z = r * exp(I * theta) dz = z.diff(theta)
Define the function f(z) = z^2
f = z**2
Compute the integral over C
integral_C = integrate(f * dz, (theta, 0, pi))
print(f"Integral value: {integral_C}") [/PYTHON] ps_1 = """ Integral value: -125/12 """ [PYTHON] from math import gcd
numerator = 125 denominator = 12 common = gcd(numerator, denominator) print(f"GCD: {common}") print(f"p: {numerator // common}") print(f"q: {denominator // common}") print(f"p+q: {numerator // common + denominator // common}") [/PYTHON] ps_2 = """ GCD: 1 p: 125 q: 12 p+q: 137 """ The contour integral is given by [ I = \int_C z^2 , dz. ] Since the function is entire (analytic everywhere in the complex plane), the integral is path-independent and depends only on the endpoints of the contour . The contour starts at and ends at .
An antiderivative of is . By the Fundamental Theorem of Calculus for contour integrals, we have: [ I = F(z_{end}) - F(z_{start}) = \frac{(-\frac{5}{2})^3}{3} - \frac{(\frac{5}{2})^3}{3}. ] Calculating the values: [ \left(-\frac{5}{2}\right)^3 = -\frac{125}{8}, \qquad \left(\frac{5}{2}\right)^3 = \frac{125}{8}. ] Substituting these back into the expression for : [ I = \frac{-\frac{125}{8}}{3} - \frac{\frac{125}{8}}{3} = -\frac{125}{24} - \frac{125}{24} = -\frac{250}{24}. ] Simplifying the fraction by dividing the numerator and denominator by their greatest common divisor, which is 2: [ I = -\frac{125}{12}. ] We are given that where and are relatively prime positive integers. Thus, [ p = 125, \qquad q = 12. ] Checking for relative primality: and . They share no common factors, so they are relatively prime.
Finally, we find : [ p + q = 125 + 12 = 137. ]
\boxed{137}
The integral of over the contour (the upper semicircle of radius traversed from to ) can be computed using the fundamental theorem of calculus for analytic functions, as has the antiderivative .
[ \int_C z^2 , dz = \left[ \frac{z^3}{3} \right]_{5/2}^{-5/2} = \frac{(-5/2)^3}{3} - \frac{(5/2)^3}{3} ] [ = \frac{-125/8}{3} - \frac{125/8}{3} = -\frac{125}{24} - \frac{125}{24} = -\frac{250}{24} = -\frac{125}{12} ] The Python code confirmed this result: . Thus, and . These are relatively prime since and . We need to find : [ p + q = 125 + 12 = 137 ]
\boxed{137}