# Integrating factors for inexact and linear equations

I am coursing differential equations and recently encountered with the concept of integrating factors. I have seen them to solve two types of ODEs: inexact and linear. A linear equation is an ODE in the form: $$\frac{dy}{dx}+p(x)y = q(y)$$ the integrating factor ends up being: $$u(x) = e^{\int p(x)dx}$$ so that the equation comes to: $$\frac{d}{dx}(uy) = q(x)u(x)$$ the equation can now be solved if $$\int q(x)u(x)dx$$ can be computed.

An inexact equation is an equation in the form $$A(x,y)dx+B(x,y)dy=0$$, where $$A_y \ne B_x$$ (i.e. $$Adx+Bdy$$ is not an exact differential)

The integrating factor for these equations (I will call it $$\mu$$ for inexact equations) is a function such that $$(\mu A)_y = (\mu B)_x$$ Expanding, $$\mu A_y + \mu_y A = \mu B_x + \mu_x A$$ I have read the Wikipedia article, which says that to solve this equation where $$\mu = \mu (x,y)$$ requires partial differential equations, but if $$\mu = \mu(x)$$ or $$\mu = \mu(y)$$, then there is a straightforward formula for both, in terms of $$A$$ and $$B$$ (and their partial derivatives, respectively). But here is the important part: it says

"[...] in which case we only need to find $$\mu$$ with a first-order linear differential equation or a separable differential equation [...]"

Does this mean that this method can only be used for linear ODEs? In that case, I think the first method is way faster.

Article mentioned

No, it is referring to how to find $$\mu$$, not the form of the original D.E.
Consider the equation you quote:-$$\mu A_y + \mu_y A = \mu B_x + \mu_x A$$
If $$\mu = \mu(x)$$ then this equation becomes $$\mu A_y = \mu B_x + \mu_x A$$ $$\mu (A_y - B_x) = \mu_x A$$ This is the 'straightforward equation' referred to in the article.