Answer with explanation:
The given differential equation is
y" -y'+y=2 sin 3x------(1)
Let, y'=z
y"=z'

Substituting the value of , y, y' and y" in equation (1)
z'-z+zx=2 sin 3 x
z'+z(x-1)=2 sin 3 x-----------(1)
This is a type of linear differential equation.
Integrating factor

Multiplying both sides of equation (1) by integrating factor and integrating we get

