We are given that the oscillator obeys the following DE: $\ddot{\theta} + \omega_0^2\theta = \text{cos}(\omega t)$. The solution is $\theta = Ae^{i\omega_0t} + Be^{-i\omega_0t} + \frac{\text{cos}(\omega t)}{\omega_0^2 - \omega^2}$. Using the fact (given to us in the problem) that the oscillator is at rest at t = 0, we have that $\theta = 2A\text{cos}(\omega_0 t) + \frac{\text{cos}(\omega t)}{\omega_0^2 - \omega^2}$.
Here is where I am stuck. The question then asks us to find the RMS angle of the oscillator. I know that this requires us to evaluate $\theta^2$ and integrate it between $t = 0$ and $t = \frac{2\pi}{\omega_0}$. We are also allowed to assume that the average is taken over a time much larger than $\frac{1}{\mid \omega_0 - \omega\mid}$. (I don't really know what this means). I ended up with this expression:
$\displaystyle\int_{0}^{T}\theta^2 dt = \frac{1}{2(\omega_0^2 - \omega^2)^2}(\frac{\text{sin}(2\omega T)}{2\omega} + T) - \frac{4\omega A\text{sin}(\omega T)} {(\omega_0^2 - \omega^2)^2} + 2A^2T$ (where $T = \frac{2\pi}{\omega_0}$).
Now, I'm not even sure if I have evaluated the integral properly but I would like to know how I am supposed to use the previously mentioned assumption that they have provided in the question. Also, the question says that the oscillator (which is a pendulum) is in equilibrium at $t = 0$ - does this mean that $\theta = 0$ at $t = 0$? This would give $A = \frac{1}{2(\omega_0^2 - \omega^2)}$. We are also supposed to discuss the motion as $\mid \omega_0 - \omega\mid \rightarrow 0$. Can anyone help?