I need to differentiate the complex function $f(z)=z^2+z$.
I know that the definition of a derivative is $f'(z)=\frac{f(z)-f(z_0)}{z-z_0}$. In this case, $f'(z)=\frac{(z^2+z)-(z_0^2+z_0)}{z-z_0}$.
According to the solution, the numerator factorises into $(z-z_0)(z+z_0+1)$. I am assuming that $(z-z_0)$ was factored out so that cancellation could be performed with the denominator, but I am struggling to understand how this factorisation was carried out, since this is not a conventional factorisation which I am accustomed to performing.
I understand how to proceed from here: $(z-z_0)$ cancels and we are left with $\lim_{z \to z_0}(z+z_0+1)=2z_0+1$, and thus $f'(z)=2z+1$.
So, the only step which I am struggling to grasp is the factorisation step! How do I perform a factorisation like this?
$$(z^2+z)-(z_0^2+z_0)=(z^2-z_0^2)+(z-z_0)=(z-z_0)(z+z_0)+(z-z_0)=(z-z_0)(z+z_0+1)$$