I have a question from my Differential Equations & Linear Algebra class. When you're trying to find the general solution to an nth order linear non-homogeneous differential equation, you have to find a trial solution to solve it (at least until you get to variation of parameters later in the same chapter) and I assume that the lack of information is due to people usually preferring variation of parameters, but can someone just explain to me the general way to find the form of a trial solution for a problem? Say you have the equation:
y''-y'-2y = 5e^(2x)
I know the complementary solution would be
Yc = c1*e^(-x)+c2*e^(2x)
when you're treating the left-hand side as a homogeneous equation, but then once you get to the right hand side, I'm pretty lost here. I know it has the annihilator (D - 2) where D is the differential operator, but how do I turn that into the trial solution? Sorry for the length, I just wanted to provide as much information as possible for accuracy. Thanks in advance everyone.
The equation is $$ (D-2)(D+1)y = 5e^{2x} $$ $D-2$ annihilates the right side, which gives $$ (D-2)^{2}(D+1)y = 0. $$ Applying $D-2$ introduces additional solutions, but the general solution of the second equation has the form $$ y=Ae^{2x}+Bxe^{2x}+Ce^{-x} $$ Plug this back into the original equation, and notice that $(D-2)(D+1)$ annhilates the terms with $A$ and $C$. So $B$ is determined by the equation $$ (D-2)(D+1)Bxe^{2x}=5e^{2x} $$ A convenient trick is to write $D+1=D-2+3$: \begin{align} (D-2)(D+1)Bxe^{2x}&=\{(D-2)^{2}+3(D-2)\}Bxe^{2x}\\ &=3(D-2)Bxe^{2x}=3(e^{2x}De^{-2x})Bxe^{2x} \\ &=3Be^{2x}=5e^{2x} \implies B=5/3. \end{align} The general solution is $$ y=Ae^{2x}+\frac{5}{3}xe^{2x}+Be^{-x}. $$