solve DE: ${y}''-6{y}'+9y = 0$
Guess => $y=e^{rx}$
${y}'=re^{rx}$
${y}''=r^{2}e^{rx}$
backsub into y, y', & y'' into DE.
$e^{rx}(r^{2} - 6r + 9) = 0$
$e^{rx}(r-3)^{2} = 0$
$r = 3$
Now the textbook says that I need to find another root since its a double root.
So we are are to guess:
$y = xe^{rx}$
${y}' = e^{rx} + rxe^{rx}$
${y}'' = 2re^{rx} + r^{2}xe^{rx}$
${y}''-6{y}'+9y = 0$
back sub y, y', y'' into DE again:
$2re^{rx} + r^{2}xe^{rx} + -6 (e^{rx} + rxe^{rx}) + 9xe^{rx} = 0$
$e^{rx} (2r + r^{2}x + -6 - rx + 9x) = 0$
Ok here's where I get stuck, how to factor this beast?
The textbook is mute on the subject.
Let / guess $y_2(x) = xe^{rx}$, where $r = 3$ as previously found, then
$$\begin{align*} y_2'(x) &= e^{rx} + rxe^{rx}\\ y_2''(x) &= re^{rx} + re^{rx} + r^2xe^{rx}\\ &= 2re^{3x} + r^2xe^{rx}\\ y_2'' -6y_2' + 9y_2 &= 2re^{rx} + r^2xe^{rx} -6\left( e^{rx} + rxe^{rx}\right) + 9xe^{rx}\\ &= (2r-6)e^{rx} + (r^2-6r+9)xe^{rx}\\ &= 0 \end{align*}$$
So $y_2(x)$ and hence $c_2y_2(x)$ are solutions to the differential equation.
This is not a coincidence, because it is known that $r=3$ is a root of $r^2-6r+9 = 0$ and, since $r=3$ is a double root, the first derivative of $r^2-6r+9$:
$$\frac d{dr} (r^2-6r+9) = 2r-6$$
is zero at $r=3$.