# Dealing with constants using method of undetermined coefficients and superposition

I am trying to solve the initial value problem for the following equation:

$y'' + y' - 12y = e^t + e^{2t} - 1$

I've found the solutions to the complementary equation to be $y_1 = c_1e^{-4t} + c_2e^{3t}$

Mostly I'm having trouble figuring out the guess for the particular solution because of the constant $-1$ value. Currently my guess is: $y_p = A_0e^t + B_0e^2t + C_0$. Is this correct or should the term be $C_0t$? In general, how do you deal with constant values when guessing the particular solution?

Additionally, for the solutions to the homogeneous case, does the order matter (e.g. $y_1 = c_1e^{-4t} + c_2e^{3t}$ vs $y_1 = c_1e^{3t} + c_2e^{-4t}$?

Thanks!

You seem to be using the method of undetermined coefficients (https://en.wikipedia.org/wiki/Method_of_undetermined_coefficients) to find a particular solution of the ODE.

You have $ay''+by'+cy=d(x)$. If you know the function $d(x)$, then you want to find a particular solution $y' = y_p(x)$ that can be written as a linear combination of a linearly independent set of functions. Naturally, when you have trigonometric functions, polynomials or exponentials, it becomes easy to write $d(x)$. In your case, you are right, $yp=A_0e^t+B_0e^{2t}+C_0$ is a fine guess.

• First question "In general, how do you deal with constant values when guessing the particular solution?" Basically, when you have a constant in your $d(x)$, put a $C_0$ inside your particular solution. For example, if you have a $d(x) = ax^2 + b^x + c$, make a guess of $y_p = Ax^2 + B^x + C$. The thing is, when you have just $d(x) = ax^2$, you should also make a guess of $y_p = Ax^2 + B^x + C$ If it helps, think of it as part of a polynomial - in this case, the constant is the last term of it, and when you have just one term of it in your $d(x)$ as we just did, you make a guess of a polynomial, putting all the terms $k_0x^{n-1}$ lower than the $p_0x^n$ you have in your d(x).

• Second question About the order: it doesn't matter in which order you put your solutions, since it is a linear combination, so either way it works (check it!) . Furthermore, the same goes for the particular solution AND the general solution $y(x) = y_h(x) + y_p(x)$.

• Some stuff that might help:

I suggest you take a look at the table in this link: https://pt.wikipedia.org/wiki/Coeficientes_a_determinar (it's in Portuguese, but it has a table with some good examples).

Bonus: Apart from that, I suggest you take a look at this question Find a particular solution for the differential equation by the method of undetermined coefficients., since it gives a problem of double roots, which is probably something you will soon start seeing.

• Thank you! I've actually already learned how to deal with complex and double roots. My main problem is what to do with constants. What would you do in the case where d(x) = constant? Would the guess for that always be Ct (or Ct^2)? Or does that depend? – Sveinn Oct 10 '16 at 22:27
• Great! You will always try to look to your homogeneous solution, so try acquiring the habit of solving it first. If you have a guess for a particular solution but it is already in your homogeneous solution, then you need to multiply it by $t$ (double root), since it wouldn't be a linearly independent solution if it was the same. Note that, in your case, you have no constant in your homogeneous solution, nor an $e^t$ term, nor an $e^{2t}$ term. Since you have no constant in your homogeneous, it is ok to do a guess of a constant. Answer: it depends (on your homogeneous solution). – DrHAL Oct 11 '16 at 0:31
• @Anya it is of usual habit of users here to upvote any answer or comment that was helpful to you. Lets people know if you understood what you wanted or just settled for the best answer, even though it didn't fulfill your questions! Let me know if you got it :) – DrHAL Oct 11 '16 at 4:00
• Yep, I just did. Sorry, I thought that pressing the little checkmark was enough. I'm not super familiar with the etiquette on the site yet – Sveinn Oct 11 '16 at 19:18