Solve the Differential Equation #y'' - 4 y' + 4y = 2 e^(2x)#?

5 Answers
Mar 17, 2017

#y_g = e^(2 x) ( x^2 + 2 x + 1 ) #

Explanation:

Method of Undetermined Coefficients

Start with the homogeneous equation and the complementary solution :

#y'' - 4y' + 4y = 0#

This has characteristic equation:

#lambda^2 - 4lambda + 4 = 0 implies (lambda - 2)^2 = 0#

Repeated roots mean that, in lieu of the usual solution #y_c = alpha e^(lambda_1 x) + beta e^(lambda_2 x)#, we look here for a solution in the form:

#y_c = e^(2 x) ( alpha x + beta )#

And because the non-homogeneous equation already has a #e^(2x)# term, we must look at a particular solution in the form:

#y_p = gamma x^2 e^(2x) #
#implies y' = 2 gamma x e^(2x) + 2 gamma x^2 e^(2x)#
#implies y'' = 2 gamma e^(2x) + 8 gamma x e^(2x) + 4 gamma x^2 e^(2x)#

Putting these into the equation:

# 2 gamma e^(2x) + 8 gamma x e^(2x) + 4 gamma x^2 e^(2x) - 4 (2 gamma x e^(2x) + 2 gamma x^2 e^(2x)) + 4 gamma x^2 e^(2x) = 2 e^(2x)#

#implies gamma = 1 # and #y_p = x^2 e^(2x) #

The general solution is: #y_g = y_c + y_p#

#y_g = e^(2 x) ( alpha x + beta ) + x^2 e^(2x) #

#= e^(2 x) (x^2 + alpha x + beta ) #

Now applying the IV's:

#y(0) = 1 implies beta = 1 implies y_g = e^(2 x) (x^2 + alpha x + 1 ) #

#y' = 2 e^(2 x) (x^2 + alpha x + 1 ) + e^(2 x) (2 x + alpha )#

# = e^(2 x) (2x^2 + (2 alpha + 2) x + (2 + alpha) ) #

And from the second IV, #y'(0) = 4 implies alpha = 2 #

#y_g = e^(2 x) ( x^2 + 2 x + 1 ) #

Mar 17, 2017

The solution is #y(x)=(x+1)^2e^(2x)#

Explanation:

#y''-4y'+4y=2e^(2x)#

This is a second order linear, non-homogeneous differential equation.

The general solution can be written as

#y=y_p+y_h#

#y_h# is the solution to #y''-4y'+4y=0#

#y_p# is the particular solution

The caracteristic equation is

#r^2-4r+4=0#

#(r-2)^2=0#

We have a double root

The solution without the LHS is

#y_h=(Ax+B)e^(2x)#

For the particular solution, we try

#y_p=Cx^2e^(2x)#

#y'=C(2xe^(2x)+2x^2e^(2x))#

#y'=2Ce^(2x)(x+x^2)#

#y''=2C(2e^(2x)(x+x^2)+e^(2x)(1+2x))#

Putting these in the equation

#2C(2e^(2x)(x+x^2)+e^(2x)(1+2x))-4*2Ce^(2x)(x+x^2)+4*Cx^2e^(2x)=2e^(2x)#

#4Cx+4cx^2+2C+4Cx-8Cx-8Cx^2+4cx^2=2#

#C=1#

So, the particular solution is

#y_p=x^2e^(2x)#

The general solution is

#y=(Ax+B)e^(2x)+x^2e^(2x)#

#y(0)=B=1#

#y'=Ae^(2x)+2(Ax+B)e^(2x)+2xe^(2x)+2x^2e^(2x)#

#y'(0)=A+2B=4#

#A=4-2=2#

Finally, we have

#y(x)=(2x+1)e^(2x)+x^2e^(2x)#

#=e^(2x)(x^2+2x+1)#

#=(x+1)^2e^(2x)#

Mar 17, 2017

The two other solutions quite clearly demonstrate how to solve the complementary solution of the homogeneous equation.

# y'' - 4y' + 4y = 0 #

As this is fairly standard text book stuff which solves the Auxiliary equation to form a guaranteed solution based of the roots of the equation

The interesting part is find the solution of the particular function, and where did the magic "lets try" #y=Cx^2e^(2x)# come from?

Basically it is down to practice & experience but there is a solid method to find the particular solution using the Wronskian. It does, however, involve a lot more work:

Having established that the solution of the homogeneous equation is (see other answers):

# y_c = (Ax+B)e^(2x) #
# \ \ \ = Axe^(2x) + Be^(2x) #

The reason this form of solution works is that the two individual components #xe^(2x)# and #e^(2x)# are linearly independent.

Once we have two linearly independent solutions say #y_1(x)# and #y_2(x)# then the particular solution of the general DE;

# ay'' +by' + cy = p(x) #

is given by:

