Math151 Module 2
Math151 Module 2
Module 2
Lesson: Separation of Variables and Homogeneous Equations
Learning Objectives: At the end of the lesson, the students should be able to
5. Obtain a particular solution to the differential equation with variables separable with an initial value.
9. Obtain a particular solution to the homogeneous differential equations with initial value.
dy
= f (x, y)
dx
in which f (x, y) is a function of two variables defined on a region in the xy-plane. The equation is of
first order because it involves only the first derivative dy, dx(and not higher-order derivatives). Observe
that the equations
0 d
y = f (x, y)and y = f (x, y)
dx
are equivalent to equation above.
0
A first-order initial value problem is a differential equation y = f (x, y) whose solution must satisfy
the initial condition y(x0 ) = y0 . An example below shows the how the initial value problem satisfies a
differential equation.
1
Example: Show that the function
1
y = (x + 1 − ex
3
is a solution to the first-order initial value problem
dy 2
= y − x , y(0) = .
dx 3
2 Separation of Variables
dy
Given the first-order differential equations F ( dx , y, x) = 0, we solve a differential equation of the form
M dx + N dy = 0
where M and N may be function of both x and y. In this equation, the variables x and y are separated.
It has a solution Z Z Z Z Z
f (x)dx + g(y)dy = 0 =⇒ f (x)dx + g(y)dy = C
=⇒ y = eC x2
2
(b) Solve the equation
0
(1 − x)y = y 2 .
Solution: We have
dy dy dx
= y 2 =⇒ 2 =
dx y 1−x
Z Z
dy dx
=⇒ =
y2 1−x
1
=⇒ − = −ln|(1 − x)| + C
y
1
=⇒ − = −ln|C(1 − x)|
y
=⇒ 1 = y ln|C(1 − x)|
1
=⇒ y =
ln|C(1 − x)|
Solution: Multiplying both sides of the equation by cos x and sin y ,we have
sin x cos y
sin x(sin y)dx + (cos y)dy = 0 =⇒ dx + dy = 0
cos x sin y
Z Z Z
sin x cos y
=⇒ dx + dy = 0
cos x sin y
=⇒ −ln| cos x| = −ln| sin y| + C
=⇒ sin y = C cos x
x (y + 1)
xy 3 dx + (y + 1)e−x dy y 3 e−x = (0) y 3 e− x =⇒
dx + dy = 0
e−x y3
Z Z
x (y + 1)
=⇒ dx + dy = C
e−x y3
Z Z
=⇒ xex dx + (y −2 + y −3 )dy = C
u=x and dv = ex dx
Z
du = dx v = ex dx = ex + C1
3
Thus,
Z Z
1 1
x
xe dx + (y −2 + y −3 )dy = C =⇒ xex − ex + C1 − − 2 + C2 = C
y 2y
1 1
=⇒ ex (x − 1) − 1− = k , k = C − C1 − C2
y 2y
1 1
=⇒ xex − ex − + 2 = k
y 2y
=⇒ 2xy 2 ex − 2y 2 ex − 2y + 1 = 2ky 2 .
dy 4x + xy 2
=
dx y − x2 y
dy 4x + xy 2
= =⇒ (y − x2 y)dy = (4x + xy 2 )dx
dx y − x2 y
=⇒ (y − x2 y)dy − (4x + xy 2 )dx = 0
Let
du
u = 4 + y2 =⇒ du = 2ydy, = ydy
2
dv
v = 1 − x2 =⇒ dv = −2xdx, − = xdx
2
Thus
y x du/2 −dv/2
2
dy − dx = 0 =⇒ − 2=0
4+y 1 − x2 u v
du dv
=⇒ + =0
Zu vZ
du dv
=⇒ + =C
u v
=⇒ ln|u| + ln|v| = C
=⇒ ln|4 + y 2 | + ln|1 − x2 | = C
=⇒ ln|(4 + y 2 )(1 − x2 )| = C
=⇒ (4 + y 2 )(1 − x2 ) = eC
=⇒ (4 + y 2 )(1 − x2 ) = k, k = eC
The next examples involve an initial values to find the particular solution to the given first-order
differential equation
4
Solution: Separating the variables we have
1
2x(y + 1)dx − ydy = 0 =⇒ 2xdx = 1 − dy, y 6= −1
y+1
Z Z
1
=⇒ 2xdx = 1− dy
y+1
=⇒ x2 = y − ln|y + 1| + C
0 = −2 − ln1 + C =⇒ C = 2.
Thus, the particular solution to the given differential equation is given by x2 = y − ln|y + 1| + 2.
Solution: We have
dy dy
= 2y + y 2 =⇒ − dx = 0
dx 2y + y 2
Z Z
dy
=⇒ − dx = C
2y + y 2
Z
dy
=⇒ −x=C
y(y + 2)
R dy
We use partial fraction to solve y(y+2) . Thus,
1 A B
= +
y(y + 2) y y+2
1 = A(y + 2) + By
5
Exercises: In problems 1 to 7, obtain the general solution to each of the following differential equation.
1. 2ydx = 3xdy
0 3x2 + 4x − 4
2. y =
2y − 4
3. x cos2 ydx + tan ydy = 0
x2 + 1
4. xey dy + dx = 0
y
5. x2 dx + y(x − 1)dy = 0
0
6. x2 yy = ey
0
7. y = cos2 x cos y
In problems 8-10, find the particular solution satisfying the initial condition
x2 − 3xy + 4y 2
x3 + y 3
x4 y + 7y 5
are called homogeneous polynomials. We wish now to extend the concept of homogeneity so it will apply
to functions other than polynomials. In this section, we will discuss homogeneous equations and solve
homogeneous differential equations. We begin by defining a homogeneous equation.
Definition: The function f (x, y) is said to be homogeneous of degree n in x and y if and only if
f (x, y) = rn f (x, y)
Examples: Determine whether or not the given functions is homogeneous. State the degree of the
function if it is homogeneous.
6
(a) The function f (x, y) = 3x3 − 2xy 2 − 4y 3 is homogeneous of degree 3 since
= r3 (3x3 − 2xy 2 − 4y 3 )
= r3 f (x, y)
2x
(b) The function f (x, y) = √ is homogeneous of degree 0 since
x2 −y 2
2rx
f (rx, ry) = p
(rx)2 − (ry)2
2rx
=p
r2 (x2 − y 2 )
2rx
= p
r x2 − y 2
2x
=p
x − y2
2
2x
= r0 p
x − y2
2
= r0 f (x, y)
= r3 x3 − r2 xy + r3 y 3
= r2 (rx3 − xy + ry 3 )
6= r3 f (x, y)
Note that if the term has one or more variables, the degree of the term is the sum of the power of the
variables. Thus, if each term in a given equation has equal powers, then the function is homogeneous.
Theorem 2.1 : If M (x, y) and N (x, y) are both homogeneous and of the same degree, the function(ratio)
M (x, y)/N (x, y) is homogeneous of degree zero.
Example: Given
M (x, y) r2 (x2 − xy + y 2 ) x2 − xy + y 2 2
0 x − xy + y
2
= = = r
N (x, y) r2 xy xy xy
7
Theorem 2.2: If f (x, y) is homogeneous of degree 0 in x and y, then f (x, y) is a function of y/x alone.
are both homogeneous functions and are of the same degree in x and y. By Theorems 2.1 and 2.2, the
ratio M/N is a function of y/x alone.
dy y
+g =0 (∗∗)
dx x
This suggests the introduction of a new variable v by putting y = vx. Then (**) becomes
dv
x + v + g(v) = 0 (∗ ∗ ∗)
dx
Definition: The first-ordered differential equation M (x, y)dx + N (x, y)dy = 0 is said to homogeneous
of degree n if
M (rx, ry) = rn M (x, y) and N (rx, ry) = rn N (x, y)
To obtain the solution of homogeneous differential equation, one can follow the following steps.
y = vx =⇒ dy = vdx + xdv
x = uy =⇒ dx = udy + ydu
Suggestion: Use
y = vx if N is simpler than M
x = uy if M is simpler than N
8
Example (1) Solve the equation
3(3x2 + y 2 )dx − 2xydy = 0.
y
Solution: Observe that N is simpler than M and so we use y = vx, v = x and dy = vdx + xdv. Then
=⇒ ln |x| − ln |9 + v 2 | = C
y2
=⇒ ln |x| − ln |9 + |=C
x2
x
=⇒ ln 9x2 +y 2
=C
x2
3
x
=⇒ ln =C
9x2 + y 2
x3
=⇒ = eC
9x2 + y 2
x3
=⇒ = C 1 , C1 = e C
9x + y 2
2
9
y
Solution: N is simpler than M so we use y = vx, v = x and dy = vdx + xdv. Thus
y y vx vx
x + y sin dx − x sin dy = 0 =⇒ x + vx sin dx − x sin (vdx + xdv) = 0
x x x x
=⇒ (x + vx sin(v))dx − x sin(v)(vdx + xdv) = 0
=⇒ xdx − x2 sin(v)dv = 0
dx 1
=⇒ − sin(v)dv = 0, multiply both sides by 2
Zx Z Z x
dx
=⇒ − sin(v)dv = 0
x
=⇒ ln |x| + cos(v) = C
y
=⇒ ln x + cos =C
x
x
Solution: M is simpler than N so we use x = uy, u = y and dx = udy + ydu. Thus
=⇒ y 2 dy − u2 y 2 eu dy + (u2 y 2 dy + uy 3 du)eu = 0
=⇒ y 2 dy − u2 y 2 eu dy + u2 y 2 eu dy + uy 3 eu du = 0
=⇒ y 2 (1 − u2 eu + u2 eu )dy + uy 3 eu du = 0
=⇒ y 2 dy − +uy 3 eu du = 0
dy
=⇒ + ueu du = 0
y
Z Z Z
dy
=⇒ + ueu du = 0
y
m=u =⇒ dm = du
Z
dn = eu du =⇒ n = eu .
Thus Z Z
ueu du = ueu − eu du = ueu − eu = eu (u − 1)
Hence,
10
Exercises: In problems 1 to 10, obtain the general solution to each of the following differential equation.
In problems 11 -15, find the particular solution satisfying the initial condition.
11