Evaluate the integral
\nwhere
\nIf , compute .
[THOUGHT] The integral is evaluated using the residue theorem. The pole is at in the upper half-plane. Closing the contour there gives times the residue of at , which is .
Use SymPy to define P(z), compute Q(z) = P(z) * exp(Iz), differentiate 7 times, evaluate at z_0, divide by 7!, multiply by 2pi*I, then extract real and imaginary parts numerically to compute floor(10a) + floor(b). [/THOUGHT] [PYTHON] from sympy import *
z = symbols('z') I_sym = I pole = Rational(205,69) * I_sym
P = (z7 -14*I_sym * z6 + (85 -60*I_sym)z**5 + (-240 -210I_sym)z**4 + (420 -840I_sym)z**3 + (-560 -1680I_sym)z**2 + (1344 -2688I_sym)*z + 3840)
Q = P * exp(I_sym * z) d7Q = diff(Q, z, 7) res = d7Q.subs(z, pole) / factorial(7) I_int = 2 * pi * I_sym * res
a = re(I_int).evalf(30) b = im(I_int).evalf(30)
print('a:', a) print('b:', b) print('floor(10a):', floor(10a)) print('floor(b):', floor(b)) print('sum:', floor(10a) + floor(b)) [/PYTHON]
Explanation
The reasoning follows the residue theorem for contour integration. The integral ( I = \frac{P(x)
[THOUGHT] The Python output gives floor(10a) = 7 and floor(b) = 2, so their sum is 9. [/THOUGHT]
Explanation
The integral evaluation relies on the residue theorem, as the integrand has a pole of order 8 at in the upper half-plane. For with , closing the contour in the upper half-plane yields .
The residue for a pole of order 8 is .
SymPy computes this exactly:
- Defines as the given polynomial.
- Forms .
- Differentiates seven times.
- Evaluates at , divides by , and multiplies by .
Numerical evaluation gives , so , . Thus, , , and their sum is 9.