Problem with Cauchy integrals Hello everybody I need to solve some integral with the help of the Cauchy Integral Formula (CIF). I'll post near each integral the job that I've done and the question that I can't answer.
let $\kappa \space (z_0,r):[0,2\pi] \to \mathbb{C}, t \mapsto z_0 + re^{it} $

$a) $$$ \int_{\kappa \space (1,\frac32)}\frac{z^7+1}{z^2(z^4+1)}dz$$

I've found the zeros of the denominator which are given by $\{0,e^{-i\frac{3\pi}{4}},e^{i\frac{-\pi}{4}},e^{i\frac{\pi}{4}},e^{i\frac{3\pi}{4}}\}$
I have two problem with this integral the first one is that I dont know how to decompose the fraction in some way that will allow me to use the CIF. The second one (which won't be a problem if I could find a decomposition) is that the circle $\kappa \space (1,\frac32)$ does only contain the singularities $\{0,e^{i\frac{-\pi}{4}},e^{i\frac{\pi}{4}}\}$ How should I handle this?

$b)$$$\int_{\kappa \space (0,3)}\frac{e^{-z}}{(z+2)^3}dz$$

What I've done here is find the singularity: $-2$. Now with the CIF (since e$^{-z}$) is holomorphic on $\mathbb{C}$ I get
$$f^{(2)}(-2)=\frac{2!}{2\pi i}\int_{\kappa \space (0,3)}\frac{e^{-z}}{(z+2)^3}dz \iff f^{(2)}(-2)\frac{2\pi i}{2!}=\int_{\kappa \space (0,3)}\frac{e^{-z}}{(z+2)^3}dz $$
which means that $\int_{\kappa \space (0,3)}\frac{e^{-z}}{(z+2)^3}dz = \pi ie^{ 2}$
This should be true.

$c)$ $$\int_{\kappa \space (0,3)}\frac{\cos(\pi z)}{z^2-1}dz$$

Here what I've done is decomposing the denominator, indeed I got
$$\int_{\kappa \space (0,3)}\frac{\cos(\pi z)}{z^2-1}dz=\frac12 \int_{\kappa \space (0,3)}\frac{\cos(\pi z)}{z+1}-\frac{\cos(\pi z)}{z-1}dz$$
I'm scared of the $\pi z$ inside the cosinus, so I made a substitution $u =\pi z,du = \pi dz$ and I got
$$\frac12 \int_{\kappa \space (0,3)}\frac{\cos(\pi z)}{z+1}-\frac{\cos(\pi z)}{z-1}dz= \frac{1}{2 \pi} \int_{\kappa \space (0,3)}\frac{\cos(u)}{\frac{u}{\pi}+1}-\frac{\cos(u)}{\frac{u}{\pi}-1}dz$$
$$ = \frac12 \int_{\kappa \space (0,3)}\frac{\cos(u)}{u + \pi}-\frac{\cos(u)}{u - \pi}dz$$
Question: Am I allowed to do that? When I do the substitution how am I supposed to change the domain of integration $\kappa \space (0,3)$? If I don't change it the singularity $\pi$ is then outside the domain and this would give me as result $0$.

$d)$ $$\int_{\kappa \space (0,r)}\frac{\sin(z)}{z-b} \quad\text{for}\quad r\gt 0, b \in \mathbb{C}, |b| \neq r$$

Here is what I've thought. The singularity is $b$. If $|b| \gt r$ than we know that the function $sin(z)$ is analytic on the domain of integration, which is closed, and hence will give me as result $0$.
If $|b| \lt r$ I can apply the CIF to get that 
$$\int_{\kappa \space (0,r)}\frac{\sin(z)}{z-b} = 2 \pi i \sin(b)$$
I would appreciate any correction on my job, thank you in advance.
 A: It is not clear tome what tools are you allowed to use.
I assume that you do not want to either change the integration curve nor use the residue theorem. In this case you indeed have to transform the integrand to a sum in such a way that each term has a single singularity inside the curve.
a) As I understand, the difficulty is that the numerator has higher degree than the denominator. You can divide with remainder first:
$\frac{z^7+1}{z^6+z^2}=z+\frac{A}{z}+\frac{B}{z^2}+\frac{C}{z-1}+...$
The singularities outside do not matter.
b) Yes
c) By the substitution the radius of the circle is changed. If $|z|=3$ then $|u|=3\pi$. You also have to replace $dz$ by $\pi du$.
d) Yes
A: I've discussed the solution of the integrals in class with my assistant and I will post the solution to them. I also appreciate the hints given me by @user141614 and I up voted your answer, but I've found a more clever solution to the integrals that I would like to share in case someone else has my problem. I don't know if I can accept my answer: am I allowed to do this?
Let us start with

$b)$$$\int_{\kappa \space (0,3)}\frac{e^{-z}}{(z+2)^3}dz$$

and with 

$d)$ $$\int_{\kappa \space (0,r)}\frac{\sin(z)}{z-b} \quad\text{for}\quad r\gt 0, b \in \mathbb{C}, |b| \neq r$$

The solutions that I gave about are correct.
To solve the integral $a)$ and $c)$ there is a more clever way like I said. I will explain first the integral $c)$ because is a little easier to explain. (Thank you @user141614 to tell me that the radius of the circle is changed when I do this substitution).
we have$$\int_{\kappa \space (0,3)}\frac{\cos(\pi z)}{z^2-1}dz = \int_{\kappa \space (0,3)}\frac{\cos(\pi z)}{(z+1)(z-1)}dz$$
The situation is like the one in the picture:

