Inhomogeneous harmonic oscillator equation

Given the solution of harmonic oscillator equation $\ddot\phi_1+\phi_1 =0$ is $\phi_1= p_1 cos(\tau+\alpha)$. How to get the the solution of the linear inhomogeneous equation equation $$\ddot\phi_2+\phi_2+ g_2 \phi_1^2 +\omega\ddot\phi_1 =0$$ for $\phi_2$.

Answer is given $$\phi_2 = p_2\cos(\tau+\alpha)+ q_2\sin(\tau+\alpha)+\frac{g^2}{6 }p_1^2[\cos(2\tau+2\alpha)-3]+\frac{\omega_1^2}{4}p_1[2\tau \sin(\tau+\alpha)]+ \cos(\tau+\alpha)]$$ Where $\ddot\phi_1$= double differentiation with respect to time.

-
Boundary conditions on $\phi_2$? –  Ron Gordon Feb 1 '13 at 16:47
Removing tag homological-algebra. @Forhad: Do you have any idea what homological algebra is? –  Robert Israel Feb 1 '13 at 18:21
Hint: $\cos^2(t) = \dfrac{\cos(2t)}{2} + \dfrac{1}{2}$. Use Undetermined Coefficients.