I need to solve the differential equation $1+(x/y-\sin y)y'=0$. The equation is not exact so I try to use an integrating factor to make it exact.
$u(x) =$ integrating factor, only dependent on $x$ (because the my book told me to do it like this to make it easier) $$M(x,y) = u(x)$$ and $$N(x,y) = u(x)(1+(x/y-\sin y))$$ The answer for $u(x) = y$. The integrating factor is visible just by inspection but I would like to see how to derive the integrating factor.
I end up with the differential equation $$\frac{u'(x)}{u(x)}= -\frac{1}{x-y\sin y}$$ from here I don't know how to get to $u(x) = y$?
ps. I don't know how to write the equations nicely. If someone wants to send me a link here they explain how to do it, I'll write my next question as a nice formula.
$\displaystyle 1 + (\frac{x}{y} - \sin y) y'= 0$.
Actually integrating factor that you have is $u(y)$ (you can try with both, first with $u(x)$ and if that doesn't work, with $u(y)$)
$\displaystyle u(y) + u(y)(\frac{x}{y} - \sin y) y'= 0$
$\displaystyle P = u(y), Q = u(y)(\frac{x}{y} - \sin y)$
$\displaystyle P_y = \frac{\partial u}{\partial y}, Q_x = \frac{u(y)}{y}$
To make ODE exact, $P_y = Q_x$ so $u(y) = y$ is a possible integrating factor.