formula for integrating factor that depends only on x (ODE problem) If$\dfrac{\dfrac{\partial M}{\partial y}-\dfrac{\partial N}{\partial x}}{N}=\psi\left( x\right)$ then ODE $Mdx+Ndy=0$ has integrating factor that depends only on x s.t.$\mu Mdx+\mu Ndy=0$ is exact.
How to strictly prove this?
Use equation $\dfrac{\partial \mu M}{\partial y}=\dfrac{\partial \mu N}{\partial x}$
I can only get $-\dfrac{M}{\mu N}\times \dfrac{\partial \mu}{\partial y}+\dfrac{\partial \mu }{\mu\partial x}=\psi\left( x\right)$
then I don't know how to prove that $\mu$ must depend only on x
If $\dfrac{\partial \mu}{\partial y}\neq0$, how to find the contradiction?
 A: Given that $$M~dx+N~dy=0\tag1$$and$$\dfrac 1N\left(\dfrac{\partial M}{\partial y}-\dfrac{\partial N}{\partial x}\right)=\psi\left( x\right)\implies\dfrac{\partial M}{\partial y}-\dfrac{\partial N}{\partial x}=N~\psi\left( x\right)~\tag2$$
Multiplying both side of $(1)$ by $~~\mu(x)=e^{\int \psi(x)~dx}~,~$ we have $$M_1~dx+N_1~dy=0\tag3$$ where $M_1=M~\mu(x)=M~e^{\int \psi(x)~dx}~~\text{and}~~N_1=N~\mu(x)=N~e^{\int \psi(x)~dx}\tag4$
From $(4)$, we have $\dfrac{\partial M_1}{\partial y}=\dfrac{\partial M}{\partial y}~e^{\int \psi(x)~dx}\tag5$ and
\begin{equation}\dfrac{\partial N_1}{\partial x}=\dfrac{\partial N}{\partial x}~e^{\int \psi(x)~dx}+N~e^{\int \psi(x)~dx}~\psi(x)=e^{\int \psi(x)~dx}~\left[\dfrac{\partial N}{\partial x}+N~\psi(x)\right]\\ = e^{\int \psi(x)~dx}~\left[\dfrac{\partial N}{\partial x}+\dfrac{\partial M}{\partial y}-\dfrac{\partial N}{\partial x}\right]~~~~~[\text{by }(2)]~~\qquad\qquad\qquad\\ = \dfrac{\partial M}{\partial y}~e^{\int \psi(x)~dx}=\dfrac{\partial M_1}{\partial y}\qquad[\text{by }(5)]~~~\qquad\quad\qquad\qquad\qquad\end{equation}
which implies that $~M_1~dx+N_1~dy=0~$ must be exact and hence $~\mu(x)=e^{\int \psi(x)~dx}~$ is its integrating factor.
