Example 27 Solve the differential equation
(x dy – y dx) y sin 
y
x
⎛
⎞
⎜
⎟
⎝
⎠  = (y dx + x dy) x cos 
y
x
⎛
⎞
⎜
⎟
⎝
⎠ Solution The given differential equation can be written as
2
2
sin
cos
cos
sin
y
y
y
y
x y
x
dy
xy
y
dx
x
x
x
x
⎡
⎤
⎡
⎤
⎛
⎞
⎛
⎞
⎛
⎞
⎛
⎞
−
=
+
⎜
⎟
⎜
⎟
⎜
⎟
⎜
⎟
⎢
⎥
⎢
⎥
⎝
⎠
⎝
⎠
⎝
⎠
⎝
⎠
⎣
⎦
⎣
⎦
or
dy
dx  =
2
2
cos
sin
sin
cos
y
y
xy
y
x
x
y
y
xy
x
x
x
⎛
⎞
⎛
⎞
+
⎜
⎟
⎜
⎟
⎝
⎠
⎝
⎠
⎛
⎞
⎛
⎞
−
⎜
⎟
⎜
⎟
⎝
⎠
⎝
⎠
Dividing numerator and denominator on RHS by x2, we get
dy
dx  =
2
2
cos
sin
sin
cos
y
y
y
y
x
x
x
x
y
y
y
x
x
x
⎛
⎞
⎛
⎞
⎛
⎞
+
⎜
⎟
⎜
⎟
⎜
⎟
⎝
⎠
⎝
⎠
⎝
⎠
⎛
⎞
⎛
⎞
−
⎜
⎟
⎜
⎟
⎝
⎠
⎝
⎠ (1)
Clearly, equation (1) is a homogeneous differential equation of the form dy
y
g
dx
⎛x
⎞
=
⎜
⎟
⎝
⎠ To solve it, we make the substitution
y = vx