I want to integrate $\displaystyle \int_\gamma \frac{z}{(z-1)(z-2)}dz$ along the curve $\gamma(t)=2+\frac{1}{2}e^{it}$, with $t\in [0,2\pi]$
Can this be done by mean of residues? The curve is not closed, so I think it might be a problem. The fact that exercise was in a chapter calleed "Cauchy integral formula and residues" suggest that this theorems should be used to solve the integral
The curve is closed. What made you think it is not?
You can compute is using Cauchy's integral formula:\begin{align}\int_\gamma\frac z{(z-1)(z-2)}\,\mathrm dz&=\int_\gamma\frac{\frac z{z-1}}{z-2}\,\mathrm dz\\&=2\pi i\frac2{2-1}\\&=4\pi i.\end{align}