QUESTION: solve: y'-y•COTX=2X-X^2•COTX
dy/dx – cot(x).y = 2x – x^2.cot(x)
IF= e^(int -cot(x) dx) = e^(-ln(sin(x))) = 1/sin(x) =csc(x)
Therefore,
(d/dx)(IF.y) = (2x – x^2.cot(x))/sin(x)
y/sin(x) = int (2x – x^2.cot(x))/sinx) dx
Use Maclaurin series expansions for cot(x) and sin(x).
cot(x) = 1/x - (1/3)x – (1/45)x^3 – (2/945)x^5 – (1/4725)x^7 – (2/93555)x^9 - …
x^2.cot(x) = x - (1/3)x^3 – (1/45)x^5 – (2/945)x^7 – (1/4725)x^9 – (2/93555)x^11 - …
sin(x) = x – (1/6)x^3 + (1/120)x^5 – (1/5040)x^7 + (1/362880)x^9 + …
sin(x)^(-1) = 1/x + (1/6)x + (7/360)x^3 + (31/15120)x^5 + (127/604800)x^7 + …
(2x – x^2.cot(x))/sinx = (2x – x + (1/3)x^3 + (1/45)x^5 + (2/945)x^7 + (1/4725)x^9 + (2/+3555)x^11 + …)*(1/x + (1/6)x + (7/360)x^3 + (31/15120)x^5 + (127/604800)x^7 + …)
(2x – x^2.cot(x))/sin(x) = 1 + (1/2)x^2 + (7/72)x^4 + (31/2160)x^6 + (127/67200)x^8 + (209/1088640)x^10 + …
The integration then is,
int (2x – x^2.cot(x))/sinx) dx = x + (1/6)x^3 + (7/360)x^5 + (31/15120)x^7 + (127/604800)x^9 + (19/1088640)x^11 + …
And the final solution,
y(x)= sin(x){ x + (1/6)x^3 + (7/360)x^5 + (31/15120)x^7 + (127/604800)x^9 + (19/1088640)x^11 + …}