The given differential equation is of the form ` (dx)/(dy) + Px =Q`, where
` P= cot y and Q = ( 2y + y ^(2) cot y )`
So, the given differential equation is linear.
`IF = e^(int Pdy)= e ^(int cot y dy) = e ^(logsin y ) = sin y `
Therefore, the solution is given by
` x xx IF = int (Q xx IF ) dy +C`,
i.e., `x xx sin y = int ( 2y + y^(2) cot y ) sin y dy+ C `
` " " = int 2y sin y dy + int underset ("I") y^(2) underset("II")cos y dy +C `
`" " int 2y sin y dy + [ y ^(2) sin y - int 2y sin y dy ] + C `
` " " = y ^(2) sin y +C. `
`therefore x = y ^(2) + C cosec y" " `... (i)
Putting `y = (pi)/(2) and x = 0 ` in (i), we get ` C = (-pi^(2))/( 4)`
Hence, the required solution is `x = y ^(2) - (pi^(2))/( 4) cosec y`.