# Solve the differential equation by using CF and PI : #(D^2-D-2)y=cos 2x# ?

##### 1 Answer

# y(x) = Ae^(-x)+Be(2x) -3/20cos2x-1/20sin2x #

#### Explanation:

We have:

# (D^2-D-2)y = cos2x # ..... [A]

Writing in standard form:

# y'' - y' - 2y = cos2x #

This is a second order non-Homogeneous Differentiation Equation. The standard approach is to find a solution,

**Complementary Function**

The homogeneous equation associated with [A] is

# y'' - y' - 2y = 0 #

And it's associated Auxiliary equation is:

# m^2 -m - 2 = 0 => (m+1)(m-2) = 0#

Which has two real and distinct solutions

The roots of the auxiliary equation determine parts of the solution, which if linearly independent then the superposition of the solutions form the full general solution.

- Real distinct roots
#m=alpha,beta, ...# will yield linearly independent solutions of the form#y_1=Ae^(alphax)# ,#y_2=Be^(betax)# , ... - Real repeated roots
#m=alpha# , will yield a solution of the form#y=(Ax+B)e^(alphax)# where the polynomial has the same degree as the repeat. - Complex roots (which must occur as conjugate pairs)
#m=p+-qi# will yield a pairs linearly independent solutions of the form# y=e^(px)(Acos(qx)+Bsin(qx))#

Thus the solution of the homogeneous equation [A] is:

# y = Ae^(-x)+Be(2x) #

**Particular Solution**

In order to find a particular solution of the non-homogeneous equation:

# y'' - y' - 2y = f(x) \ \ # with#f(x) = cos2x #

So, we should probably look for a solution of the form:

# y = acos2x+bsin2x # ..... [B]

Where the constants

Differentiating [B] wrt

# y^((1)) = -2asin2x+2bcos2x #

# y^((2)) = -4acos2x-4bsin2x #

Substituting these results into the DE [A] we get:

# (-4acos2x-4bsin2x) - (-2asin2x+2bcos2x) - 2(acos2x+bsin2x) = cos2x #

# :. -4acos2x - 4bsin2x + 2asin2x-2bcos2x - 2acos2x-2bsin2x = cos2x #

# :. (-4a-2b- 2a)cos2x + (-4b+2a-2b)sin2x = cos2x #

# :. (-6a-2b)cos2x + (-6b+2a)sin2x cos2x = cos2x #

Equating coefficients we get:

# cos2x: -6a-2b = 1 #

# sin2x: 6b+2a=0 #

And solving these equations simultaneously, we obtain:

# a=-3/20# and#b=-1/20#

And so we form the Particular solution:

# y_p = -3/20cos2x-1/20sin2x # ..... [B]

**General Solution**

Which then leads to the GS of [A}

# y(x) = y_c + y_p #

# \ \ \ \ \ \ \ = Ae^(-x)+Be(2x) -3/20cos2x-1/20sin2x #

Note this solution has