Solution (source code)

= Solution

For an <exact differential> $P\,dx+Q\,dy$, equality of mixed <partial derivatives> requires $P_y=Q_x$. The matching pair is $P=f_1$, $Q=f_3$, since
$$
\partial_yf_1=\frac{\cos y}{x}-e^x\sin2y=\partial_xf_3.
$$
The other pairings do not give the same <partial derivatives> on an open region. Integrating $f_1$ with respect to $x$ gives $\ln x\sin y+e^x\cos^2y+C(y)$. Its $y$ derivative agrees with $f_3$ precisely when $C'(y)=0$. Hence
$$
\boxed{f(x,y)=\ln x\sin y+e^x\cos^2y+C,\qquad x>0.}
$$
This also proves existence, rather than relying only on the necessary mixed-<partial derivative> test.