What is the general solution of the differential equation? : #y''+4y=2sin2x#

2 Answers
May 27, 2018

The general solution is #y=c_1cos(2x)+c_2sin(2x)-1/2xcos2x#

Explanation:

#y''+4y=2sin(2x)#

This is a second order linear, non-homogenous ODE.

The general solution can be written as

#y=y_h+y_p#

Find #y_h# by solving

#y''+4y=0#

Solve the caracteristic equation

#r^2+4=0#

#r=+-2i# where #i^2=-1#

The solution is

#y_h=c_1cos(2x)+c_2sin(2x)#

Find a particular solution of the form

#y_p=a_0xsin2x+a_1xcos2x#

#y_p'=2a_0xcos2x+a_0sin2x-2a_1xsin2x+a_1cos2x#

#y_p''=-4a_0xsin2x+2a_0cos2x+2a_0cos2x-4a_1xcos2x-2a_1sin2x-2a_1sin2x#

#=-4a_0xsin2x+4a_0cos2x-4a_1xcos2x-4a_1sin2x#

Plugging those values in the ODE

#y''+4y=2sin(2x)#

#-4a_0xsin2x+4a_0cos2x-4a_1xcos2x-4a_1sin2x+4(a_0xsin2x+a_1xcos2x)=2sin2x#

#-4a_0xsin2x+4a_0cos2x-4a_1xcos2x-4a_1sin2x+4a_0xsin2x+4a_1xcos2x=2sin2x#

#4a_0cos2x-4a_1sin2x=2sin2x#

#<=>#, #{(a_0=0),(a_1=-1/2):}#

#y_p=-1/2xcos2x#

The general solution is #y=c_1cos(2x)+c_2sin(2x)-1/2xcos2x#

May 27, 2018

# y(x) = Acos(2x)+Bsin(2x) -1/2xcos(2x) #

Explanation:

We have:

# y'' + 4y=2sin2x# ..... [A]

This is a second order non-Homogeneous Differentiation Equation. The standard approach is to find a solution, #y_c# of the homogeneous equation by looking at the Auxiliary Equation, which is the quadratic equation with the coefficients of the derivatives, and then finding an independent particular solution, #y_p# of the non-homogeneous equation.

Complementary Function

The homogeneous equation associated with [A] is

# y''+4y= 0 #

And it's associated Auxiliary equation is:

# m^2+4 = 0 #

Which has two pure imaginary solutions #m = +-2i#

Thus the solution of the homogeneous equation is:

# y_c = e^(0x){Acos(2x)+Bsin(2x)} #
# \ \ \ = Acos(2x)+Bsin(2x) #

Particular Solution

With this particular equation [A], a probable solution is of the form:

# y = acos(2x)+bsin(2x) #

Where #a# and #b# are constants to be determined by substitution. However, this solution is part of #y_c#, thus we seek an alternate independant solution of the form:

# y = axcos(2x)+bxsin(2x) #

Let us assume the above solution works, in which case be differentiating wrt #x# we have:

# y' \ \= (b-2ax)sin2x+(2bx+a)cos2x#
# y'' = -4(ax-b)cos2x-4(bx+a)sin2x #

Substituting into the initial Differential Equation #[A]# we get:

# {-4(ax-b)cos2x-4(bx+a)sin2x} + 4{axcos(2x)+bxsin(2x)} = 2sin2x #

Equating coefficients of #cos(2x)# and #sin(2x)# we get:

#cos(2x): 4b = 0 => b =0#
#sin(2x): -4a=2 => a=-1/2 #

And so we form the Particular solution:

# y_p = -1/2xcos(2x) #

General Solution

Which then leads to the GS of [A}

# y(x) = y_c + y_p #
# \ \ \ \ \ \ \ = Acos(2x)+Bsin(2x) -1/2xcos(2x) #