I think this is a very basic question. I'm just not sure how to use $\frac{\mathrm{d}}{\mathrm{d}x}\left(\frac{\partial F}{\partial y'}\right)=\frac{\partial F}{\partial y}$ to find the general solution to: $$\int \left(y^2 − y'^{\\2}- 2y \cos( 2x)\right) \:\mathrm{d}x$$
Thanks
If you simply apply the equation $$\frac{\partial F}{\partial y} - \frac{d}{dx}(\frac{\partial F}{\partial y'}) = 0$$ for $F(x , y , y') = y^2 - y'^2 - 2y\cos(2x)$, you shall get $y'' - y = \cos(2x)$ (Please check the calculation).
Hope you can solve the second order ODE.