= Solution
For a continuously differentiable <differential one-form>, exactness requires $\boxed{P_y=Q_x}$. It is locally sufficient, and globally sufficient on a <simply connected domain>; on a domain with holes, closedness alone need not imply exactness.
An <integrating factor for a differential one-form> depending only on $x$ must satisfy
$$
\partial_y(\mu P)=\partial_x(\mu Q),\qquad
\mu P_y=\mu'Q+\mu Q_x.
$$
Thus, where $Q\ne0$,
$$
\boxed{\frac{\mu'}\mu=\frac{P_y-Q_x}{Q},\qquad
\mu(x)=\exp\int\frac{P_y-Q_x}{Q}\,dx}.
$$
If the ratio depends only on $x$, this defines a nonzero factor and makes it a <closed differential form>, hence locally exact. For a factor depending only on $y$, the analogous calculation gives
$$
\boxed{\frac{\mu'}\mu=\frac{Q_x-P_y}{P},\qquad
\mu(y)=\exp\int\frac{Q_x-P_y}{P}\,dy},
$$
provided the ratio is a <function> only of $y$ on the region where $P\ne0$. A nonzero constant multiple of either factor works equally well.
Back to article page