# Let $I=\int_C\dfrac{f(z)}{(z-1)(z-2)}$ where $f(z)=\sin\dfrac{\pi z}{2}+\cos\dfrac{\pi z}{2}$ and $C:|z|=3$ Then the value of $I$ is

Let $I=\int_C\dfrac{f(z)}{(z-1)(z-2)}$ where $f(z)=\sin\dfrac{\pi z}{2}+\cos\dfrac{\pi z}{2}$ and $C:|z|=3$ Then the value of $I$ is $$1. 4\pi i,~2.-4\pi i,~3.0,~4.2\pi i$$

My try:

$I=\int_C\dfrac{f(z)}{(z-1)(z-2)}dz=\int_C\dfrac{(z-1)-(z-2)}{(z-1)(z-2)}f(z)dz=\int_C \dfrac{f(z)dz}{z-2}-\int_C\dfrac{f(z)dz}{z-1}=2\pi i[f'(2)-f'(1)]$

Now $f'(z)=\dfrac{\pi z}{2}(\cos\dfrac{\pi z}{2}-\sin\dfrac{\pi z}{2})\implies\\f'(2)=-\pi\\f'(1)=-\dfrac{\pi}{2}$

$I=2\pi i\times(-\pi/2)=-\pi^2i$

By the Cauchy's Integral Formula, you get $$\displaystyle\int_C\frac{f(z)}{z-2}\mathrm dz=2\pi i f(2)\qquad\mbox{and}\qquad \int_C\frac{f(z)}{z-1}\mathrm dz=2\pi i f(1).$$