Second Order Differential Equation Assistance Hi Maths stack exchange!
I’m doing this question for homework,
$$y′′+4y′+4y=0$$
I managed to find the auxiliary equation. 
$$y=(A+Bx)e^{-2x}$$
The issue is when I was looking at the solutions of what to do next, it said this should be the next line.
$$y'(x)=Be^{-2x}+(-2)(A+Bx)e^{-2x}=(B-2A+Bx)e^{-2x}$$
I have no Idea how they got answer, I was wondering if anyone could shed some light on how this answer was obtained.
Thanks
~Neamus

You have the correct idea so far, they got that line by differentiation using the chain rule. If we take your progress so far $y(x)=(A+Bx)e^x$ and differentiate it with respect to $x$ we get: $$\frac{d}{dx}(y(x))=\frac{d}{dx}(Ae^{-2x}+Bxe^{-2x})=\frac{d}{dx}(Ae^{-2x})+\frac{d}{dx}(Bxe^{-2x})$$ From this we can split it into
$$\frac{d}{dx}(Ae^{-2x})=-2Ae^{-2x}$$The crucial step here is$$\frac{d}{dx}(Bxe^{-2x})=Bx\frac{d}{dx}(e^{-2x})+e^{-2x}\frac{d}{dx}(Bx)$$This simply resolves to$$\frac{d}{dx}(Bxe^{-2x})=-2Bxe^{-2x}+Be^{-2x}$$So when we put it all back together it gives
$$\frac{d}{dx}(y(x))=y'(x)=-2Ae^{-2x}-2Bxe^{-2x}+Be^{-2x}$$
Thus by factorising this you get the answer in the form given.
