# Solving Nonexact First Order ODEs.

1. May 11, 2010

### Je m'appelle

1. The problem statement, all variables and given/known data

Solve $$(x - \sqrt{xy})dy - ydx = 0$$

Rearranged gives us

$$-y + (x - \sqrt{xy})y' = 0$$

And it looks like an exact differential equation, but is it really?

2. Relevant equations

For any given exact equation of the form

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

The following must be true

$$\frac{\partial}{\partial y}M(x,y) = \frac{\partial}{\partial x}N(x,y)$$

Otherwise it is a nonexact equation, and then an integrating factor is needed, in order to make them exact.

3. The attempt at a solution

Let's check whether it is exact or nonexact,

$$\frac{\partial M}{\partial y} = -1$$

$$\frac{\partial N}{\partial x} = 1 - \frac{y}{2\sqrt{xy}}$$

So, as

$$\frac{\partial}{\partial y}M(x,y) \neq \frac{\partial}{\partial x}N(x,y)$$

This happens to be a nonexact differential equation and therefore an integrating factor is needed, in order to turn it exact.

Now what I want to know, is how do find an integrating factor? Will it be a two variable function or a single variable function?

Last edited: May 11, 2010
2. May 12, 2010

### Staff: Mentor

Try an integrating factor f(x) that is a function of x alone. Proceed as before to see if the equation is now exact, and what the conditions on the first partials have to be for this to be true. You will be solving a new differential equation to find f(x), the integrating factor.

If the differential equation for f(x) turns out to involve both x and y, give up that plan and try something else; namely, try an integration factor f(y) that is a function of y alone, and continue as before.

3. May 12, 2010

### HallsofIvy

Another possibility, since the d.e. involves only powers of x and y, is to try an integrating factor of the form $ax^ny^m$ and see if you can find values of a, m, and n that will make it work. There are no guarentees that any of those will work! While any first order equation has an integrating factor, only linear equations have a formula for finding that integrating factor.

4. May 12, 2010

### Je m'appelle

What if that happens to both of the attempts? That is, what if my integrating factor $$u = u(x),\ or\ u = u(y)$$ happens to be a function of $$(x,y)$$ instead of a single variable alone.

What can be done about it then?

You mean, $$u(x,y) = ax^ny^m$$

Would that really work? What if it doesn't, are there other methods for finding an integrating factor in this case?

5. May 12, 2010

### Je m'appelle

Ok folks, so I tried using two integrating factors $$u = u(x)$$ and $$u = u(y)$$ and in both cases I ended up with something like

$$u(x) = e^{\int f(x,y) dx}$$

$$u(y) = e^{\int f(x,y)dy}$$

That is, in both cases I got a very complex expression in terms of x and y in the right-hand side of the equation for the integrating factor (u), instead of a single variable expression as one would expect.

Therefore, the only way to find an integrating factor $$u = u(x,y)$$ for the original diff. equation on my first post is by solving the following partial differential equation:

$$M(x,y)\frac{\partial u(x,y)}{\partial y} + u(x,y)\frac{\partial M(x,y)}{\partial y} = N(x,y)\frac{\partial u(x,y)}{\partial x} + u(x,y)\frac{\partial N(x,y)}{\partial x}$$

Is that correct?

Last edited: May 13, 2010
6. May 13, 2010

### Staff: Mentor

I don't know.

I tried three different integrating factors: f(x), f(y), and axmyn, and ran up against a brick wall in all three. I'm not so eager to try an arbitrary function f(x, y).

However, there is another approach that I am reasonably sure will work.

Let u = sqrt(y)/sqrt(x) ==> sqrt(y) = u sqrt(x) ==> y = u2x
From this, we have y' = 2u u' x + u2

The original equation can be written as
x(1 - sqrt(y)/sqrt(x)) dy/dx = y (*)

Make the substitutions y = u2x and y' = 2u u' x + u2 in (*) and you get a differential equation that is separable. The tacit assumption here is that x and y aren't independent, but that y is a (differentiable) function of x.