Proving there is no analytic function Let $f(z)=\frac{1}{(z-1)(z-2)}$ and $g(z)=\frac{z}{(z-1)(z-2)}$. Let $\gamma$ be the circle of radius 4 centered at the origin and traveled once in the counterclockwise direction. Let $A=\{ z \in \mathbb{C}: |z|>3 \}$
1) I need to show there is no analytic function $G: A \to \mathbb{C}$ such that $G'(z)=g(z)$ for all $z$ in $A$. 
2) I also need to show that there is an analytic function $F:A \to \mathbb{C}$ such that $F'(z)=f(z)$ for all $z$ in $A$.
Do I have to integrate to find such function?
 A: If $g$ had a primitive $G$ on $A$, we would necessarily have
$$\int_{\Gamma} g(z)\,dz = \int_{\Gamma} G'(z)\,dz = 0$$
for all closed (piecewise $C^1$) paths $\Gamma$ in $A$. But
$$\int_\gamma g(z)\,dz = \int_\gamma \left(\frac{2}{z-2} - \frac{1}{z-1}\right)\,dz = 2\pi i\left(2 - 1\right)\neq 0.$$
On the other hand,
$$f(z) = \frac{1}{z-2} - \frac{1}{z-1}$$
shows
$$\int_\gamma f(z)\,dz = 0.$$
That is sufficient to conclude that $f$ has a primitive on $A$. (Using more or less machinery.)
We can construct an explicit primitive of $f$, however, without integrating. Locally, we have branches of $\log (z-2)$ and $\log (z-1)$, so locally $\log (z-2) - \log (z-1)$ is a primitive of $f$. By the properties of the logarithm, $\log (z-2) - \log (z-1) = \log \frac{z-2}{z-1} + \text{const}$ for any branches of the logarithms chosen. But we can define $\log \frac{z-2}{z-1}$ globally on $A$ without any problem: the Möbius transformation $z\mapsto \frac{z-2}{z-1}$ maps the circle $\lvert z\rvert = 3$ to the circle $\lvert w-\frac{7}{8}\rvert = \frac{3}{8}$, and $A \cup \{\infty\}$ to the disk $D = \left\{ w : \lvert w-\frac{7}{8}\rvert < \frac{3}{8}\right\}$, mapping $\infty$ to $1$. $D$ is contained in the right half-plane, so there is a branch of $\log$ defined on $D$.
