First Order ODE/Cosine (x + y) dx = sine (x + y) dx + x sine (x + y) dy

Theorem
The first order ordinary differential equation:
 * $\cos \left({x + y}\right) \mathrm d x = \sin \left({x + y}\right) \mathrm d x + x \sin \left({x + y}\right) \mathrm d y$

is an exact differential equation with solution:
 * $x \cos \left({x + y}\right) = C$

Proof
Express it in the form:
 * $\left({x \sin \left({x + y}\right) - \cos \left({x + y}\right)}\right) \mathrm d x + x \sin \left({x + y}\right) \mathrm d y$

Let:
 * $M \left({x, y}\right) = x \sin \left({x + y}\right) - \cos \left({x + y}\right)$
 * $N \left({x, y}\right) = x \sin \left({x + y}\right)$

Then:

Thus $\dfrac {\partial M} {\partial y} = \dfrac {\partial N} {\partial x}$ and $(1)$ is seen by definition to be exact.

By Solution to Exact Differential Equation, the solution to $(1)$ is:
 * $f \left({x, y}\right) = C$

where:

Hence:

and:

Thus:
 * $f \left({x, y}\right) = - x \cos \left({x + y}\right)$

and by Solution to Exact Differential Equation, the solution to $(1)$ is:
 * $- x \cos \left({x + y}\right) = C_1$

or setting $C = -C_1$:
 * $x \cos \left({x + y}\right) = C$