When an external force with angular frequency $\omega_d$ acts on a system of natural angular frequency…
When an external force with angular frequency $\omega_d$ acts on a system of natural angular frequency $\omega$, the system oscillates with angular frequency $\omega_{\mathrm{d}}$. The condition for the amplitude of oscillations to be maximum is
$\omega_{\mathrm{d}}=2 \omega$
$\omega_{\mathrm{d}}=\omega$
$\omega_d=\frac{\omega}{2}$
$\omega_{\mathrm{d}}=3 \omega$
Solution
Both amplitude and energy get maximized when the frequency is equal to the natural frequency. This is the condition of resonance. $\omega_{\mathrm{d}}=\omega$