Use Cauchy's integral formula to evaluate the following integral, $$\int \limits_{\Gamma} \frac{\sin(\pi z^2)+\cos(\pi z^2)}{(z-1)(z-2)}dz$$where the contour $\Gamma$ is parameterised by $\gamma : [-\pi,\pi] \rightarrow \mathbb{C}$ given by $\gamma (\theta)=3e^{i\theta}+1$.
If you make $$f(z)=\frac{\sin(\pi z^2)+\cos(\pi z^2)}{(z-2)}$$ it wont be holomorphic so how can you do it? When z=2, it would be undefined. and 2 is in the region of gamma.
Also correct me if I am wrong but the region is just a circle centred at 1 and radius 3.
Note
$$\frac{1}{(z - 1)(z - 2)} = \frac{1}{z - 2} - \frac{1}{z - 1},$$
so if $f(z) = \sin(\pi z^2) + \cos(\pi z^2)$, you can write
$$\int_{\Gamma} \frac{\sin(\pi z^2) + \cos(\pi z^2)}{(z - 1)(z - 2)}\, dz = \int_{\Gamma} \frac{f(z)}{z - 2} \, dz - \int_{\Gamma} \frac{f(z)}{z - 1}\, dz.$$
Since $f$ is entire and both $1$ and $2$ lie inside $\Gamma$, the Cauchy integral formula gives
$$\int_{\Gamma} \frac{f(z)}{z - 1} = 2\pi i f(1) = -2\pi i$$
and
$$\int_{\Gamma} \frac{f(z)}{z - 2} = 2\pi i f(2) = 2\pi i.$$
Hence
$$\int_{\Gamma} \frac{\sin(\pi z^2) + \cos(\pi z^2)}{(z - 1)(z - 2)}\, dz = (2\pi i) - (-2\pi i) = 4\pi i.$$