ODE4.1
From Exampleproblems

First, solve the homogeneous equation to get yh. Then, guess a particular solution yp and add them together to get the general solution y = yh + yp.

Set up the characteristic equation and solve.

So,


Therefore, the solution to the homogeneous equation is

![y_h=e^{-x}[c_1 \cos(2x) + c_2 \sin(2x)]\,](/wiki/images/math/e/2/2/e22d244439083c62993b1111fec8e348.png)
Now, check the homogeneous solution to see if any new information can be gained. Start by taking the first and second derivatives of yh.
![y_h' = e^{-x}[ (-2c_1-c_2)\sin(2x) + (-c_1+2c_2)\cos(2x) ] \,](/wiki/images/math/7/d/5/7d563af31cb9b67d7647ef7a93fbfb47.png)
![y_h''= e^{-x}[ (-4c_1-2c_2)\cos(2x)-(-2c_1+4c_2)\sin(2x) ] - e^{-x}[ (-2c_1-c_2)\sin(2x) + (-c_1+2c_2)\cos(2x) ]\,](/wiki/images/math/5/2/8/528ade6b707b6834bf93fea559fa68d6.png)
![y_h''= e^{-x}[ (-3c_1-4c_2)\cos(2x) + (4c_1-3c_2)\sin(2x) ]\,](/wiki/images/math/5/3/a/53ae1778f12bacd25ddb6911afe75178.png)
Substitution of these derivatives into the homogeneous version of the original differential equation and collection of the exponential and trig functions gives the following relations.
![e^{-x}\cos(2x)[-4c_1+c_1-4c_2-2c_1+2c_2+5c_1]=0\,](/wiki/images/math/0/9/3/093ae8a00a63137aa3aa553a7e9961c5.png)
![e^{-x}\sin(2x)[4c_1-3c_2-4c_1-2c_2+5c_2]=0\,](/wiki/images/math/d/c/9/dc9c7c2101b9e36e6e58a425354fbffd.png)
So from the first equation, c1 is arbitrary and − 2c2 = 0, so c2 = 0. From the second equation, no new information is obtained. Therefore, a better homogeneous equation is

Now a particular solution should be guessed. Based on the nonhomogeneous part of the original DE, e − xsin(2x) , a first guess is
, with A, c3, and c4 undetermined constants.
But, the homogeneous solution appears as one of the terms of the guessed particular solution, so that term should be multiplied by x. Now, a guess for the particular solution is
![y_p = A e^{-x} [ c_3 x \cos(2x) + c_4 \sin(2x) ]\,](/wiki/images/math/a/4/9/a492afc582144fc4cba738a558142659.png)
Find the first and second derivatives of yp.
![y_p'= A e^{-x} [ -2 c_3 x \sin(2x) + c_3 \cos(2x) + 2 c_4 \cos(2x) ] - A e^{-x} [ c_3 x \cos(2x) + c_4 \sin(2x) ]\,](/wiki/images/math/4/1/d/41decdf619393bf80544a3482ad4460d.png)
![y_p'= A e^{-x} [ -c_3 x \cos(2x) -2 c_3 x \sin(2x) + (c_3+2c_4) \cos(2x) - c_4 \sin(2x) ]\,](/wiki/images/math/e/d/a/eda8927752ce3b541808dbac583069e5.png)
![y_p''=A e^{-x} [ 2 c_3 x \sin(2x) -c_3 \cos(2x) -4 c_3 x \cos(2x) -2 c_3 \sin(2x) -2(c_3+2c_4)\sin(2x) -2c_4\cos(2x) ] \,](/wiki/images/math/a/5/7/a574813af5fcf38baf14990102bccb36.png)
![-A e^{-x}[ -c_3 x \cos(2x) -2 c_3 x \sin(2x) + (c_3+2c_4) \cos(2x) - c_4 \sin(2x) ]\,](/wiki/images/math/3/4/5/345b0e00cd82aac596d9822c1b322f4c.png)
![y_p''=A e^{-x} [ -3 c_3 x \cos(2x) + 4 c_3 x \sin(2x) + (-2c_3 -4c_4)\cos(2x) + (-4c_3-3c_4)\sin(2x) ] = e^{-x} \sin(2x)\,](/wiki/images/math/5/4/b/54bf487854838fa5df732ffce8359354.png)
Substitute these derivatives into the original DE to get these relations:

![(-c_3-2c_4-c_3-2c_4+2c_3+4c_4) \cos(2x) + (-4c_3-4c_4+c_4-2c_4+5c_4) \sin(2x) ]\,](/wiki/images/math/0/2/0/02017060f8e04863add4f81a2c9e0adc.png)
So comparing the coefficients of xsin(2x) and xcos(2x) gives no information about c3 except that it is arbitrary so far. The other terms give the relations
so that
, and
c4 is arbitrary, so that the particular solution is
![y_p = e^{-x} [ -\frac{1}{4} x \cos(2x) + c_4 \sin(2x) ]\,](/wiki/images/math/b/6/e/b6e17aeecf61bee4843f128fdc50017b.png)
Finally, the general solution is
