TITLE: Differential equation: $ xy' = y + x\cos^2\left(\frac{y}{x}\right) $
QUESTION [8 upvotes]: I have the following DE:
$$ xy' = y + x\cos^2\left(\frac{y}{x}\right) $$
I then rule out the possible methods of solving it:

Not separable
Not homogeneous
Not exact
Possible integrating factor in $x$? No.
Possible integrating factor in $y$? No.
Not linear

Above are the only ways I have learned to solve DEs. To help, I've rewritten the DE in this form:
$$ M(x,y)dx + N(x,y)dy = 0 $$
$$ \left(y + x\cos^2\left(\frac{y}{x}\right)\right)dx - xdy =0 $$
$$ M_{y} = 1 - 2\cos\left(\frac{y}{x}\right)\sin\left(\frac{y}{x}\right) $$
$$ N_{x} = -1 $$
I'm completely lost now. I can't seem to find any integrating factors (the $\frac{y}{x}$) inside the trigs are making it so that I can't get things only in terms of $x$ or $y$.

REPLY [7 votes]: Dividing both sides by $x$, we get
$$\tag{1}y' =\frac{y}{x} + \cos^2\left(\frac{y}{x}\right).$$
If we let $u=\displaystyle\frac{y}{x}$, then we have $y=ux$ and 
$$\frac{dy}{dx}=x\frac{du}{dx}+u.$$
Substitute this into $(1)$, we have
$$x\frac{du}{dx}+u=u+\cos^2(u).$$
I think you can solve it starting from here.