Question 844495
<pre>
First we find the complementary solution of the 
complementary homogeneous differential equation:

y''' + 4y' = 0

The auriliary polynomial equation is

r³ + 4r = 0
r(r²+4) = 0
r=0, r=±2i, which we think of as {{{0±2i}}}

{{{y[c]}}}{{{""=""}}}{{{c[1]e^(0x)}}}{{{""+""}}}{{{e^(0x)(c[2]cos(2x)+c[3]sin(x))}}}

{{{y[c]}}}{{{""=""}}}{{{c[1]*1}}}{{{""+""}}}{{{1*(c[2]cos(2x)+c[3]sin(x))}}}

{{{y[c]}}}{{{""=""}}}{{{c[1]+c[2]cos(2x)+c[3]sin(x)}}}

Now we look for a particular solution to the original differential equation.

The right side is x + 3cos(x)

That would ordinarily make us think of this particular solution;

Ax + Bcos(x) + Csin(x)

We do not need a constant term because the complementary solution
already has c<sub>1</sub>.

However there is a "conflict" with the term x in the right side
and the term Ax in that choice for a particular solution. So we
must change that term by multiplying the term Ax by x, getting Ax².  
That means we must still have a term in x.  So we redo the assumed 
particular solution to this:

y<sub>p</sub> = Ax² + Bx + Ccos(x) + Dsin(x)

y<sub>p</sub>' = 2Ax + B - Csin(x) + Dcos(x) [we can ignore the B, since we have c<sub>1</sub>]

y<sub>p</sub>" = 2A - Ccos(x) - Dsin(x)   [we can ignore the 2A, since we have c<sub>1</sub>]

y<sub>p</sub>''' =  Csin(x) - Dcos(x)

No we'll line up the terms of the original differential equation:

 y<sub>p</sub>''' =        Csin(x) -  Dcos(x)

+4y<sub>p</sub>'  = 8Ax - 4Csin(x) + 4Dcos(x)
--------------------------------------------------
x + 3cos(x)       = 8Ax - 3Csin(x) + 3Dcos(x)

Equating coefficients of x:  1 = 8A, so A = {{{1/8}}}

Equating constants: 0 = 4B, so B=0

Equating coefficients of cos(x): 3 = 3D, so D = 1  

Equating coefficients of sin(x): 0 = -3C, so C = 0

Particular solution:

y<sub>p</sub> = Ax² + Bx + Ccos(x) + Dsin(x)

y<sub>p</sub> = {{{expr(1/8)x^2 + 0x + 0cos(x) + 1sin(x)}}}

y<sub>p</sub> = {{{expr(1/8)x^2 + sin(x)}}}


General solution: 

{{{y}}}{{{""=""}}}{{{y[c]}}}{{{""+""}}}{{{y[p]}}}

{{{y}}}{{{""=""}}}{{{c[1]+c[2]cos(2x)+c[3]sin(x)}}}{{{""+""}}}{{{expr(1/8)x^2 + sin(x)}}}.

--------------------------------------

If I have time I'll do the other one by variation of parameters later.

Edwin</pre>