If $x=(a+bt)e^{-nt}$, show that $\frac{d^2x}{dt^2} + 2n\frac{dx}{dt} +n^2x = 0$ Question : If $x=(a+bt)e^{-nt}$, show that $\frac{d^2x}{dt^2} + 2n\frac{dx}{dt} +n^2x = 0$
I got $\frac{dx}{dt}$
Then $\frac{d^2x}{dt^2}$ and plugged in these values 
But at the end I got $$-n^2ae^{-nt} -n^2bte^{-nt} +n^2x$$
I don't know how to proceed further

How I proceeded with this
I simplified the bracket further $(x=ae^{-nt} + bte^{-nt})$
And solved for $\frac {dx} {dt}$ ( i got $\frac {dx} {dt}$ = $-nae^{-nt} - nbte^{-nt} + be^{-nt}$
And then solved for $\frac {d^2x} {dt^2}$ 
( i got $\frac {d^2x} {dt^2}$ = $n^2ae^{-nt} + n^2bte^-nt - nbe^{-nt} - nbe^{-nt})$
 A: $$xe^{nt}=at+b$$
Method$\#1:$ 
Differentiate wrt $x$ $$e^{nt}\left(nx+\dfrac{dx}{dt}\right)=a$$
Differentiate wrt $x$ $$e^{nt}n\left(nx+\dfrac{dx}{dt}\right)+e^{nt}\left(n\dfrac{dx}{dt}+\dfrac{d^2x}{dt^2}\right)=0$$
Now safely cancel $e^{nt}\ne0$
Method$\#2:$ 
General Leibniz rule with $n=2$
$$\dfrac{d^2x}{dt^2}e^{nt}+\binom21\dfrac{dx}{dt}\dfrac{d(e^{nt})}{dt}+\binom22x\dfrac{d^2(e^{nt})}{dt^2}=0$$
A: You can also show that
$$\exp(-nt)\,\frac{\text{d}^2}{\text{d}t^2}\,\Big(\exp(nt)\,f(t)\Big)=\frac{\text{d}^2}{\text{d}t^2}\,f(t)+2n\,\frac{\text{d}}{\text{d}t}\,f(t)+n^2\,f(t)$$
for all twice differentiable function $f$.  One way to see this is to write
$$\exp(-nt)\,\frac{\text{d}}{\text{d}t}\,\Big(\exp(nt)\,g(t)\Big)=\frac{\text{d}}{\text{d}t}\,g(t)+n\,g(t)\,,$$
and
$$\exp(-nt)\,\frac{\text{d}^2}{\text{d}t^2}\,\Big(\exp(nt)\,f(t)\Big)=\exp(-nt)\,\frac{\text{d}}{\text{d}t}\,\exp(nt)\,\Biggl(\exp(-nt)\,\frac{\text{d}}{\text{d}t}\,\Big(\exp(nt)\,f(t)\Big)\Biggr)\,.$$
Thus, $$\frac{\text{d}^2}{\text{d}t^2}\,f(t)+2n\,\frac{\text{d}}{\text{d}t}\,f(t)+n^2\,f(t)=0$$ if and only if $\exp(nt)\,f(t)=a+bt$ for some constants $a$ and $b$, or equivalently, $$f(t)=(a+bt)\,\exp(-nt)\,.$$
