Hey guys I'm a bit stuck on this problem, any help would be greatly appreciated!

For, $\displaystyle \frac{dy}{dx}=\frac{2cos^{2}x-sin^{2}x+y^2}{2cos^{2}x}$

Substitute, $\displaystyle y(x)=sinx+\frac{1}{u(x)}$

to get, $\displaystyle \frac{du}{dx}=-utanx-\frac{1}{2}secx$

and then find the general solution for y(x)

So far I've got to $\displaystyle u^{2}=\frac{2cosx}{sin^{2}x+y^{2}}$

Am I on the right track, and where do I go from here?