[Math] Dealing with constants using method of undetermined coefficients and superposition

ordinary differential equations

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!

Best Answer

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.