# Making sense of the method of constant coefficients

Trying to gain some intuition for the method of constant coefficients, this is abit long but I am trying to flesh out the exact scenario I encountered to give context.

Encountered a question that looked like $$y’’’’-2y’’+y=xe^{x}$$. If we immediately try to apply the method of constant coefficients, we get the guess $$(Ax+B)e^t$$ where $$A$$ and $$B$$ are constants. However, The characteristic polynomial here is $$p(s)=s^4-2s^2+1$$=$$(s^2-1)^2$$, this means that $$1$$ is a double root of the equation, so we know that a possible homogeneous solution is $$y_c=(Ax+B)e^x$$. Therefore, our earlier guess is clearly wrong.

To resolve this, the notes im referring to tells me that I have to make it so that my guess is no longer linearly independent, this made sense to me since clearly if its no longer linearly independent, we wouldn’t fall into the same problem. Thus, an easy fix would therefore be the guess $$x(Ax+B)e^x$$. However, the notes instead tell me to use the guess $$x^2(Ax+B)e^x$$. I was quite confused by this since both guesses were linearly independent and the first guess seems to be the more “obvious” one since it just involves multiplying by $$x^1$$

I thought perhaps it was problem specific, but i looked at a few examples and found that its always the case that guesses are not just linearly independent from any homogeneous solutions but should not even partially contain as its sum, any homogeneous solution and that we should keep multiplying by $$x$$ to remove it.

I tried to think about it a bit, and this is what i think to be the cause for this:

1. Having a homogeneous solution be part of your guess doesn’t accomplish anything, by the superposition, that solution when plugged into the ODE will just give back $$0$$.
2. Because of 1. we are multiplying by $$x$$ across not necessarily because we want to remove the homogeneous part but rather we want to add an extra “useful” unknown constant, to solve simultaneous equations with. This extra term is not harmful since at most it will $$= 0$$but it prevents situations where we only have a single unknown like the very first example i gave.I.E $$x(Ax+B)e^x$$ will give us two equations we have to solve but only a single constant A to work with since $$Bxe^x$$ when plugged in is just 0.

My first question is whether 1. and 2. are correct/make sense.

Secondly, i am curious about the reliability of the method of undetermined coefficients. I couldn’t find any counterexample and im not sure if they are any, but is this method always reliable so long as i follow the rule layed out? Would it be possible to have a guess that is both not linearly independent and doesnt contain any homogeneous solution as part of its sum but still not have enough unknowns to get a particular solution? And if the answer to this is yes, its always reliable, how do i go about showing that this is the case?

• The method of undertimined coefficients is not just a random trick, if applied properly you can prove that it works all the time and lead to a theorical solution for an arbitrary equation. Maybe doing the proof yourself will help you clarify your mind. May 27, 2023 at 21:12

For an arbitrary linear differential equation $$y^{(n)}(x)+\sum_{k=0}^{n-1} a_k(x) y^{(k)}(x)=d(x)$$
Given that you already found a fundamental system of solutions for the homogeneous equation $$(y_1, ... , y_n)$$
Then you can find a particular solution $$y_0$$ using the method of undetermined coefficients : $$y_0(x)=\sum_{i=1}^n c_i(x) y_i(x)$$ Where the $$c_i$$ are the undertermined functions.
$$\left(\begin{array}{cccc} y_1(x) & y_2(x) & \cdots & y_n(x) \\ \vdots & \vdots & & \vdots \\ y_1^{(k)}(x) & y_2^{(k)}(x) & \cdots & y_n^{(k)}(x) \\ \vdots & \vdots & & \vdots \\ y_1^{(n-1)}(x) & y_2^{(n-1)}(x) & \cdots & y_n^{(n-1)}(x) \end{array}\right) \cdot\left(\begin{array}{c} c_1^{\prime}(x) \\ \vdots \\ c_k^{\prime}(x) \\ \vdots \\ c_n^{\prime}(x) \end{array}\right)=\left(\begin{array}{c} 0 \\ 0 \\ \vdots \\ 0 \\ d(x) \end{array}\right)$$ And the big matrix on the left hand side is invertible since the $$y_i$$ are a fundamental system of solution. You can solve for the different $$c_i'$$ and then integrate to find the $$c_i$$.