562 CHAPTER 29. FIRST ORDER SCALAR ODE

29.7 The Case Where M,N Are Affine LinearSomething which often occurs is an equation of the form

(px+qy+ r)dx+(αx+βy+ γ)dy = 0

It doesn’t quite fit anything in the earlier discussion. It won’t be exact, homogeneous, orseparable or linear. However, one can massage it to get something which is homogeneous.This is illustrated in some examples.

Example 29.7.1 Find the integral curves for

(x+2y+3)dx+(2x− y+1)dy = 0

Of course the problem is those constants 3,1 so it is reasonable to change variables. Letu = x− a,v = y− b where we choose a,b in an auspicious manner to get the constants todisappear. First, dx = du,dy = dv. Then in terms of the new variables,

(u+a+2(v+b)+3)dx+(2(u+a)− (v+b)+1)dy = 0(u+2v+(a+2b+3))dx+(2u− v+(2a−b+1))dy = 0

and we wanta+2b+3 = 02a−b+1 = 0

Hence we should let a =−1 and b =−1. Then with this, the equations reduce to

(u+2v)du+(2u− v)dv = 0

This is now a homogeneous equation, or we could use the integrating factor describedearlier, but, in this case, it is also an exact equation. A scalar potential is

u2

2+2uv− v2

2,

and so the integral curves for the original equation would be

12(x+1)2 +2(x+1)(y+1)− 1

2(y+1)2 =C

The example illustrates what to do in general. You just change the variables to removethose constant terms and then obtain a homogeneous equation which can be solved by avariety of methods.

Example 29.7.2 Find the integral curves for

(x+ y+2)dx+(2x− y+4)dy = 0

As before, let u = x−a,v = y−b and write in terms of these new variables. Thus

(u+ v+(a+b+2))du+(2u− v+(2a−b+4))dv = 0