show that
y = -1/2x . cosx
is/isn't a solution to y" + y = sinx
If it's a solution, then
$\displaystyle y = -\frac{1}{2}x\cos{x}$
$\displaystyle y' = -\frac{1}{2}(\cos{x} - x\sin{x})$
$\displaystyle = \frac{1}{2}x\sin{x} - \frac{1}{2}\cos{x}$.
$\displaystyle y'' = \frac{1}{2}(\sin{x} + x\cos{x}) + \frac{1}{2}\sin{x}$
$\displaystyle = \frac{1}{2}\sin{x} + \frac{1}{2}x\cos{x} + \frac{1}{2}\sin{x}$
$\displaystyle = \frac{1}{2}x\cos{x} + \sin{x}$.
So $\displaystyle y'' + y = \frac{1}{2}x\cos{x} + \sin{x} - \frac{1}{2}x\cos{x}$
$\displaystyle = \sin{x}$.
Do you think it's a solution?