Derivation of forced oscillation solutions

Use complex numbers $$ \ddot z + 2\gamma\dot z + \omega_0^2 z = fe^{i\omega t} $$ and guess particular solution $z(t) = Ae^{i\omega t}$.

Substituting, $$ (-\omega^2 + 2i\gamma\omega + \omega_0^2)A = f $$ $$ A = \frac{f}{\omega_0^2 - \omega^2 + 2i\gamma\omega}. $$