Solution (source code)

= Solution

The repeated root of the <characteristic equation> suggests factoring out $e^x$. Set $y=e^xu$. The <product rule> gives
$$
y'=e^x(u+u'),\qquad y''=e^x(u+2u'+u''),\qquad y''-2y'+y=e^xu''.
$$
Thus the <ordinary differential equation> reduces to $u''=1$, with <general solution> $u=x^2/2+Ax+B$. The first <initial condition> gives $B=1$. Since $y'(0)=A+B=2$, the other <initial condition> gives $A=1$. Therefore
$$
\boxed{y(x)=e^x\left(1+x+\frac{x^2}{2}\right),\qquad x\in\mathbb R.}
$$
Substitution into the reduced <ordinary differential equation> and the two <initial conditions> verifies the result.