For the nonhomogeneous equation, using the method of undetermined coefficients, the solution I got for #(d^2y)/(dx^2) - 5(dy)/(dx) + 6y = xe^x# is #y = (xe^x)/2 + (3e^x)/4#, but along the way I got two solutions for #A_1#?

NOTE: As usual, I figured it out a few minutes after I posted this. Oh well! Leaving it up for other people to see, then. :)


I was letting #y = x(A_1x + A_0)e^x#, and I got #(dy)/(dx) = [A_1x^2 + (2A_1 + A_0)x + A_0]e^x# and #(d^2y)/(dx^2) = [A_1x^2 + (4A_1 + A_0)x + 2A_1 + 2A_0]e^x#. When I solved for #A_0# and #A_1# however, I got:

#x^2# terms:

#A_1 - 5A_1 + 6A_1 = 0 => A_1 = 0# is one solution to the quadratic (whoops, just realized this)

#x# terms:

#4A_1 + A_0 - 10A_1 - 5A_0 + 6A_0 = 1#, and if #A_1 = 0#, then:

#A_0 = 1/2#

Constant terms:

#2A_1 + 2A_0 - 5A_0 = 0#, and if #A_1 ne 0#, then #A_1 = 3/2A_0 = 3/4#. So the result is indeed #y = (xe^x)/2 + (3e^x)/4#.

2 Answers
Jan 8, 2017

#(d^2y)/(dx^2) - 5(dy)/(dx) + 6y = xe^x# is a linear non-homogeneous differential equation.

The solution #y_p = (xe^x)/2 + (3e^x)/4 # is a particular solution for the differential equation.

The complete solution can be composed as the addition of a particular solution plus the homogeneous solution. The homogeneous solution has the structure

#y_h=C_1e^(2x)+C_2e^(3x)#

as can be easily verified, so the complete solution is

#y = y_h+y_p = C_1e^(2x)+C_2e^(3x)+ (xe^x)/2 + (3e^x)/4# without ambiguity in the #C_1,C_2# determination.

Jan 8, 2017

I'll use #A=A_0# and #B=A_1# to save typing

The problem is you are trying the wrong solution you have
#g(x)=(ax^2+b)e^x# and you should be trying #g(x)=(ax+b)e^x#

So for the PI we have:

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

#y'=(Ax + B)(e^x) + (A)(e^x)#
# \ \ \ \=(Ax + B)e^x + Ae^x#

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

Subs into the DE and we get:

#y''-5y'+6y=xe^x#

# :. {(Ax + B)e^x + 2Ae^x} -5{(Ax + B)e^x + Ae^x}+6{(Ax + B)e^x}=xe^x#

Compare coefficients of #xe^x#:

#A-5A+6A=1=>2A=1=>A=1/2#

Compare coefficients of #e^x#:

#B+2A-5B-5A+6B=0#
#2B-3A=0=>2B-3/2=0 =>B=+3/4#

So the PI should be:

#y=(1/2x +3/4)e^x#

The following link gives the full solution