Solving differential equation y '- 2Y = e ^ x

Solving differential equation y '- 2Y = e ^ x


The equation is a first order non-homogeneous equation with constant coefficients,
Y '- 2Y = 0, the corresponding characteristic equation is R-2 = 0, the solution is r = 2
So the general solution of the equation is: y = CE ^ (2x)
Then, the general solution of the corresponding non-homogeneous equation is obtained by constant variable method
Let y = C (x) * e ^ (2x) be the general solution of the equation, and substitute it into the original equation to get C (x) = - e ^ (- x) + C
So the general solution of the equation is as follows
y=Ce^(2x)-e^x