I am trying to solve this system of differential equations using elimination method, but I am stuck. $$\left.\left\{\begin{aligned}&y_1^{\prime}=y_2,\\&y_2^{\prime}=-y_1+\frac1{\cos x}.\end{aligned}\right.\right.$$ My attempt:
I tried differentiating the $y_1'= y_2$ again to get $y_1''= y_2'= -y_1+ \frac{1}{\cos(x)}$. But I am not sure how to proceed further. I've been suggested to use Lagrange method later, but I am not sure. I would appreciate if someone could help me get to the final solution.
You reduced the system to the second order ODE $$ y_1''+y_1=\frac{1}{\cos x}. \tag{1} $$ Next steps: