Which of the following is the general solution of $\large\frac{d^2y}{dx^2}$$-2\large\frac{dy}{dx}$$+y=0$

$(A)\;y=(Ax+B)e^x \quad (B)\;y=(Ax+B)e^{-x}\quad(C)\;y=Ae^x+Be^{-x} \quad (D)\;y=A\cos x+B\sin x$

Toolbox:
• If the given equation has $'n'$ arbitary constants then its differential equation will be of $n^{th}$ order.
• $\large\frac{d}{dx}$$(uv)=\large\frac{du}{dx}.$$v+u.\large\frac{dv}{dx}$
Given $\large\frac{d^2y}{dx^2}$$-2\large\frac{dy}{dx}$$+y=0$
Consider the equation $y=(Ax+B)e^x$
On expanding we get,
$y=Axe^x+Be^x$
Differentiate w.r.t x on both sides,
$\large\frac{dy}{dx}$$=A\bigg[\large\frac{d}{dx}$$(x).e^x+\large\frac{d}{dx}$$(e^x).x\bigg]$$+Be^x$
=>$\large\frac{dy}{dx}$$=A[e^x+xe^x]+Be^x =>\large\frac{dy}{dx}$$=Ae^x+Axe^x+Be^x \qquad (But:(Ax+B)e^x=y)$
$=Ae^x+y$
$\large\frac{dy}{dx}$$=Ae^x+y=>Ae^x=\large\frac{dy}{dx}$$-y$
Again differentiating we get,
$\large\frac{d^2y}{dx^2}$$=Ae^x+\large\frac{dy}{dx} Substituting for Ae^x \large\frac{d^2y}{dx^2}=\bigg(\large\frac{dy}{dx}$$-y\bigg)+\large\frac{dy}{dx}$