Xy`+2y=1/x
y=z/x^2
y`=z`/x^2 - 2z/x^3
xy`+2y=z`/x - 2z/x^2+2z/x^2=z`/x=1/x
z`/x=1/x
z`=1
z=x+с
y=z/x^2=(x+c)/x^2
*************************
y`*cos(x)-2y*sin(x)=2
y=z/cos^2(x)
y`=z`/cos^2(x)-2z/cos^3(x)*(-sin(x))
y`*cos(x)-2y*sin(x)=z`/cos(x)+2z/cos^2(x)*(sin(x))-2z/cos^2(x)*sin(x)=z`/cos(x)=2
z`/cos(x)=2
z`=2*cos(x)
z=2sin(x)+C
y=z/cos^2(x)=(2sin(x)+C)/cos^2(x)