![\mathrm dx+(x\cot y+\sin y)\,\mathrm dy=0](https://img.qammunity.org/2020/formulas/mathematics/college/o8gujizekiu9oq3ff54l1qu54yo29b5bk0.png)
Multiply both sides by
:
![\sin y\,\mathrm dx+(x\cos y+\sin^2y)\,\mathrm dy=0](https://img.qammunity.org/2020/formulas/mathematics/college/hh7uysfcjb740wybsesxm4w7oxujxvaf69.png)
The ODE is now exact, since
![(\partial(\sin y))/(\partial y)=\cos y](https://img.qammunity.org/2020/formulas/mathematics/college/xcnu4bnioq0lcg0gl5ms0b2bk6kted9eto.png)
![(\partial(x\cos y+\sin^2y))/(\partial x)=\cos y](https://img.qammunity.org/2020/formulas/mathematics/college/bgybkodaa37vqw94m1jduu2t1bfhx1c9hs.png)
so there exists a solution of the form
. This solution satisfies
![(\partial\Psi)/(\partial x)=\sin y](https://img.qammunity.org/2020/formulas/mathematics/college/2gfz98ayqf7wvdx04z1zldp283ahvotsi9.png)
![(\partial\Psi)/(\partial y)=x\cos y+\sin^2y](https://img.qammunity.org/2020/formulas/mathematics/college/jom2ax0dlwlpybgvpyzytgcyntwr7mldec.png)
Integrating both sides of the first PDE wrt
gives
![\Psi(x,y)=x\sin y+f(y)](https://img.qammunity.org/2020/formulas/mathematics/college/8bjuf584wiqbgf19ui26my7t7ezjltvlp8.png)
and differentiating wrt
gives
![(\partial\Psi)/(\partial y)=x\cos y+\sin^2y=x\cos y+(\mathrm df)/(\mathrm dy)](https://img.qammunity.org/2020/formulas/mathematics/college/b4y1ttl59b38nq5fk4n9pz00i584d634rm.png)
![\implies(\mathrm df)/(\mathrm dy)=\sin^2y=\frac{1-\cos2y}2](https://img.qammunity.org/2020/formulas/mathematics/college/zgsow52tocdf2xcz9c9z6ivirsyv2f7jhk.png)
![\implies f(y)=\frac y2-\frac{\sin2y}4+C](https://img.qammunity.org/2020/formulas/mathematics/college/ubdi0sq295dnysxciar3y5r4n9lvklg8k5.png)
So the ODE has solution
![\Psi(x,y)=x\sin y+\frac y2-\frac{\sin2y}4=C](https://img.qammunity.org/2020/formulas/mathematics/college/9spwv8fvidqfvpcughpnrdtkx10gn1j9hz.png)
which can be rewritten and simplified as
![\Psi(x,y)=\boxed{\sin y(2x-\cos y)+y=C}](https://img.qammunity.org/2020/formulas/mathematics/college/19x6tvtzksyqoc3tz4hcdg6i2qkhjfcrpc.png)