Second Order Nonhomogeneous Differential Equation (Method of Undetermined Coefficients)
Find the general solution of the following Differential equation $y''-2y'+10y=e^xcos(3x)$ We know that the general solution for 2nd order Nonhomogeneous differential equations is the sum of $y_p+y_c$ where $y_c$ is the general solution of the homogeneous equation and $y_p$ the solution of the nonhomogeneous. Therefore $y_c=e^x(c_1cos(3x)+c_2cos(3x))$ Now we have to find $y_p$. I know in fact that $y_p=e^xxsin(3x)/6$ but i do not know how to get there.
since the RHS is a soln of the homogeneous eqn, we can try x multiplied by it. let $y_p$ be a linear combination of $xe^x\cos(3x)$ and $xe^x\sin(3x)$.
$y_p=axe^x\cos(3x)+bxe^x\sin(3x)$
Let $E=D^2-2D+10$ , where $D$ is the derivative operator.
$E[y_p]=-6ae^x\sin(3x)+6be^x\cos(3x)$
$E[y_p]=e^x\cos(3x)$
equating coeffs,
$a=0$ and $6b=1$
$y_p=\frac{1}{6}xe^x\sin(3x)$