Solution
= Solution
The cross derivatives are both $2y$, so the equation is exact. The function $x\cos x+xy^2$ differentiates to the given one-form. Hence
$$
\boxed{x\cos x+xy^2=C.}
$$
Differentiating this implicit equation checks both coefficients of the <exact differential> directly.