What's wrong with this reasoning? (Cauchy integral theorem) Asumme that $f$ is analytic and for $z\in \overline{B(x,r)}$:
$$|f(z)|\leq d$$
Then for $z\in B(x,r)$:
$$|f'(z)|=\frac{1}{2\pi}\left|\oint_{|\alpha-x|=r}\frac{f(\alpha)}{(\alpha-z)^2}d\alpha\right|\leq \frac{d}{2\pi}\left|\oint_{|\alpha-x|=r}\frac{1}{(\alpha-z)^2}d\alpha\right|=0$$
Where in the first equality I use the Cauchy integral theorem. In the inequality I use that $|f(z)|<d$ over the integration curve. And in the last equality I use that
$$
    \oint_{|\alpha-x|=r}\frac{1}{(\alpha-z)^n}d\alpha= 
\begin{cases}
    2\pi i,& \text{if } n=-1\\
    0,              & \text{otherwise}
\end{cases}
$$
However this result cannot be correct, because it does not even require $d$ to be small. According to this reasoning we would conclude that if an analytic function is bounded on a domain, then it's derivative must be $0$, which is absurd.
So I'm sure that I'm doing something wrong here, but I just don't see what.
Thanks

Edit: there was no point in talking about the difference between $f$ and $g$.
 A: You are misusing the inequality $|f(z)| \le d$.  Note that the denominator $(\alpha-z)^2$ is not always a positive (it's not even real except on a set of measure zero).  While $\oint_{|\alpha-z|=r}\frac{1}{(\alpha-z)^n}d\alpha$ exhibits perfect cancellation, there's no reason that the same thing happens when you multiply the integrand by a non-constant $f(\alpha)$.  Try to think of what principle justifies pulling out the $d$ in your calculation: there isn't one.  The best you can hope for with the limited information about $f$ is to use the triangle inequality to pull the absolute value signs inside:
$$\frac{1}{2\pi} \left|\oint_{|\alpha-z|=r}\frac{f(z)}{(\alpha-z)^n}d\alpha\right| \le \frac{1}{2\pi} \oint_{|\alpha-z|=r}\frac{|f(z)|}{|\alpha-z|^n} |d\alpha| \le \frac{1}{2\pi} \oint_{|\alpha-z|=r}\frac{d}{|\alpha-z|^n} |d\alpha| = \frac{d}{2\pi} \oint_{|\alpha-z|=r}\frac{|d\alpha|}{r^n},$$
and this evaluates to the positive quantity $dr^{1-n}$.
A: I think some things are fishy: first, Cauchy's theorem requires $\;z\;$ in the interior of the ball $\;B(z,r)\;$ , not in its closure , as then $\;z\;$ would be a singular point on the integration path.
Second, the inequality $\;|f(z)|\le d\;$ is true only on the ball's circumference, not for interior points.
