I'm not finding any resource or description or systemic methodology to find integrating factors when the integrating factor will be a function of both $x$ and $y$.

I'm on this problem,

$$ ( y - xy^2 ) dx + (x + x^2y^2) dy = 0 $$

In its present form its not exact, but multiplying through by an integrating factor $ \frac{1}{x^2y^2} $ does make it exact.

Now I want to know how you find that, when the integrating factor is both a function of $x$ and $y$.

The technique on this page for finding an integrating factor $u(x)$ fails.

Which means there's no function of purely $x$ that will make this equation exact.

So I'm trying something like this:

####1. Multiply the original equation by a function $u(x,y)$:

$$ u(x,y)( y - xy^2 )dx + u(x,y)(x + x^2y^2)dy = 0 $$

####2. Attempt to set $\frac{\partial M(x,y)}{\partial y} = \frac{\partial N(x,y)}{\partial x} $

$$ \frac{\partial}{\partial y} u(x,y)( y - xy^2 ) = \frac{\partial}{\partial x} u(x,y)(x + x^2y^2) $$

(The two sides must be equal for u(x,y) to make the original equation exact, since $ \frac{\partial M(x,y)}{\partial y} = \frac{\partial N(x,y)}{\partial x} $ for an exact equation)

####3. Now you have:

$$ u_y(x,y)(y-xy^2) + u(x,y)(1-2xy) = u_x(x,y)(x+x^2y^2) + u(x,y)(1+2xy^2) $$

I'm kind of stuck now. What is the next step, or is this an incorrect start?

  • $\begingroup$ Usually when trying to solve first order PDEs like the one you have in step 3, one would use the method of characteristics. However, it seems that this doesn't give a tractable problem in your case; your equation has a particular solution $u(x,y)=(xy)^{-2}$ which appears to be much simpler than the general solution. If someone knows a systematic procedure for finding this particular solution, I would be interested in learning about it too. $\endgroup$ May 7, 2011 at 21:56
  • $\begingroup$ @HansLundmark I have added a recent answer to this question. :) $\endgroup$ May 1, 2012 at 1:03
  • $\begingroup$ @Gerry Myerson any reason why the differential geometry tag was not included? I think it's definitely an appropriate tag considering my answer. Cheers $\endgroup$ May 1, 2012 at 1:08
  • $\begingroup$ I removed it because there was no differential geometry in the statement of the question, and because students meeting integrating factors for the first time are unlikely to know anything about 1-forms, integral manifolds, etc., etc. But I take your point, and I'll put the tag back. $\endgroup$ May 1, 2012 at 1:26
  • $\begingroup$ @GerryMyerson Ah, I understand your point as well. Thanks! $\endgroup$ May 1, 2012 at 2:00

4 Answers 4


You're off to a great start, in fact. This is an application of Frobenius' theorem.

I'm going to write what you've done in general for clarity and to potentially serve as a reference since this is an old question I'm answering.

We begin with a nowhere vanishing 1-form $\omega$ on $\mathbb{R}^m$. In the context of Frobenius' theorem, $\omega$ defines an $(m-1)$-dimensional distribution, namely

$$\mathcal{E}^{m-1} = \{v \in TR^m: \omega(v)=0 \},$$

on $\mathbb{R}^m$. The task at hand is to then determine the integral manifold for this distribution. For this case, Frobenius' theorem tells us that our distribution will be integrable if the 3-form $d\omega \wedge \omega$ vanishes.

Now this is actually really nice in the $m=2$ case, since it can be shown that this 3-form vanishes trivially (based on purely algebraic considerations), and there's then a theorem that ensures the local existence of an integrating factor. So this brings us up to speed with why your equation (3) is on the right path. Here's what you've done in general:

Suppose we have the following differential equation in $\mathbb{R}^2$,

$$M(x,y) + N(x,y) y' = 0.$$

Near a point $(x_0,y_0) \in \mathbb{R}^2$ where $M$ and $N$ do not vanish simultaneously, we can define $$\omega = M dx + N dy$$ and let $u(x,y)$ denote its integrating factor. The solution curves to the total differential equation

$$(u \cdot M)(x,y) + (u \cdot N)(x,y) y' = 0,$$

are then given implicitly by the equation $g(x,y) = constant$, where $dg = u \cdot \omega$. We can then attempt to determine $u$ via the equation $d(u \cdot \omega)=0$. We note that $d(u \cdot \omega) = du \wedge \omega + u \cdot d\omega$, and so the vanishing of this form is equivalent to

$$\frac{\partial u}{\partial x} N - \frac{\partial u}{\partial y} M = u \left(\frac{\partial M}{\partial y} - \frac{\partial N}{\partial x}\right).$$

This is your equation (3). :)

To solve this, we'll divide through by $u$ (which is safe to do since our integrating factor must be non-vanishing), and we'll look for a separable solution of our integrating factor. To that end, let

$$G(x) = \dfrac{u_x}{u} \quad \text{and} \quad F(y)=\dfrac{u_y}{u}.$$

Since $\frac{d}{dx}(\log(u)) = G(x)$, and $\frac{d}{dy}(\log(u)) = F(y),$ we see that

$$u(x,y)= e^{\int{G(x) dx}}e^{\int{F(y) dy}}.$$

Let's finish your example now. Using the above definitions, we have using (3)

