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 .
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
A_1 - 5A_1 + 6A_1 = 0 => A_1 = 0 is one solution to the quadratic (whoops, just realized this)
4A_1 + A_0 - 10A_1 - 5A_0 + 6A_0 = 1 , and ifA_1 = 0 , then:
A_0 = 1/2
Constant terms:
2 Answers
The solution
The complete solution can be composed as the addition of a particular solution plus the homogeneous solution. The homogeneous solution has the structure
as can be easily verified, so the complete solution is
I'll use
The problem is you are trying the wrong solution you have
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
A-5A+6A=1=>2A=1=>A=1/2
Compare coefficients of
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