The given differential equation is in the form $Mdx + Ndy = 0$, where $M = -xy\sin x + 2y\cos x$ and $N = 2x\cos x$.
To check if the equation is exact, we need to see if $\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}$.
Calculating these, we get
Show more…