I can't seem to find the proper integrating factor for this nonlinear first order ODE. I have even tried pulling a bunch of substitution and equation-manipulating tricks, but I can't seem to get a proper integrating factor.

$$\frac{1}{x}dx + \left(1+x^2y^2\right)dy = 0$$

EDIT: Due to MSE users complaining about my lack of proof of work, intent of conceptual understanding, etc, here is exactly why I am stuck.

To start off, this ODE is obviously inexact:

$$\frac{\partial}{\partial y}\left(\frac{1}{x}\right) \neq \frac{\partial}{\partial x}\left(1+x^2y^2\right)$$

And so in order to make this exact (if we choose to go down this route) we must (I'll stick to standard convention/notation) find a function $\mu$ such that if we multiply the entire original ODE by it, we will be able to integrate and solve using 'exact ODE' methods. This is shown as:

$$ \mu \left(\frac{1}{x}\right)dx + \mu \left(1+x^2y^2\right)dy = 0$$

$$ \frac{\partial}{\partial y} \left(\mu\left(\frac{1}{x}\right) \right) = \frac{\partial}{\partial x} \left(\mu \left(1+x^2y^2\right) \right)$$

Now expanding by chain rule, we get:

$$\mu_y \left(\frac{1}{x}\right) = \mu_x \left(1+x^2y^2\right) + \mu \left(2xy^2\right)$$

Now here is where I'm stuck. We want to avoid dealing with a PDE, so we try to stick to good old ODE techniques by assuming that $\mu$ is either a function of only x or only y. Let's first assume that $\mu$ is only a function of y. The following will then be true.

$$ \mu_x = 0$$

$$ \mu_y \left(\frac{1}{x} \right) = \mu \left(2xy^2 \right)$$

$$ \frac{d\mu}{\mu} = 2x^2y^2 dy$$

By looking at the right hand side, we see that it just won't work - x and y are related, so we can't have that integral.

Now let's assume that $\mu$ is only a function of x. The following will then be true.

$$ \mu_y = 0$$

$$ \mu_x \left(1+x^2y^2\right) = -\mu \left(2xy^2\right)$$

$$ \frac{d\mu}{\mu} = \frac{-2xy^2}{1+x^2y^2} dx$$

And, once again, if you look at the right hand side, we have an integral that we can't immediately work out, just as in the previous case.

  • $\begingroup$ Since I've downvoted your question other users started to downvote it too(Perhaps this the culture of MSE) and even silently. I've downvoted your question because of these reasons:meta.math.stackexchange.com/q/13759/103816 I will reconsider my vote once I become sure about the policies of MSE. $\endgroup$
    – user103816
    May 19, 2014 at 4:23
  • 1
    $\begingroup$ '+1', This is all I can say now. $\endgroup$
    – user103816
    May 19, 2014 at 14:39
  • 1
    $\begingroup$ "Integrating factor" is from the thesaurus of misconceptions. The real problem is: Here is an ODE; what could we try to arrive at an explicit solution? $\endgroup$ Nov 7, 2014 at 16:39
  • $\begingroup$ It's a Bernoulli by x.. $\endgroup$
    – Dor
    Apr 1, 2015 at 16:55

3 Answers 3


It looks to me like we can't find an integrating factor which depends only on $x$ or only on $y$ (in general, $\mu$ will be a function of only one variable just in some special cases, so this is not entirely surprising).

For any equation of the form $p(x,y)dx + q(x,y)dy = 0$, in order to be able to find $\mu := \mu(x)$ it must be the case that \begin{equation} \frac{\frac{\partial p}{\partial y} - \frac{\partial q}{\partial x}}{q} \end{equation} is a function of $x$ only. If it is, we can set \begin{equation} \mu(x) = \exp\left(\int\frac{\frac{\partial p}{\partial y} - \frac{\partial q}{\partial x}}{q}dx\right). \end{equation} Here I get \begin{equation} \frac{\frac{\partial p}{\partial y} - \frac{\partial q}{\partial x}}{q} = \frac{-2xy^2}{1 + x^2y^2}, \end{equation} which clearly depends on $y$. Then we can't have a $\mu$ which depends only on $x$. To have a $\mu$ which depends only on $y$, we must have \begin{equation} \frac{\frac{\partial q}{\partial x} - \frac{\partial p}{\partial y}}{p} \end{equation} be only a function of $y$. If that's the case, we can set \begin{equation} \mu(y) = \exp\left(\int \frac{\frac{\partial q}{\partial x} - \frac{\partial p}{\partial y}}{p} dy\right). \end{equation} Here I get \begin{equation} \frac{\frac{\partial q}{\partial x} - \frac{\partial p}{\partial y}}{p} = \frac{2xy^2}{\frac{1}{x}} = 2x^2y^2, \end{equation} which clearly depends on $x$. Then we can't have $\mu$ depend on $y$ only.

As a result, we must have $\mu$ depend on both $x$ and $y$.

  • $\begingroup$ I agree with your response, but then why would this problem be at the end of the chapter that introduces solving inexact equations via an integrating factor? (It's okay if you don't know) $\endgroup$ Nov 8, 2014 at 7:34

The method of undetermined coefficients can be used to obtain a integrating factor. We find $\mu$ in form $$\mu=\frac{1}{\sum_{i,j=0}^2A_{i,j}x^iy^j}$$ We get integrating factor $$\mu=\frac{1}{2x^2y^2+2x^2y+x^2+2}$$ and exact solution $$\ln\left(2y^2+2y+1+\frac{2}{x^2}\right)-2y=C$$


Assume you're looking for a solution $y(x)$, then mathematic gives:

$$ \frac{-1}{x + x^3 y^2} = \frac{ dy}{dx} \implies \frac{\exp (-2 y)}{8 x^2} + \frac{ \exp (-2y) }{16} (2 y^2 +2y +1) = Const $$

  • 3
    $\begingroup$ Jeb, your answer doesn't help at all! I'm interested in how it is done (i.e how does the integrating factor look/come out), not just the plain old solution. $\endgroup$ May 20, 2014 at 23:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .