Solution (source code)

= Solution

In the steady periodic response, the cycle average of the <mechanical energy> derivative vanishes. The applied <average power> therefore equals the power dissipated by the viscous <force>:
$$
\overline P=m\gamma\langle\dot z^{\,2}\rangle=\frac12m\gamma A^2\omega^2.
$$
Using <10/b/solution> gives
$$
\boxed{\overline P(\omega)=\frac{F_0^2m\gamma\omega^2}{2\big[(k-m\omega^2)^2+(m\gamma\omega)^2\big]}.}
$$
The same result follows from averaging the instantaneous input <power> $F(t)\dot z(t)$, using the response <phase> relative to the drive.

For positive $m,k,\gamma$ and $\omega>0$, rewrite this as
$$
\overline P=\frac{F_0^2}{2m\gamma}\,
\frac{(m\gamma\omega)^2}{(k-m\omega^2)^2+(m\gamma\omega)^2}.
$$
The last factor is at most one, with equality precisely when $k-m\omega^2=0$. Thus the power peak occurs at $\omega_0=\sqrt{k/m}$ and
$$
\boxed{\overline P_{\max}=\frac{F_0^2}{2m\gamma}.}
$$
This power-resonance <angular frequency> is exactly $\omega_0$; it need not equal the <angular frequency> maximizing displacement <amplitude>. Positive damping is essential: at $\gamma=0$ and exact resonance there is no bounded steady periodic response to nonzero forcing, so the divergent expression is not a finite-power solution.