转成标准型 y'-(2/x)y=2
p(x)=-2/x g(x)=2
套公式 积分 exp(∫-(2/x)dx)=exp(2ln|x|)=x²
积分 ∫2/x² dx=-2/x
所以y=x²【C-2/x】=Cx²-2x
let
u = y/x^2
du/dx = (1/x^2) dy/dx - 2(y/x^3)
dy/dx = x^2.[du/dx + (2/x)u ]
//
x.dy/dx -2y = 2x
dy/dx - 2(y/x) = 2
x^2.[du/dx + (2/x)u ] - 2xu =2
x^2.du/dx = 2
u = 2 ∫ dx/x^2
= -2/x + C
y/x^2 = -2/x +C
y= -2x + Cx^2