Recognizing Types of First Order Differential Equations E. L. Lady

Every first order differential equation to be considered here can be written can be written in the form

P (x, y) + Q(x, y)y′ = 0.

This means that we are excluding any equations that contain (y′)^{2} , 1/y′, e^{y′}, etc. Such equations would be quite esoteric, and, as far as I know, almost never come up in applications.

It’s important to realize that although there are existence and uniqueness theorems which usually guarantee that a differential equation has a solution, in practice the solutions can seldom be written in “closed form.” (I.e. there is no actual formula for the solution.) Thus the equations that are dealt with here are actually the exceptional ones.

There are five kinds of first order differential equations to be considered here. (I am leaving out a sixth type, the very simplest, namely the equation that can be written in the form y′ = f(x). This can be solved simply by integrating. It can also be seen as a special case of the separable category.)

(1) Linear.

(2) Homogeneous.

(3) Exact.

(4) Separable.

(5) Integrating Factor.

What follows should enable students to recognize the simplest examples of these five types (which are representative of the problems I put on tests, and are also fairly representative of what actually comes up in practice).

I’ve listed them here in the order I find most convenient. In other words, I find it easiest to recognize a linear equation, and after that a homogeneous one. I find separable ones often fairly hard to recognize. An integrating factor is something I would try only when an equation doesn’t fit any of the other patterns, because the integrating factor technique involves more work than the others.

Linear Equations. The important thing to understand here is that the word “linear” refers only to the dependent variable (i. e. y in the examples here). There can be any sort of complicated functions of x in the equation, but to be linear there must not be a y^{2} , or 1/y, or yy′, much less e^{y} or sin y. Thus a linear equation can always be written in the form

(  )y′ + (  )y + (  ) = 0,

where the parentheses contain only functions of x (which can be arbitrarily complicated).

I check to see if an equation is linear first, not only because it’s easy to recognize but because there’s a standard formula for for the solution to a linear equation.

Homogeneous Equations. For practical purposes, these always look like polynomials where, if one ignores y′, all of the terms have the same degree. An example would be

x^{3}y′ + 8x^{2}yy′ + 4xy^{2} − y^{3} = 0,

where all the terms have degree 3 if one ignores y′. (One might also see this equation written in the form

y′ = \frac{−4xy^{2} + y^{3}}{x^{3} + 8x^{2}y} ,

the tip-off in this case being that all the terms both in the numerator and denominator have degree 3. In principle, there do exist homogeneous differential equations that don’t fit this pattern, but they are uncommon.)

To solve a homogeneous equation, one substitutes y = vx (ignoring, for the moment, y′). If the equation is homogeneous, the same power of x will be a factor of every term in the equation. Dividing through by this power of x, an equation involving only v and y′ results. (Any time this happens, the equation in question is homogeneous.)

For instance, from

x^{3}y′ + 8x^{2}yy′ + 4xy^{2} − y^{3} = 0,

we get

x^{3}y′ + 8x^{3}v + 4x^{3}v^{2} − x^{3}v^{3} = 0,

which becomes, after canceling x^{3} ,

y′ + 8v + 4v^{2} − v^{3} = 0 .

One should then substitute y′ = xv′ + v to get an obviously separable equation. For instance the example above yields

xv′ + v + 8v + 4v^{2} − v^{3} = 0 .

A short cut through this process is to substitute v for y, 1 for x, and xv′ + v for y′. The equation can then be written in the form xN(v)v′ + D(v) = 0, where N(v) and D(v) are polynomials in v. This then gives

\frac{N(v)v′}{−D(v)} = \frac{1}{x} ,

which can be solved by integrating both sides.

For instance from

x^{3}y′ + x^{2}yy′ + 4xy^{2} − y^{3} = 0,

we get

xv′ + v + v(xv′ + v) + 4v^{2} − v^{3} = 0

and thus

x(1 + v)v′ + v + 5v^{2} − v^{3} = 0 ,

which yields

\frac{(1 + v)v′}{v^{3} − 5v^{2} − v} = \frac{1}{x}.

As in this example, integrating the left-hand side typically requires partial fractions.

Exact Equations. After you’ve done a few examples, most exact equations are often fairly easy to spot. If you write the equation in the form P + Qy′ = 0, then in an exact equation you will usually notice that P and Q will have pairs of terms where the term in P will have the form \frac{df}{dx}g(y) and the term in Q has the form f(x)\frac{dg}{dy} y′ (where f and g are the same function in both terms). In other words, you look for pairs of terms like the following examples:

