Please help solving this inital-value problem The initial-value problem 
$$\begin{cases}(ye^{xy} + cos(x))dx + (xe^{xy})dy = 0\\y(\dfrac{\pi}{2}) = 0\end{cases}$$
From my calculations it seems the integrating factor depends on y and x, but I am unsure how to find the correct integrating factor. 
Please help

Hint:$$m.dx+n.dy=0 \\$$
$$\begin{cases}(ye^{xy} + cos(x))dx + (xe^{xy})dy = 0\\y(\dfrac{\pi}{2}) = 0\end{cases}\\
\frac{\partial (ye^{xy} + cos(x)) }{\partial y}=1.e^{xy}+xy.e^{xy}+0\\
\frac{\partial (xe^{xy})}{\partial x}=1.e^{xy}+yxe^{xy}\\so \\
\frac{\partial n}{\partial x}=\frac{\partial m }{\partial y}\\exact \space equation$$now 
$$u(x,y)=\int m.dx=\int (ye^{xy} + cos(x))dx=\\e^{xy}+sinx +g(y) \to $$
$$u_y=x.e^{xy}+0+g'(y) =xe^{xy} \\\to g'(y)=0 \to g(y)=c\\so \\ u(x,y)=e^{xy}+sinx+c$$