$$F(y) (y-xy^2) - G(x)(x+x^2 y^2) = 2x y^2 + 2x y. \tag{$*$}$$

This is pretty ugly to solve, and I don't know of a general technique, so here's what I did. Since everything appears as powers, we can try letting $G(x) = b x^{\beta}$, and $F(y) = a y^{\alpha}$. Substitute this into $(*)$, and differentiate with respect to $y$ twice, and with respect to $x$ twice, respectively. We then have four algebraic-ish equations in $a,b,\alpha,\beta$. Solving this system, we discover a non-trivial solution $a=-2$, $b=-2$, $\alpha = -1$, and $\beta = -1$. Thus we have that $G(x) = -2/x$ and $F(y) = -2/y$, so that indeed

$$u(x,y) = \dfrac{1}{x^2 y^2}.$$

Some additional notes:

A ($k$-dimensional) distribution $\mathcal{E}^k = \{E^k(x)\}$ is a collection of $k$-dimensional subspaces of the tangent bundle, $E^k(x) \subset T_xR^m$.

There's a notion for a distribution depending smoothly from point to point that basically requires the existence of smooth vector fields which form a basis for the distribution. So one assumes that we have a smooth subspace, and the question then becomes "When does there exist a $k$-dimensional submanifold (called the integral manifold of the tangent distribution) whose tangent space coincides with the given distribution?"

This is essentially a very important generalization of the fundamental theorem on flows to higher-dimensional submanifolds. Lee is highly recommended for a great introduction to these ideas.

I found Global Analysis by Agricola and Friedrich to be a good reference for Frobenius' theorem and recommend working through the end of chapter problems for some practice if you're interested in this theorem. Frobenius encompasses chapter 4, which you'd be able to jump right into without reading the preceeding chapters if you've taken any sort of intro course in differential geometry. Thanks so much for giving me the opportunity to write this up! :)

  • 5
    $\begingroup$ Also, for equation $(*)$, we could first solve for $G(x)$ to get $$ G(x) = \frac{F(y)(y-x y^2)-2 x y-2 x y^2}{x (1+x y^2)}. $$ Now, this must be a function of $x$ only, so to that end let's try to eliminate the factor $1+x y^2$ from the denominator. So, we'd like a constant $C$ such that $$ F(y)(y-x y^2)-2 x y-2 x y^2 = C(1+x y^2). $$ Choosing $C = -2$ allows for cancellation of the $xy^2$ term and subsequently yields $F(y) = -2/y$. $\endgroup$ Jun 1, 2012 at 18:00
  • $\begingroup$ Very nice approach. And much simpler than what my brain concocted at the time. Thanks for this! $\endgroup$ Jun 2, 2012 at 6:48
  • $\begingroup$ I should have let the constant $C$ be a function of $x$ as well. In general, using this type of "greedy approach", eliminating anything you can piece-by-piece, can be very fruitful. $\endgroup$ Jun 2, 2012 at 6:51

Another solution:

Starting with the original equation (y - xy2)dx + (x + x2y2)dy= 0

Find the partial derivatives, My: (1 - 2xy) and Nx: (1 + 2xy2)

plug them into this formula:

[∂/∂y M(x,y) - ∂/∂x N(x,y)] / [y*N(x,y) - x*M(x,y)]


[(1 - 2xy) - (1 + 2xy2)] / [y*(x + x2y2) - x*(y - xy2)]


==> (-2xy - 2xy2) / [(xy + x2y3) - (xy - x2y2)]

==> (-2xy - 2xy2) / (x2y3 + x2y2)


==> (-2)(xy)(1+y) / (x2y2)(1+y)

Cancel out:

===> -2/xy

From there do the routine u-substitution to find the integrating factor, and you are left with 1/x2y2.

  • $\begingroup$ Are you assuming that the integration factor is a function of the product $xy$ only? $\endgroup$
    – Qmechanic
    Mar 31, 2018 at 19:32

The equation is of the form $M(x,y)dx + N(x,y)dy = 0$. Set $M(x,y) = 0$ to obtain $y_0(x) = \frac{1}{x}$. Set $N(x,y) = 0$ to obtain $x_0(y) = \frac{-1}{y^2}$.

Let $g(y) = \frac{\frac{\partial N}{\partial x} - \frac{\partial M}{\partial y}}{M}$, given $x = x_0(y)$. Similarly, let $f(x) = \frac{\frac{\partial N}{\partial x} - \frac{\partial M}{\partial y}}{-N}$, given $y = y_0(x)$. We obtain $g(y) = \frac{-2}{y}$ and $f(x) = \frac{-2}{x}$

Note that $f(x)$ and $g(y)$ satisfy $$\frac{\partial N}{\partial x} - \frac{\partial M}{\partial y} = M(x,y)g(y) - N(x,y)f(x)$$. Hence an integrating factor, $\mu$, can be found by $e^{\int f(x)dx + \int g(y)dy + c}$. Doing this gives us $\mu = \frac{k}{x^2y^2}$, for arbitrary k.

The method used here can be found at https://www.ijesm.co.in/current_issue.php





Let $x=yu$ ,

Then $\dfrac{dx}{dy}=y\dfrac{du}{dy}+u$

$\therefore y\dfrac{du}{dy}+u=\dfrac{y^4u^2+yu}{y^3u-y}$





You must log in to answer this question.

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