# Nonhomogeneous with constant coefficients equation

1. Oct 30, 2008

### Nok1

y'' - 3y' + 2y = et + t2

r = 1, 2 -> yc = c1et+c2e2t

yp1 = Atet since Aet is a linear combination of our solution to yc.

yp2 = At2+Bt+C
y'p2 = 2At+B
y''p2 = 2A

via substitution we have

2A-3(2At+B)+2(At2+Bt+C) = t2

by isolating terms:

• 2At2 = t2
2A = 1 -> A = 1/2
• -6At + 2Bt = 0
2B=3 -> B = 3/2
• 2A-3B+2C = 0
1 - 9/2 + 2C = 0 -> C = -3.5/2

ygeneral= yc+yp1+yp2

Question 1: How do I determine the A for the Atet term? same way?
Question 2: Can anyone confirm that I am doing the problem correctly, or am on the right track at all?

Thanks

2. Oct 30, 2008

### Office_Shredder

Staff Emeritus
You're almost there, but you should solve for yp1 and yp2 as one function, not two.

You have a linear equation in y, so if you find yc which is the general solution of the homogenous equation, you only need to find one yp which is a solution to your non-homogenous equation. Then your general solution will be of the form yp + yc. Since you have a t2 and an et we would guess that yp has t2 and et terms in it. Looking at the equation, you realize that once you take the derivative of t2 you have some t terms that you need to cancel, so you should probably include a t in your yp guess. Similarly for a constant term. Also, et is in the homogenous solution, so you know that part will disappear. So you guess you need a tet instead. Thus your guess for yp will be

yp = Atet + Bt2 + Ct + D

This looks what you would have for yp1 + yp2 so you were doing this in a sideways fashion, but got a bit lost in the process. So exactly as you did for yp2 you plug your yp into your differential equation, and you collect terms. You'll get a coefficient times tet in terms of A,B,C and D that needs to be zero, a coefficient in front of et in terms of A,B,C,D that needs to be 1, a coefficient in front of t2 that needs to be 1, a coefficient in front of t that needs to be 0 and a constant coefficient that needs to be 0. Solve the system of equations (if more than one solution exists, just pick any one since it doesn't make a difference)

3. Oct 30, 2008

### Nok1

It shouldn't matter in the end, as it should come out to be the same? I mean, yp=yp1+yp2 right? The reason I'm splitting it appart is because it's easier to solve for (for me at least) than when everything is combined. But yeah, y=yc+yp

So I guess the correct answer continue something like this:
Solving for yp1:
yp1=Atet
y'p1=Atet+Aet
y''p1=Atet+2Aet

• Atet+2Aet-3(Atet+Aet)+2(Atet)=et (which is trivial to solve)
Atet-3Atet+2Atet = 0
0=0 heh.
• 2Aet-3Aet=et
-1A = 1 -> A = -1

So then using that,
yp=-tet+1/2t2+3/2t-3.5/2

Which means that the General solution is:
ygeneral=c1et+c2e2t-tet+1/2t2+3/2t-3.5/2

4. Oct 31, 2008

### HallsofIvy

Staff Emeritus
It really doesn't matter whether you treat et+ t2 as a single function or as two separate functions.

You do the Atet exactly like the At2+ Bt+ C:

If y= Atet, then y'= Aet+ Atet and y"= 2Aet+ Atet. Putting those into the equation, y"- 3y'+ 2y= (2Aet+ Atet)- 3(Aet+ Atet)+ 2(Atet)= -3Aet. The terms involving a multiplication by t have cancelled just as we would expect. -Aet= et so A= -1. y= -tet is a particular solution.

5. Nov 8, 2008

### Nok1

Thank you very much for your help :).