# Undetermined coefficients + initial value problem

1. Feb 7, 2008

### becca4

1. The problem statement, all variables and given/known data
Find solution for y'' + y' -2y = 2x with initial values of y(0) = 0, y'(0) = 1

2. Relevant equations
I have found yc = c1*exp(-2x) + c2*exp(x), but finding yp is what I'm having trouble with... AND THEN I'm not so sure how to go about the initial value.

3. The attempt at a solution
Ok, so my "reasonable assumption" :
yp = Ax
y'p = A
y''p= 0

When I plug into equation, I get:
0 + A -2(Ax) = 2x... and that's where I'm stuck.

Any insights?

2. Feb 7, 2008

### EnumaElish

Is yc the general solution and yp the particular?

If so, shouldn't you be using the initial conditions to solve for c1 and c2?

Last edited: Feb 7, 2008
3. Feb 7, 2008

### becca4

Edit: general solution y = yc + yp.

Does that help?

My strategy is to find the yc part of the general y solution, pretending like the left side of the original eqn is equal to zero. Then to find yp I'm supposed to make a reasonable assumption to find it. All parts of yc and yp must be linearly independent, so yp must be in a similar form of the right side of the original equation. So, I take yp, take 1st and 2nd derivatives and see if whatever I get agrees with 2x. Then when i find what yp is, I add it to yc.

4. Feb 7, 2008

### Dick

Your "reasonable assumption" is reasonable, but not general enough. Try yp=Ax+B.

5. Feb 7, 2008

### HallsofIvy

Staff Emeritus
In general, for a RHS of xn, you will need yp= Axn+ Bxn-1+ Cxn-2 . . .

6. Feb 7, 2008

### becca4

Ahhh... Clever.

7. Feb 7, 2008

### becca4

It worked! Thanks much!!

Now with the initial values:
I have my general solution y = c1*exp(-2x) + c2*exp(x) -x -1/2

All I'll do to find c1 and c2 is use y(0)=0 in that equation, then take its derivative and use the y'(0)=1, that's the way to go, correct?

Last edited: Feb 7, 2008
8. Feb 7, 2008

Gotcha.