General solution of $y''+4y'+4y=0$ Find general solution of: $$y''+4y'+4y=0$$
I solve characteristic equation $r^2+4r+4=0$ and I find $r=-2$
I thought that general solution would be in form:
$$y=c_1e^{-2x}+c_2e^{-2x}$$
But WolframAlpha says, that it's going to be:
$$y=xc_1e^{-2x}+c_2e^{-2x}$$
How the $x$ get there?
 A: In this case, i mean when you have two equal roots the solution should be $$y=Axe^{rx}+Be^{rx}$$ since you have to get two independent solutions. You got one say $y_1=Ae^{rx}$ then $xy_1$ is also a solution.
A: The equation $y''+4y'+4y=0$ can be written as $(D^2+4D+4)y=0$, where $D$ is the derivative operator, $Dy=y'$. We can further rewrite this as $(D^2+4D+4)y=(D+2)(D+2)y=0$. Let $z=(D+2)y=y'+2y$. We have $(D+2)z=0$, so $z'+2z=0$, or $z=ce^{-2x}$ for some $c$. Hence, $y'+2y=ce^{-2x}$, so $y$ has the stated form.
You are probably familiar with the method for solving $z'+2z=0$: Multiply by $e^{2x}$, to get $(ze^{2x})'=0$, so $ze^{2x}=c$ is a constant. We can solve $y'+2y=ce^{-2x}$ similarly: Multiplying by $e^{2x}$ we get $(ye^{2x})'=c$, so $ye^{2x}=cx+d$ for some constant $d$, this is where the $x$ comes from. Finally, this gives $y=cxe^{-2x}+de^{-2x}$. 
The same idea can be used to solve any linear differential equation with constant coefficients. For instance, if we had instead $(D+2)^3y=0$, we would have obtained at the end that solutions have the form $c'x^2e^{-2x}+dxe^{-2x}+ae^{-2x}$ for constants $c',d,a$. The $x^2$ comes from having to integrate $cx+d$.
