# Multiple Scale Analysis of given equation.

I need to analyse the below equation using multiple scale analysis. $$y''+[q+\epsilon(\sin(3t) +\cos t)]y=0$$

I am doing multiple scale analysis for the first time, so I don't if I'm in the right way. I took two time scale, setting $\eta=\epsilon t$. \begin{align} y(\eta,t) &=y_o+\epsilon y_1+\epsilon^2y_2+\ldots \\ q&=\frac{1}{4} +\epsilon q_1+\epsilon^2q_2+\ldots \\ y''&=y_{tt} + 2\epsilon y_{t\eta}+\epsilon^2y_{\eta\eta} \end{align}

After putting the above values to first equation and equating coefficients of $\epsilon^0$ to zero gives $$y_{ott}+\frac{y_0}{4}=0.$$ That is $y_o=A(\eta)e^{it}+A^*(\eta)e^{-it}$. Similarly equating coefficients of $\epsilon^1$ gives $$y_{1tt}+\frac{y_1}{4}=-2y_{0\eta t}-q_1y_0-y_0\sin (3t)-y_0\cos t.$$Putting $y_0$ to the RHS of above equation gives

$$\text{RHS}=-iA^{'}e^{it/2}-q_1Ae^{it/2}-\frac{A}{2}e^{i7/2}+\frac{A}{2}e^{-i5/2}-\frac{A}{2}e^{i3/2}-\frac{A}{2}e^{-it/2}+cc.$$ To remove secular terms, relation obtained is
$$B=K\exp\left(\sqrt{q^2-\frac{1}{4}}t\right).$$ I need to plot the stability diagram till $\epsilon^4$.

Can anybody guide me to complete the analysis.