Consider

${y}^{\u2033}+y=2x\mathrm{sin}(x)$

I have the solution for the homogeneous equation. Now i am trying to guess a particular solution for: $2x\mathrm{sin}(x)$

My first guess was: $(Ax+B)\mathrm{cos}x+(Cx+D)\mathrm{sin}x$ but i end up with the system:

$\{\begin{array}{ccc}-2A& +2B& =0\\ 2C=0& & \end{array}$

Then my quess was: $(A{x}^{2}+xB)\mathrm{cos}x+(C{x}^{2}+xD)\mathrm{sin}x$ but that leaves me with:

$\{\begin{array}{cccc}-Ax& -B& +4C& =0\\ 2A& 2D& =0& \\ -4A& -Cx& -D& =0\\ -2B& 2C& =0& \end{array}$

Is here something wrong?

${y}^{\u2033}+y=2x\mathrm{sin}(x)$

I have the solution for the homogeneous equation. Now i am trying to guess a particular solution for: $2x\mathrm{sin}(x)$

My first guess was: $(Ax+B)\mathrm{cos}x+(Cx+D)\mathrm{sin}x$ but i end up with the system:

$\{\begin{array}{ccc}-2A& +2B& =0\\ 2C=0& & \end{array}$

Then my quess was: $(A{x}^{2}+xB)\mathrm{cos}x+(C{x}^{2}+xD)\mathrm{sin}x$ but that leaves me with:

$\{\begin{array}{cccc}-Ax& -B& +4C& =0\\ 2A& 2D& =0& \\ -4A& -Cx& -D& =0\\ -2B& 2C& =0& \end{array}$

Is here something wrong?