6e^{6x} tan 5y + 5e^{6x}y′ sec^{2} y  \{ \begin{matrix}f(x) = e^{6x}, f′(x) = 6e^{6x} \\ g(y) = tan 5y, g′(y) = 5y′ sec^{2} 5y \end{matrix}

4x^{3} ln y + \frac{x^{4}y′}{y}  \{ \begin{matrix}f(x) = x^{4}, f′(x) = 4x^{3} \\ g(y) = ln y, g′(y) = \frac{y′}{y} \end{matrix}

\frac{−2 sin 8y}{x^{3}} + \frac{8y′ cos 8y}{x^{2}}  \{ \begin{matrix}f(x) = 1/x^{2}, f′(x) = \frac{−2}{x^{3}} \\ g(y) = sin 8y, g′(y) = 8y′ cos 8y . \end{matrix}

What can obscure the pattern is terms of the form h(x) or k(y)y′

In checking to see whether an equation is exact, any terms involving only x can be ignored, and likewise any terms which have a factor of y′ and don’t involve x can be ignored.

For instance, in looking at the equation

\frac{1}{4 + x^{2}} + 6e^{6x} tan 5y − 3x^{5} + 5e^{6x}y′ sec^{2} 5y + y′e^{2y} = 0,

one is likely to think at first that it’s not exact because of the terms 1/(4 + x^{2}), −3x^{5} , and y′e^{2y}. But these are all irrelevant, because each of these terms involves only one variable and thus can be integrated separately. The only important part of the equation is

6e^{6x} tan 5y + 5e^{6x}y′ sec^{2} 5y ,

and one quickly sees that this is simply (e^{6x} tan 5y)′, so that the solution to the whole differential equation is

\frac{1}{2} tan^{−1}(x/2) + e^{6x} tan 5y − \frac{1}{2}x^{6} + \frac{1}{2} e^{2y} = C .

There do exist other patterns for exact equations, but they are less common. For instance

\frac{2x}{\sqrt{x^{2} + y^{3}}} + \frac{3y^{2}y′}{\sqrt{x^{2} + y^{3}}}

does not have form f′(x)g(y) + f(x)g′(y) y′ but can be recognized as 2(\sqrt{x^{2} + y^{3}} )′.

A more difficult (but important) example is

\frac{−y}{x^{2} + y^{2}} + \frac{xy′}{x^{2} + y^{2}} ,

which is the derivative of tan^{−1}(y/x).

In some of these cases, you can probably see that the equation P + Qy′ = 0 is exact only

by checking whether \frac{∂Q}{∂x} = \frac{∂P}{∂y} .

Separable Equations. If we write a differential equation in the form P + Qy′ = 0, then the condition for it to be separable is that both P and Q can be written as the product of a function involving only x and one involving only y: P = f(x)g(y), Q = h(x)k(y). An example of a separable equation is

yy′ + 4xyy′ − y^{2} − 1 = 0.

Only when you write it in the form P + Qy′, namely

−(y^{2} + 1) + (y + 4xy)y′ ,

does it become apparent that it is separable and can be written as

\frac{1}{1 + 4x} = \frac{yy′}{1 + y^{2}} .

The two sides can then be integrated to get

\frac{1}{4} ln(1 + 4x) = \frac{1}{2} ln(1 + y^{2}) + C .

Another example is

e^{2x}y^{2} + yy′e^{3y−x} + 5xy^{2} − y^{3}y′e^{−x} = 0.

Written in the form P + Qy′ = 0, this becomes

(e^{2x} + 5x)y^{2} + e^{−x}(ye^{3y} − y^{3})y′ = 0.

What Happens to the Absolute Value Sign?. The easiest example of a separable equation, and one of the most important ones, is

y′ = yg(x) .

Solving this yields

\frac{y′}{y} = g(x) ,

ln |y| = ∫ g(x) dx + C ,
|y| = e^{G(x)+C} = e^{C} e^{G(x)} ,

where G(x) is an anti-derivative for g(x). At this point, almost all books just “forget” the absolute value sign. Isn’t this a mistake?

Actually, it’s okay. The point is that for the differentiable equation to make sense, y has to be a differentiable function of x, and therefore is continuous. But we see that y can never be 0, since e^{G(x)+C} is always strictly positive. Therefore y is either always positive or always negative. Thus the solution can be written in the form

y = ±e^{C} e^{G(x)} = ce^{G(x)} ,

where c = e^{C} or c = −e^{C}. Note also that c = y(0).

Integrating Factors. This is the method of last resort, to be used when a differential equation doesn’t fit any of the other patterns. The standard method for finding an integrating factor does often work, but it’s quite a bit of work and also hard to remember.

What I notice on tests is that students are not much good at recognizing the first four patterns, so they do a lot of work to find an integrating factor for equations which could be solved more quickly by one of the other methods.

One suspects one may need an integrating factor when a differential equation looks at first as if it ought to be exact, but the details don’t quite fit. For instance, the expression

2xy^{5} + 4x^{2}y^{4}y′

looks like it ought to be the derivative of something like x^{2}y^{5} , but the coefficients don’t quite work, since (x^{2}y^{5})′ = 2xy^{5} + 5x^{2}y^{4}y′. Things would be okay if the power of y were one lower. Therefore to solve

2xy^{5} + 4x^{2}y^{4}y′ = 0 ,

one first multiplies the equation by y^{−1} to get

2xy^{4} + 4x^{2}y^{3}y′ = 0 ,

which is exact.

A very similar example is

3x^{2} sin 6y + x^{3}y′ cos 6y = 0 .

We want the left-hand side to be the derivative of x^{3} sin 6y, but (x^{3} sin 6y)′ = 3x^{2} sin 6y + 6x^{3}y′ cos 6y. We ought to be able to make things work out by changing the power of x. In fact, if the equation were

18x^{17} sin 6x + 6x^{18}y′ cos 6x = 0

then it would be exact, with a solution

x^{18} sin 6x = C .

But we can obtain this from the original equation by multiplying through by 6x^{15} .

For a variation on this, consider the equation

y^{2}e^{3x} − 2yy′e^{3x} = 0 .

We need to account for the minus sign, and the way to do this would be to involve a negative power of y. First, multiply y^{2}e^{3x} − 2yy′e^{3x} = 0 by 3 to make the desired pattern more apparent:

3y^{2}e^{3x} − 6yy′e^{3x} = 0 .

We need to produce a factor of −6 in the second term, so that means we need y^{−6} instead of y^{2} in the first term. Thus we should multiply by the equation y^{−8} to get

3y^{−6}e^{3x} − 6y^{−7}y′e^{3x} = 0 ,

which is exact with solution y^{−6}e^{3x} = C or, equivalently y^{6} = C′e^{3x} (with, obviously, C′ = 1/C). However this is actually a stupid way to deal with this equation. We could instead have multiplied y^{2}e^{3x} − 2yy′e^{3x} = 0 by y^{−1}e^{−3x} to get

y − 2y′ = 0 ,

which is not exact but is a well known separable equation (i. e. y′ = \frac{1}{2}y) and has the solution y = Ce^{x/2} , which is equivalent to the solution obtained by the more laborious method.

In my opinion, it is better to absorb the integrating factor pattern by looking at numerous examples before trying to learn a formula. Consider the equation

y′ sec^{2} 5y + tan 5y = 0 .

It’s intriguing that x does not appear at all in the equation. Nonetheless, it is very close to being exact, except that there’s a missing factor of 5 in the first term. To produce the missing 5, multiply by 5e^{5x}. This yields

5e^{5x}y′ sec^{2} 5y + 5e^{5x} tan 5y = 0 ,

an exact equation with solution

e^{5x} tan 5y = 0 ,

or, equivalently,

y = \frac{1}{5} tan^{−1}(Ce^{−5x}) .

The pattern of these examples is a simple special case of the integrating factor method, but it’s so common that I think it’s worth learning. We have seen that the most common pattern for an exact equation P (x, y) + Q(x, y)y′ = 0 is that P and Q are both products of a function in x alone and a function in y alone and that furthermore

P + Qy′ = ( )g(y) + f(x)( )y′ = 0

where the first parenthesis contains f′(x) and the second contains g′(y). In the equations we have been looking at, this is the pattern except for constant factors which are not quite right. If either f(x) or g(y) are a power of the variable (or constant) then it is easy to compensate for the bad constant factor by using an integrating factor of the form x^{a} or y^{a} or e^{ax} or e^{ay}. What makes this work is the standard algebraic rule that when multiplying powers of the same base, the exponents add.

The linear equation

y′ + \frac{ay}{x} = q(x)

is more or less a special case of this. For instance, for the equation

y′ − \frac{7y}{x} = e^{2x}

we can multiply through by x^{−7x} to get the exact equation

x^{−7x}y′ − 7x^{−8x}y − x^{−7x}e^{2x} = 0 .

Of course one can also use the standard method for linear equations here, which is only slightly more work.

Now consider the equation

x^{3} tan^{−1} \frac{y}{\sqrt{8}} + \frac{y′}{y^{2} + 8} = 0 .

Since \frac{d}{dx}(tan^{−1} \frac{y}{\sqrt{8}}) = \frac{\sqrt{8} y′}{y^{2} + 8} , this looks vaguely exact. But not only is there a missing constant factor of \sqrt{8} in the second term, but there is also a missing x^{4}/4. (Or, looking at it from the opposite point of view, there is a factor of x^{3} in the first term that cannot be accounted for.) We can remedy this by multiplying through by \sqrt{8} e^{\sqrt{8} x^{4}/4} , producing the equation

\sqrt{8} x^{3}e^{\sqrt{8} x^{4}/4} tan^{−1} \frac{y}{\sqrt{8}} + \frac{\sqrt{8} e^{\sqrt{8} x^{4}/4}y′}{y^{2} + 8} = 0 ,

an exact equation with solution

e^{\sqrt{8} x^{4}/4} tan^{−1} \frac{y}{\sqrt{8}} = C .

In fact, if an equation has the form

h′(x)P (y) + y′ \frac{∂P}{∂y} = 0 ,

where P is a function of y alone then we can make the given equation exact by multiplying through by e^{h(x)} , yielding

h′(x)e^{h(x)}P (y) + e^{h(x)}y′ \frac{∂P}{∂y} = 0

with solution

e^{h(x)}P (y) = const .

(In applying this, note that by the Fundamental Theorem of Calculus, in principle any function of x has the form h′(x) for some function h(x). In practice, however, it may sometimes be difficult to find h(x).)

In the same way, if Q is a function of x alone then we can multiply an equation of the form

\frac{∂Q}{∂x} + Q(x)h′(y)y′

with e^{h(y)} to get an exact equation

e^{h(y)} \frac{∂Q}{∂x} + h′(y)y′e^{h(y)}Q(x)

with solution

e^{h(y)}Q(x) = const .

In principle, an integrating factor can be a function of both x and y. However in practice, the integrating factors which one has some hope of actually finding will be functions of only x or only y.

Generalizing the examples above, we consider an equation

P (x, y) + Q(x, y)y′

which is not exact because \frac{∂P}{∂y} − \frac{∂Q}{∂x} ≠ 0, but where for some function h(x) of x alone,

h′(x)Q = \frac{∂P}{∂y} − \frac{∂Q}{∂x} .

Then multiplying by μ(x) = e^{h(x)} yields the equation

P e^{h(x)} + Qe^{h(x)}y′ = 0

which is exact because

\frac{∂}{∂x}[Qe^{h(x)}] = \frac{∂Q}{∂x}e^{h(x)} + h′(x)Qe^{h(x)} = \frac{∂Q}{∂x}e^{h(x)} + (\frac{∂P}{∂y} − \frac{∂Q}{∂x})e^{h(x)} = \frac{∂}{∂y} (P e^{h(x)}) .

Of course there will exist a function h(x) such that h′(x) Q = \frac{∂P}{∂y} − \frac{∂Q}{∂x} precisely when

\frac{\frac{∂P}{∂y} − \frac{∂Q}{∂x}}{Q} is a function of x alone. In summary:

If (\frac{∂P}{∂y} − \frac{∂Q}{∂x}) /Q is a function of x alone, then

μ = e^{h(x)} , where h(x) = ∫ \frac{\frac{∂P}{∂y} − \frac{∂Q}{∂x}}{Q} dx ,

will be an integrating factor for the equation

P + Qy′ = 0 .

Analogously, one can show the following:

If (\frac{∂Q}{∂x} − \frac{∂P}{∂y} ) /P is a function of y alone, then

μ = e^{h(y)} , where h(y) = ∫ \frac{\frac{∂Q}{∂x} − \frac{∂P}{∂y}}{P} dy ,

will be an integrating factor for the equation

P + Qy′ = 0 .

In practice, these formulas are not as cumbersome to use as they seem. However it is still worthwhile to learn to notice really obvious integrating factors before resorting to these formulas.