# Particular integral for $x\sin(1-x)$?

$$y''+y=x\sin(1-x)$$

I have got that the solution to the homogenous case is $$y = A\sin(x)+B\cos(x),$$ but what about the inhomogenous case? Which particular integral do I use?

I have tried $$Cx\sin(1-x) + D\sin(1-x) + Ex\sin(1-x) + F\sin(1-x)$$ but it doesn't work.

• Thanks, I've corrected the typo. May 3, 2015 at 22:07
• $y = \int_0^x \xi \sin(1-\xi) \sin (x-\xi) \, d\xi$ is a particular solution.
– abel
May 3, 2015 at 22:08
• if you want to use the method of undetermined coefficients, then you will need $x^2\sin x, x^2\cos x, x\sin x, x\cos x.$
– abel
May 3, 2015 at 22:26

Try splitting up $\sin(1-x)$ using the difference formula for $\sin$ -
$$\sin(\alpha \pm \beta) = \sin \alpha \cos \beta \pm \cos \alpha \sin \beta \!$$
• Ok, so that gives $$\sin(1)\cos(x)-\cos(1)\sin(x).$$ So $C\cos(x)+D\sin(x)$ evidently won't work, so perhaps I need a factor of $x$ in there too? May 3, 2015 at 22:19
• Remember you have the $x$ multiplying as well. Normally we would guess $$(Ax+B)\sin x + (Cx+D)\cos x$$ however as you said, some of those are the homogenous solution. Multiply our solution by $x$ until it is sufficiently different, so $$(Ax^2+Bx)\sin x + (Cx^2+Dx)\cos x$$ Let us know if that helps. May 3, 2015 at 22:24