The solution of $\cos y+(x \sin y-1) \frac{d y}{d x}=0$ is
The solution of $\cos y+(x \sin y-1) \frac{d y}{d x}=0$ is
$x \sec y=\tan y+C$
$\tan y-\sec y=C x$
$\tan y+\sec y=C x$
$x \sec y+\tan y=C$
Solution
Given differential equation can be rewritten as
$
\begin{aligned}
& \cos y \frac{d y}{d x}+x \sin y-1=0 \\
& \Rightarrow \quad \frac{d x}{d y}+(\tan y) x=\sec y \\
&
\end{aligned}
$
It is a linear differential equation of the form
$
\begin{aligned}
\frac{d x}{d y}+P x & =Q \\
\therefore \quad \quad \quad I F & =e^{\int P d y}=e^{\int \tan y d y} \\
& =e^{\log \sec y}=\sec y
\end{aligned}
$
$\therefore$ Solution is
$
\begin{aligned}
& x \sec y=\int \sec ^2 y d y \\
& \Rightarrow \quad x \sec y=\tan y+C \\
&
\end{aligned}
$