I am a masters student and this question was asked in my exercise in Manifolds course.
Let $a= (2x+y\cos(xy)) dx +x \cos(xy) dy$ on $\mathbb{R}^2$ . Show that $a$ is closed. Also show that $a$ is exact by finding a function $f: \mathbb{R}^2 \to \mathbb{R}$ with $a= df$.
I have proved that $a$ is closed. But I am not able to prove that $a$ is exact because I don't have a strategy on what is to be done in this type of questions where exactness is to be proved.
Can you please help me by letting me know what strategy is to be used to prove exactness?
For reference,I am following my class notes only.
You need a function $f(x,y)$ such that $\frac{\partial f}{\partial x} = 2x+y\cos{(xy)}$ and $\frac{\partial f}{\partial y} = x\cos{(xy)}$. Any function $f(x,y)$ whose partial derivative with respect to $x$ is $2x+y\cos{(xy)}$ is of the form $f(x,y) = x^2 + \sin{(xy)} + g(y)$. Then $ x\cos{(xy)} = \frac{\partial f}{\partial y} = x\cos{(xy)} + g'(y)$, from where you conclude that $g'(y)=0$, hence $g(y) = c$ for some constant $c$. Therefore $f(x,y) = x^2+\cos{(xy)} + c$.
This method is more systematic then anti-differentiating both and trying to match the results; it will also help you with exact one-forms on $\mathbb{R}^3$.