Example 22 Find the particular solution of the differential equation
cot 
dy+
y
x
dx
 = 2x + x2 cot x (x ≠ 0)
given that y = 0 when 
2
x
=π Solution The given equation is a linear differential equation of the type 
P
Q
dy
dx +y
=
,
where P = cot x and Q = 2x + x2 cot x Therefore
I F = 
cot
log sin
sin
x dx
x
e
e
x
 
 
 
Hence, the solution of the differential equation is given by
y