对x求导得
y'(x) = -2Sin[2x] + y(x)Sin[x]
y'[x] - y[x]Sin[x] + 2Sin[2x] = 0
令y'[x] - y[x]Sin[x] = 0 得齐次方程通解为 y[x] = C * E^(-Cos[x])
令y[x] = a Cos[x] + b得
-a Cos[x] - aCos[x]Sin[x] - bSin[x] + 4Sin[x]Cos[x] = 0所以a = 4,b=-4
所以原方程通解为y[x] = C E^(-Cos[x]) + 4Cos[x] - 4
令x = 0得y[0] = 1
所以1 = C / E 所以C = 1/E
所以y[x] = E^(-Cos[x]-1) + 4(Cos[x]+1)