General solution of differential equation dy / DX = 2x-y

General solution of differential equation dy / DX = 2x-y

This is a direct formula for a first order non-homogeneous linear equation
dy/dx+y=2x
P(x)=1 Q(x)=2x
Y = e ^ (- x) [integral (2xe ^ xdx) + C]
=e^(-x)[2xe^x-2e^x+C]
=Ce^(-x)+2x-2