Computing a contour integral for ranges of $r$ 
Compute $$\int_{|z|=r}\frac{e^{\sin(z^2)}}{(z^2+1)(z-2i)^3}\;dz$$ when $0<r<1,1<r<2$ and $r>2$.

My attempt: For $r<1$, the integrand is holomorphic and by Cauchy-Goursat the integral is $0$. But when $1<r<2$ or $r>2$, I can no longer use this argument. I thought that maybe when $r>2$ for example, then if
$$
g(z)=\frac{e^{\sin(z^2)}}{z^2+1}\ ,
$$
then the integral is $\int_{|z|=r}\frac{g(z)}{(z-2i)^3}dz$ and if $g(z)$ was holomorphic in $|z|\leq r$ then I can use Cauchy's integral formula and claim that the integral is $2\pi ig''(2i)$, but this is not the case (or atleast I wasn't able to show that it is holomorphic, even with Riemann's removable singularity).
Any hint would be appreciated (maybe it's just a straightforward computation that didn't work for me).
 A: We have to compute the integral $\int_{\partial D_R(0)} f(z)dz$.
Hint: the function $f(z)=\dfrac{\exp(\sin(z^2))}{(z^2+1)(z-2i)^3}\in\operatorname{Hol}(\mathbb C\setminus\{z_1,z_2,z_3\})$, where $z_1=i,z_2=-i,z_3=2i$.
Suppose we are in the situation that all the points where $f$ is not holomorphic are inside the region defined by $D_R(0)$ (for example for $R>2$).
The idea is to define an open subset with multiple boundary $\Omega\subset\mathbb C$ such that $\partial\Omega=\partial D_R(0)-\partial D_{r_1}(i)-\partial D_{r_2}(-i)-\partial D_{r_3}(2i)$ and $f\in\operatorname{Hol}(\Omega)\cap\mathcal C(\overline{\Omega})$. You clearly have to impose conditions on $r_j$, $j=1,2,3$. In particular you want $D_{r_j}(z_j)\subset D_R(0)$ such that $D_{r_1}(z_1)\cap D_{r_2}(z_2)\cap D_{r_3}(z_3)\cap D_R(0)=\emptyset$.
With these hypothesis we know that
$$\begin{aligned}
\int_{\partial \Omega}f(z)dz&=\int_{\partial D_R(0)-\partial D_{r_1}(i)-\partial D_{r_2}(-i)-\partial D_{r_3}(2i)}f(z)dz=0\text{ so }\\\int_{\partial D_R(0)}f(z)dz&=\int_{\partial D_{r_1}(i)}\frac{\color{blue}{e^{\sin(z^2)}}}{\color{blue}{(z+i)(z-2i)^3}(z-i)}dz+\\
&\int_{\partial D_{r_2}(-i)}
\frac{\color{green}{e^{\sin(z^2)}}}{\color{green}{(z-i)(z-2i)^3}(z+i)}dz+\\&\int_{\partial D_{r_3}(2i)}
\frac{\color{purple}{e^{\sin(z^2)}}}{\color{purple}{(z-i)(z+i)}(z-2i)^3}dz
\end{aligned}\\=2\pi i g_1(i)+2\pi ig_2(-i)+\dfrac{2\pi i}{2!}g_3''(2i)$$
where $g_1,g_2,g_3$ are the colored functions with $g_j\in\operatorname{Hol}(D_{r_j}(z_j))\cap\mathcal C(\overline{D_{r_j}(z_j)})$.
