Let $w$ be a differential form defined by $w(x,y)=xy^ndx+x^mydy$ where $m$ and $n$ are non negative integers.
1) For which values of $m$ and $n$ the differential form $w$ is closed?
2) For these values, is $w$ exact ? if yes then determine all of its primitives?
My try:
1) $w$ is defined for all couples $(x,y)$ such that $x>0$ and $y>0$. Moreover if $w$ is closed then necessarely $\dfrac{\partial (xy^n)}{\partial y}= \dfrac{\partial (x^my)}{\partial x}$ which means $nxy^{n-1}=mx^{m-1}y$ for all $x>0$ and $y>0$. In particular this identity must hold for $x=y=1$, in which case we must have $n=m$. Now this criterion gives that $nxy^{n-1}=nx^{n-1}y$ for all $x>0$ and $y>0$. If $n=m=0$, $w(x,y)=xdx+ydy$ is clearly closed. If $n=m\not = 0$, we have that $xy^{n-1}=x^{n-1}y$ for all $x>0$ and $y>0$, hence $ x^{n-2}=y^{n-2}$ for all $x>0$ and $y>0$, which can not be true. Hence the only value is $n=0$.
2)Since $w$ is defined on the subset $U$ of the plane consisting of couples $(x,y)$ such that $x>0$ and $y>0$ it is clear that $U$ is convex hence star convex and by Poincaré theorem, for $n=0$, $w$ is exact.
to find the primitives $f$ of $w$ we solve the equation $\dfrac{\partial f}{\partial x}=xy^0=x$ which gives that $f(x,y)=x^2/2+c_1(y)$ and the equation $\dfrac{\partial f}{\partial y}=x^0y=y$ which gives that $f(x,y)=y^2/2+c_2(x)$ Hence $f(x,y)=x^2/2+y^2/2+constant$.
Is my try correct? thank you for your help!