Answer
$y=y_h+y_p=c_1.e^{x}.cosx+c_2.e^{x}.sinx+\frac{1}{2}.x+\frac{1}{2}+e^{x}$
Work Step by Step
We need to find the general solution of:
$y''-2.y+2.y=x+e^{x}$
First, we solve the homogeneous equation associated to the general one:
$y''-2.y'+2y=0$
The caracteristic equation is:
$m^2-2.m+2=0$
Solving for m:
$Δ=(-2)^2-4.1.2=4-8=-4$
$m_1=\frac{(2+\sqrt{(-4)}}{2.1}=\frac{(2+2i)}{2.1}=1+i$
$m_2=\frac{(2-\sqrt{(-4)}}{2.1}=\frac{(2-2i)}{2.1}=1-i$
By theorem of homogeneous linear equations, we have:
$y_h=c_1.e^{x}.cosx+c_2.e^{x}.senx$
Now we’ll find the particular solution to
$y''-2.y'+2y=x+e^{x} (*)$
Taking the general possible solution:
$y=(a.x+b)+c.e^{x}$
Differentiating, we have:
$y'=a+c.e^{x}$
$y''=c.e^{x}$
Now, putting the informations inside (*), we have:
$y''-2.y'+2y=c.e^{x}-2.(a+c.e^{x})+2.[(a.x+b)+c.e^{x}]=1.x+1.e^{x}$
Then:
$c.e^{x}-2.a-2.c.e^{x}+2.a.x+2.b+2.c.e^{x}=1.x+1.e^{x}
(-2.a+2.b)+c.e^{x}+2.a.x=1.x+1.e^{x}$
By equality:
$-2.a+2.b=0$
$c=1$
$2.a=1$
By solving the equations, we have:
$c=1$
$a=\frac{1}{2}$
$-2.\frac{1}{2} + 2.b = 0$
$-1+2.b=0$
$2.b = 1$
$b=\frac{1}{2}$
Then
$y_p=\frac{1}{2}.x+\frac{1}{2}+e^{x}$
Therefore, the general solution is:
$y=y_h+y_p=c_1.e^{x}.cosx+c_2.e^{x}.sinx+\frac{1}{2}.x+\frac{1}{2}+e^{x}$