How to approach the ODE $(y\cos y-\sin y+x)y'=y$? I am not able to understand how to approach the following ODE. It is neither exact nor homogeneous nor perhaps linear. Please help
\begin{aligned}(y\cos y-\sin y+x)y'=y\end{aligned}
The given solution is \begin{aligned}y+\sin y=x\end{aligned}
 A: It is a linear ODE if you consider the function $x(y)$ so that $x'(y)=\frac{dx}{dy}=\frac{1}{\frac{dy}{dx}}=\frac{1}{y'(x)}$
$(y\cos(y)-\sin(y)+x)y'=y$
$\frac{y\cos(y)-\sin(y)+x}{y}=x'(y)$
$x'(y)-\frac{1}{y}x(y)=\frac{y\cos(y)-\sin(y)}{y}$
Then you know how to solve this first order linear ODE which the unknown function is $x(y)$.
A: Indeed,
$$
[(y\cos y - \sin y) + x]dy = ydx \quad \implies \quad (y\cos y - \sin y)dy + xdy -ydx =0 \quad \implies
$$
$$
\dfrac{(y\cos y - \sin y)dy}{y^2} + \dfrac{xdy -ydx}{y^2} = 0 \quad \implies\quad \dfrac{d}{dx}\biggl(\dfrac{\sin y}{y}\biggr) + \dfrac{d}{dx}\biggl(\dfrac{x}{y}\biggr) = 0 \quad \implies
$$
$$
\dfrac{\sin y}{y} + \dfrac{x}{y} = C \quad \implies\quad \sin y + x = Cy
$$
A: Start by getting everything on one side $y+(siny-x-ycosy)y'=0$ now as you have already noticed it is not an exact equation but it has the form of an exact equation.
Lets call $M(x,y)=y$ and $N(x,y)=siny-x-ycosy$. We need to check if it's possible to make it exact using an integrating factor. 
This will occur when $\frac{N_x-M_y}{M}$ is a function of $y$ only or when $\frac{M_y-N_x}{N}$ is a function of $x$ only.
In our case, $\frac{N_x-M_y}{M}$ is a function of only $y$ since $N_x=-1$ and $M_y=1$ and $M=y$
Now that we know the condition to make it exact is satisfied we must multiply through by an integrating factor. This factor is $\mu(x)=e^{\int\frac{N_x-M_y}{M}dy}$
Once you multiply through by this factor you can check that the equation is now exact and you can use methods you already know to solve it.
source: http://www.sosmath.com/diffeq/first/intfactor/intfactor.html
A: Write as
$$(y\cos y -\sin x +x)dy-ydx=0$$ and use an integrating factor of $\frac{1}{y^2}$
Then the general solution which must depend on a constant is 
$$cy+\sin y=x$$
