# Integrating Factor in two different settings

I'm getting ready for my differential equations course, and I read that if you have an equation of the form

$$y' + p(x)y=f(x)$$

then this can be solved by multiplying the entire equation by an integrating factor $u(x)=e^{\int p(s)ds}$ so that it becomes

$$(uy)'=u(x)f(x)$$

then $y(x) = \frac{1}{u(x)} \int u(x)f(x) dx$.

On the other hand, if you have an equation of the form

$$M(x,y)dx+N(x,y)dy = 0$$ then first you check if the equation is exact (check if $M_y=N_x$). If the equation is not exact then you multiply $M$ and $N$ by an integrating factor $u(x,y)$ and force $[u(x,y)M(x,y)]_y=[u(x,y)N(x,y)]_x$. Then you go on to solve it.

My question is, are these two equations really the same? When we use an integrating factor in the first case it is already assumed to be of a certain form..... is it just a special case of the equation of the second type?

I suppose they could be equivalent because we could rewrite $y'+p(x)y=f(x)$ as $M(x)dx + Ndy=0$ where $M(x,y)=M(x)=[p(x)y(x)-f(x)]$ and $N(x,y)=1$ but then $M_y=0=N_x$ however we still need to manipulate the first equation by an integrating factor.

• Check again, with $M(x,y)=p(x)y-f(x)$ you get $M_y=p$. Aug 20, 2016 at 16:25
• DOH! I can't believe I missed this... and I am glad to see there is actually a connection. Aug 20, 2016 at 16:30

In your last test for exactness, $M_y = p(x)$ not zero. Then to test whether there exists an integrating factor of the form $u(x)$, we look at $(M_y-N_x)/N =p(x)$, and since this is a function of $x$ alone, we solve $u^{\prime} = p(x) u$ to the the integrating factor. And, this is exactly (pun intended) the same equation we solve to get the integrating factor if we treat it as a linear equation. So the answer to your question is "yes", they are the same.
• Thanks! This makes sense. I see that if $\xi(x)=\frac{M_y-N_x}{N}$ is a function of only $x$ then the I.F. is $\mu(x) = \exp[\int \xi(x) dx]$ and if $\psi(y)=\frac{M_y-N_x}{-M}$ is a function of only $y$ then the I.F. is $\mu(y) = \exp[\int \psi(y) dy]$. Where is a good source for a proof of this? Also what can you say if neither of these fractions are a function of only one variable? No solution? What then? Aug 20, 2016 at 18:34