Let's say $f\left( z \right) = {z^8} - {z^3} + 10$ and we wish to know the change of argument of $f(z)$ over $\gamma $, where $$\gamma = \left\{ {z = x{\rm{ }}|{\rm{ }}0 \le x \le R} \right\}$$.
One the one hand, it is clear that if $x \in \gamma $ then $f(x)$ is real and $f(x)>0$, thus the change in the argument is zero.
One the other hand, the following integral (which should compute the change in the argument) is not zero:
$${1 \over {2\pi i}}\int\limits_\gamma {{{f'(z)} \over {f(z)}}dz} = {1 \over {2\pi i}}\int\limits_0^R {{{f'(x)} \over {f(x)}}dx} = {1 \over {2\pi i}}\ln \left( {{{f\left( R \right)} \over {f\left( 0 \right)}}} \right) = {1 \over {2\pi i}}\ln \left( {{{{R^8} - {R^3} + 10} \over {10}}} \right) \ne 0$$
Please tell me where I was wrong. It is crystal clear to me that I am wrong on the second part, but I am not sure where exactly.