Linear First Order ODE/y' + y cot x = 2 x cosec x

Theorem
The linear first order ODE:
 * $(1): \quad y' + y \cot x = 2 x \csc x$

has the solution:
 * $y = x^2 \csc x + C \csc x$

Proof
$(1)$ is in the form:
 * $\dfrac {\mathrm d y}{\mathrm d x} + P \left({x}\right) y = Q \left({x}\right)$

where:
 * $P \left({x}\right) = \cot x$

Thus:

Thus from Solution by Integrating Factor, $(1)$ can be rewritten as:
 * $\dfrac {\mathrm d} {\mathrm d x} y \sin x = 2 x$

and the general solution is:
 * $y \sin x = x^2 + C$

or:
 * $y = x^2 \csc x + C \csc x$