I want to ask simple questions.
$$ dy/dx + p(x)y=q(x)$$
In courses, I see always $$p(x)y$$ but what if $$ p(x)y^2$$ or $$p(x)y^3$$ or more ?
It doesn't change anything I guess but I want to ask anyway.
I mean what if
$$ dx/dx + y^3=5x$$ will p(x) = 1 again ?
The integrating factor method is applicable only to linear differential equations of the form $$ {dy \over dx} + P(x) y = Q(x) \tag{1} $$
For solving (1), we define the integrating factor $$ \mu = \exp\left( \int P(x) dx \right) $$ and find the general solution of (1) with the formula $$ y \, \mu = \int \mu Q(x) \, dx + C $$ where $C$ is an integration constant.
However, if you consider the ODE as $$ {dy \over dx} + P(x) y^2 = Q(x) \tag{2} $$ or $$ {dy \over dx} + P(x) y^3 = Q(x) \tag{3} $$ then (2) and (3) are nonlinear differential equations due to the presence of $y^2$ or $y^3$ in them. In such cases, you cannot use the integration factor method to solve them.