We are integrating over the $\color{blue}{blue}$ circle and we see that we have two singularities on $\{-1,1\}$ By following the proof of the Cauchy Integral formula we notice that the integral over the $\color{blue}{blue}$ circle is equal to the integral over the $\color{red}{red}$ circle $+$ the integral over the $\color{green}{green}$ circle. That means that for $\epsilon \gt 0$
$$\int_{\color{blue}{\kappa \space (0,3)}}\frac{\cos(\pi z)}{(z+1)(z-1)}dz=\int_{\color{green}{D_{\epsilon}(-1)}}\frac{\cos(\pi z)}{(z+1)(z-1)}dz+\int_{\color{red}{D_{\epsilon}(1)}}\frac{cos(\pi z)}{(z+1)(z-1)}dz$$
Moreover we see that the function $\frac{\cos(\pi z)}{z-1}$ is holomorphic in $\color{green}{D_{\epsilon}(-1)}$ and that the function $\frac{\cos(\pi z)}{z+1}$ is holomorphic in $\color{red}{D_{\epsilon}(1)}$ We are hence allowed to use the CIF and we get
$$\int_{\color{green}{D_{\epsilon}(-1)}}\frac{\dfrac{\cos(\pi z)}{z-1}}{(z+1)}dz+\int_{\color{red}{D_{\epsilon}(1)}}\frac{\dfrac{\cos(\pi z)}{z+1}}{(z-1)}dz \overset{CIF}{=}2\pi i\frac{\cos(\pi \dot{} -1)}{-1-1} + 2\pi i\frac{\cos(\pi \dot{} 1)}{1+1} = \pi i - \pi i = 0$$
We can now use the same reasoning to evaluate 

$a) $$$ \int_{\kappa \space (1,\frac32)}\frac{z^7+1}{z^2(z^4+1)}dz$$

Here we have the following situation

Where the big $\color{blue}{blue}$ circle is our integration contour. The small $\color{blue}{blue}$ circles are our singularities and we define $\color{red}{D_{\epsilon}(0)}$ to be the open ball around $0$, $\color{green}{D_{\epsilon}(e^{\frac{\pi}{4}})}$ to be the open ball around the singularity $e^{\frac{\pi}{4}}$ and $\color{fuchsia}{D_{\epsilon}(e^{\frac{-\pi}{4}})}$ to be the open ball around $e^{\frac{-\pi}{4}}$ 
Like above we can demonstrate that the integral over $\color{blue}{\kappa \space (1,\frac32)}$ is the sum of the integrals over $\color{red}{D_{\epsilon}(0)}$, $\color{green}{D_{\epsilon}(e^{\frac{\pi}{4}})}$, $\color{fuchsia}{D_{\epsilon}(e^{\frac{-\pi}{4}})}$ of the function$\frac{z^7+1}{z^2(z^4+1)}$ So we have:
$$\int_{\color{blue}{\kappa \space (1,\frac32)}}\frac{z^7+1}{z^2(z^4+1)}dz =\int_{\color{blue}{\kappa \space (1,\frac32)}}\frac{z^7+1}{z^2\dot{}(z-e^{\frac{-3i\pi}{4}})\dot{}(z-e^{\frac{-i\pi}{4}})\dot{}(z-e^{\frac{i\pi}{4}})\dot{}(z-e^{\frac{3i\pi}{4}})} dz \quad (1)$$ 
And we have that:
• the function $f_1(z):=\dfrac{z^7+1}{(z-e^{\frac{-3i\pi}{4}})\dot{}(z-e^{\frac{-i\pi}{4}})\dot{}(z-e^{\frac{i\pi}{4}})\dot{}(z-e^{\frac{3i\pi}{4}})}$ is holomorphic on $\color{red}{D_{\epsilon}(0)}$
• the function $f_2(z):=\dfrac{z^7+1}{z^2\dot{}(z-e^{\frac{-3i\pi}{4}})\dot{}(z-e^{\frac{i\pi}{4}})\dot{}(z-e^{\frac{3i\pi}{4}})}$ is holomorphic on $\color{fuchsia}{D_{\epsilon}(e^{\frac{-\pi}{4}})}$
• the function$ f_3(z):=\dfrac{z^7+1}{z^2\dot{}(z-e^{\frac{-3i\pi}{4}})\dot{}(z-e^{\frac{-i\pi}{4}})\dot{}(z-e^{\frac{3i\pi}{4}})}$ is holomorphic on $\color{green}{D_{\epsilon}(e^{\frac{\pi}{4}})}$
hence $(1)$ is equal to 
$$\int_{\color{red}{D_{\epsilon}(0)}}\frac{f_1(z)}{z^2}dz + \int_{\color{fuchsia}{D_{\epsilon}(e^{\frac{-i\pi}{4}})}}\frac{f_2(z)}{z-e^{\frac{-i\pi}{4}}}dz + \int_{\color{green}{D_{\epsilon}(e^{\frac{i\pi}{4}})}}\frac{f_3(z)}{z-e^{\frac{i\pi}{4}}}dz \overset{CIF}{=} \frac{2 \pi i}{1!} (f_1(0))'+  2 \pi i f_2(e^{\frac{-i\pi}{4}})+2 \pi i f_3(e^{\frac{i\pi}{4}})$$