# y_p = v_1y_1 + v_2y_2 \ \ #, which are all functions of #x#

Where:

# v_1 = -int \ (p(x)y_2)/(W[y_1,y_2]) \ dx #
# v_2 = \ \ \ \ \ int \ (p(x)y_1)/(W[y_1,y_2]) \ dx #

And, #W[y_1,y_2]# is the wronskian; defined by the following determinant:

# W[y_1,y_2] = | ( y_1,y_2), (y'_1,y'_2) | #

So for our equation:

# p(x) = 2e^(2x) #
# y_1 \ \ \ = xe^(2x) => y'_1 = 2xe^(2x) + e^(2x) #
# y_2 \ \ \ = e^(2x) \ \ => y'_2 = 2e^(2x) #

So the wronskian for this equation is:

# W[y_1,y_2] = | ( xe^(2x),,e^(2x)), (2xe^(2x) + e^(2x),,2e^(2x)) | #
# " " = (xe^(2x))(2e^(2x)) -(e^(2x))(2xe^(2x) + e^(2x)) #
# " " = (e^(2x))(2xe^(2x) -2xe^(2x) - e^(2x)) #
# " " = -e^(4x) #

So we form the two particular solution function:

# v_1 = -int \ (p(x)y_2)/(W[y_1,y_2]) \ dx #
# \ \ \ = -int \ ((2e^(2x))(e^(2x)))/((-e^(4x))) \ dx #
# \ \ \ = int \ 2 \ dx #
# \ \ \ = 2x #

And;

# v_2 = \ \ \ \ \ int \ (p(x)y_1)/(W[y_1,y_2]) \ dx #
# \ \ \ = int \ ( (2e^(2x))(xe^(2x)) ) / (-e^(4x)) \ dx #
# \ \ \ = int \ -2x \ dx #
# \ \ \ = -x^2 #

And so we form the Particular solution:

# y_p = v_1y_1 + v_2y_2 #
# \ \ \ = (2x)(xe^(2x)) + (-x^2)(e^(2x)) #
# \ \ \ = e^(2x)(2x^2-x^2) #
# \ \ \ = x^2e^(2x) #

Which is the same particular solution as the other answers produced, leading to the general solution:

# y(x) = y_c + y_p #
# \ \ \ \ \ \ \ = Axe^(2x) + Be^(2x) + x^2e^(2x) #

Which then leads to the same specific solution of the other answers.

Mar 17, 2017

Another approach using the fact that #d/dx# is a linear operator.

Explanation:

Mary Boas teaches this in a way I not see very widely used, but which also obviates the need for the experienced guesswork.

If we note that #D = d/dx# is a linear operator, we can take the original equation and write it as this:

#y'' - 4 y' + 4y = 2 e^(2x)#

#implies D^2y - 4 D y + 4y = 2 e^(2x)#

#(D- 2)(D-2)y = 2 e^(2x)#

So it already looks like the eigenvalue form you'd get from a linear system, but is non-homogeneous. Then we can say that #z(x) = (D-2)y(x)# so we have this more trivial Integrating Factor problem:

#(D- 2)z = 2 e^(2x)#

#z'- 2z = 2 e^(2x)#

Integrating factor #=exp ( int -2 \ dx)#

#e^(-2x)(z'- 2z) = 2 e^(2x) e^(-2x)#

#(z e^(-2x))' = 2#

#z e^(-2x) = 2 x + alpha#

#(D-2)y = e^(2x) ( 2 x + alpha)#

#y'-2y = e^(2x) ( 2 x + alpha)#

(You can even apply the #y'(0) = 4# I.V. here (!!).)

So, it's another Integrating Factor: #=exp ( int -2 \ dx)#

#e^(-2x) (y'-2y) = 2 x + alpha#

#(e^(-2x) y)' = 2 x + alpha#

#e^(-2x) y = x^2 + alpha x + beta#

# y = e^(-2x)( x^2 + alpha x + beta )#

And then apply the IV's as before.

Boas is my personal favourite maths book, but it's for scientists, not mathematicians. But this is a real good way to go at repeated eigenvalues, which are tricky.

Mar 17, 2017

#y = e^(2x) (x+1)^2#

Explanation:

Laplace Transform

#y'' - 4 y' + 4y = 2 e^(2x)#

#p^2 Y - p y_o - y_0' - 4 (pY - y_o) + 4Y = 2 /(p-2)#

We have the IV's at #x = 0#, so:

#p^2 Y - p - 4 - 4 pY + 4 + 4Y = 2 /(p-2)#

#Y (p^2 - 4 p + 4) = p + 2 /(p-2)#

#Y = p/(p -2)^2 + 2 /(p-2)^3#

From Standard Tables, here using Mary Boas 3rd Ed, L6 and L18, pp469-470:

#y = e^(2x) (1 + 2x) + e^(2x) x^2#

#= e^(2x) (x+1)^2#