Differential Equations, Undetermined Coefficients - Equal Terms in the Homogeneous and Particular Solutions Sometimes an equal term appears in the homogeneous solution $(y_h)$ and in the particular solution $(y_p)$.
For example, take the following Second-Order Linear Nonhomogeneous O.D.E.,
$$y'' -4y' + 3y = \cosh{x} = \frac{e^x + e^{-x}}{2}$$
The homogenous solution has the following form
$$y_h = c_1e^x + c_2 e^{3x}$$
When I try to find the particular solution using the method of Undetermined Coefficients, I get the general form
$$y_p = Ae^x + Be^{-x}$$
One for each exponential in $g(x)$. However, one cannot solve using it. Actually, it is required to multiply the equal term by $x$ so that a solution becomes possible. This is similar to what we do in the Characteristic Equation method with equal roots.
Then, my questions are: why does it work? when should a term be multiplied by $x$? Does it applies to others functions other then exponentials, lets say, trigonometric functions? Can they all be multiplied by $x$ or there is another term?
 A: Assuming a particular solution as
$$
y_p(x) = c_1(x)e^x+c_2(x)e^{3x}
$$
after substitution into the complete ODE we have
$$
(-2c_1'(x)+c_2''(x))e^x+(2c_2'(x)+c_2''(x))e^{3x}-\cosh(x)=0
$$
now as $c_1(x), c_2(x)$ are independent we follow with
$$
\cases{
-2c_1'(x)+c_2''(x)=0\\
(2c_2'(x)+c_2''(x))e^{3x}-\cosh(x)=0
}
$$
and after solving those reduced order ODE we obtain
$$
\cases{
c_1(x) = \gamma_1 e^{2x}+\gamma_2\\
c_2(x) = \frac{1}{16}(1-2e^{2x}(1+2x+\gamma_3))e^{-4x}+\gamma_4
}
$$
but as we are looking for particular solutions, we choose $\gamma_1=\gamma_2=\gamma_3=\gamma_4 =0$ so we follow with
$$
\cases{
c_1(x) = 0\\
c_2(x) = \frac{1}{16}(1-2e^{2x}(1+2x))e^{-4x}
}
$$
and finally
$$
y= c_1 e^x+c_2e^{3x}+\left(\frac{1}{16}(1-2e^{2x}(1+2x))e^{-4x}\right)e^{3x}
$$
or
$$
y = \left(c_1-\frac 18\right)e^x+c_2e^{3x}+\frac{1}{16}e^{-x}-\frac 14 x e^x
$$
A: 
Then, my questions are: why does it work? when should a term be multiplied by x? Does it applies to others functions other then exponentials, lets say, trigonometric functions? Can they all be multiplied by x or there is another term?

In that particular case it does not work, here solutions are independant, i.e. you cannot write $e^x$ as a linear combination of $e^{3x}$ so the particular solution is of the form:
$$ y_p = c_1 e^x + c_2 e^{3x} $$
You multiply by $x$ when you have double root to your characteristic equation, exemple:
$$ y''+4y'+4y = \mathrm{ch} $$
To ensure that you have linear independance you should then compute the Wronskian and check it's non zero.
It will work indeed with other functions like trigs ...
