[Math] Using the method of undetermined coefficients, find an appropriate particular solution for $y” + 25y = -x\sin(5x)$

ordinary differential equations

$y'' + 25y = -x\sin(5x)$

Characteristic eq: $y'' + 25y = 0$

So we have:

$r^2+25 = 0$

$r = \pm 5i$

So the complementary solution takes the form:

$y_c = c_1\sin(5x)+c_2\cos(5x)$

So I thought a guess of:

$y_p = x(Ax+B)(C\sin(5x)+D\cos(5x))$

would be appropriate, but apparently it is not. Can someone explain why, and the general methodology I can follow to solve similar problems?

Best Answer

Once you obtain the general solution for the homogeneous linear differential equation $y'' + 25y = 0$, that is $$y_c = c_1\sin(5x)+c_2\cos(5x),$$ you can find the particular solution $y_p$ of $y'' +25y=−xsin(5x)$ by means of an annihilating differential operator for the function $x\sin{5x}$, which is in this case: $$ (D^2 + 25)^2 = D^4 + 50D^2 + 625 \quad \mbox{where $D^n = \frac{d^n}{dx^n}$},$$ because (as you can check): $$ (D^2 + 25)^2 (x\sin(5x)) = 0 \quad \forall \; x \in \mathbb{R}. $$

Thus, your non-homogeneous linear differential equation, that can be rewritten as $(D^2 + 25)y=-x\sin(5x)$, by application of the differential operator $(D^2 + 25)^2$ to both sides it's converted to an homogeneous linear differential equation $(D^2 + 25)^3 y=0$. For this equation the general solution is: $$ y = c_1 \cos(5x) + c_2 \sin(5x) + c_3 x\cos(5x) + c_4 x\sin(5x) + c_5 x^2 \cos(5x) + c_6 x^2 \sin(5x).$$ So, identifying $y_c$ in $y$ you get (because $y = y_c + y_p$) that: $$ y_p = c_3 x\cos(5x) + c_4 x\sin(5x) + c_5 x^2 \cos(5x) + c_6 x^2 \sin(5x)$$ and evaluating in the original non-homogeneous linear differential equation you find the coefficients $c_3, c_4, c_5$ and $c_6$ (using the method of undetermined coefficients precisely).