# Find the general solution for the following non homogeneous linear differential equation!

$$\frac{d^3y}{dx^3}+\frac{d^2y}{dx^2}+3\frac{dy}{dx}-5y=5\sin2x+10x^2 +3x+7$$

The complementary function is $$y_c=c_1e^x+e^{-x}[c_2\cos2x+c_3\sin2x]$$

My approach is different from the suggested answer!

$$y_p=Ax^2+Bx+C+D\sin2x+E\cos2x$$ $$y'_p=2xA+B+2D\cos2x-2E\sin2x$$ $$y''_p=2A-4D\sin2x-4E\cos2x$$ $$y'''_p=-8D\cos2x+8E\sin2x$$

My $A$ is $-2$ B is $-3$

Something is wrong with my B!

The suggested solution is $$y=c_1e^x+e^{-x}[c_2\cos2x+c_3\sin2x]-2x^2-\frac{9}{5}x-\frac{82}{75}-\frac{9\sin2x}{17}+\frac{2\cos2x}{17}$$

I want to ask if my solution is wrong or I made some mistakes?

Your answer is right for the equation you posted, that is $B=-3$. If you change the $+3x$ to $-3x$ on the left, then the proposed solution is correct, that is $B=-9/5$. So there's a typo somewhere.