### Integrating factor

(to section 2.6)

Consider equation \begin{equation} M(x,y)\, dx + N(x,y)\, dy=0. \label{A} \end{equation} It is exact iff \begin{equation} M_y -N_x=0. \label{B} \end{equation} If (\ref{A}) is not exact (i. e. (\ref{B}) is violated we a looking for integrating factor $\mu(x,y)$ such that after multiplication by $\mu$ equation becomes exact: \begin{equation} (\mu M)_y -(\mu N)_x=0 \iff \mu_y M-\mu_x N + \mu (M_y-N_x)=0. \label{C} \end{equation} Such factor is not unique and generally it is difficult to find. However

(i) if $(M_y-N_x)/N=f(x)$ does not depend on $y$ we look at integrating factor $\mu=\mu(x)$ and equation (\ref{C}) becomes \begin{multline} -\mu' N + \mu (M_y-N_x)=0 \iff (\log \mu)' = (M_y-N_x)/N=f(x) \implies\\ \log \mu = \int f(x)\, dx.\qquad \label{D} \end{multline}

(ii) if $(M_y-N_x)/M=g(y)$ does not depend on $x$ we look at integrating factor $\mu=\mu(y)$ and equation (\ref{C}) becomes \begin{multline} \mu' M + \mu (M_y-N_x)=0 \iff (\log \mu)' =- (M_y-N_x)/M=g(y) \implies\\ \log \mu = -\int g(y)\, dx.\qquad \label{E} \end{multline} After such factor is found, we can integrate an equation \begin{equation} \mu (x,y) M(x,y)\, dx + \mu(x,y) N(x,y)\, dy=0. \label{F} \end{equation}