# Second degree linear derivate with exponential function, which general solution?

Suppose $y''-4y=xe^{2x}$.

Solution of the homogenous equation is $y_H(x) = C_{1} e^{2x} + C_{2} e^{-2}$, after solving the characteristic equation with the guess $y=e^{rx}$.

Now my instructor insists that the one solution is either

$y(x) = Ax^{2} e^{2x} + Bxe^{2x}$

or

$y(x) = Ax^{2}e^{2x} + Bxe^{2x}+Ce^{2x}$

...and then I get the solution $y(x) = y_{H}(x) +\frac{1}{8}x^{2}e^{2x}-\frac{1}{16}xe^{2x}$

but I cannot understand the choices. Why do just the forms work? I have tried many different forms there and get lost/wasted a lot time -- and my instructor just says that it is a "guess" and smiles. How can I find the one solution without guessing? For one solution, things such as $y(x)=e^{2x}$ or $y(x)=xe^{2x}$ work so I am a bit lost why the more complex form is "the solution" and why it provides all solutions.

For example, the case $y=e^{2x}$. We get $y'=2e^{2x}$ and $y''=4e^{2x}$ so

$y''-4y = 4e^{2x} - 4 e^{2x} = 0$

so $RHS = xe^{2x} = 0$ so $x=0$, a solution?! If not why? Ok it is naive, it does not contain all cases but how can I know that some form contains all?

-
At the "guess" level, $Bxe^{2x}+Ce^{2x}$ is very reasonable. And it would work nicely, with anything other than $-4y$, like $-3y$, or $7y$. But substituting the "guess" in $y''-4y$ shows that the $-4y$ makes the $xe^{2x}$ term disappear. Now maybe one realizes that if you add $Ax^2e^{2x}$ to the guess, and calculate $y''-4y$, the $x^2e^{2x}$ term will similarly disappear, which now is a good thing! (As you can imagine, there is also general theory available, but playing around and paying attention to structure works well in this case.) – André Nicolas May 14 '11 at 19:47
@ahh: What is now at the end of the post is not right, and seems to show a misunderstanding of the process. You want a "guess" $y$ such that $y'' -4y$ is identically equal to $xe^{2x}$, that is, equal for all $x$. The "solving" for $x$ that you did is totally irrelevant, has nothing to do with the question. You want a "guess" $y$ such that $y'' -4y$, when simplified, is $xe^{2x}$. – André Nicolas May 14 '11 at 19:56

-