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.