# Math Help - Have I got this nonhomogeneous q right?

1. ## Have I got this nonhomogeneous q right?

Not sure about this one, a quick check would be appreciated and a bit of help as to where I've gone wrong if it's not right... a friend got a different answer so I'm questioning my own.

$y''(x) - 2y'(x) - 3y(x) = x^3$ subject to y(0) = 1 and y'(0) = -1

I got $y(x) = -e^{-x} + \frac{14}{27}e^{3x} - \frac{1}{3}x^3 + \frac{2}{3}x^2 - \frac{14}{9}x + \frac{40}{27}$

Testing y(0) there does get me 1 so it seems right to me...

2. Originally Posted by 0renji
Not sure about this one, a quick check would be appreciated and a bit of help as to where I've gone wrong if it's not right... a friend got a different answer so I'm questioning my own.

$y''(x) - 2y'(x) - 3y(x) = x^3$ subject to y(0) = 1 and y'(0) = -1

I got $y(x) = -e^{-x} + \frac{14}{27}e^{3x} - \frac{2}{3}x^3 + \frac{2}{3}x^2 - \frac{14}{9}x + \frac{40}{27}$

Testing y(0) there does get me 1 so it seems right to me...
Your homogenous solution looks OK. Does the particular solution work when you substitute into the DE? If so, then you have the correct answer.

3. Just tried it out with x = 3 and indeed the result was 27 (I tried with 2 at first and the answer came out wrong but I think that was just a calculation mistake). I will take great delight in telling my friend he is wrong and I am right. Hahaha.

4. I think there's a problem here. If you want the solution subject to the following IC's, $y(0)=1,\;\;y'(0)=1$, then the solution you give is right (with a slight change- should be $- \frac{1}{3}x^3$). However, if you want the solution with the IC's you give $y(0)=1,\;\;y'(0)=-1$, I believe the correct solution is

$
y(x) = -\frac{1}{2}e^{-x} + \frac{1}{54}e^{3x} - \frac{1}{3}x^3 + \frac{2}{3}x^2 - \frac{14}{9}x + \frac{40}{27}$

5. Originally Posted by danny arrigo
I think there's a problem here. If you want the solution subject to the following IC's, $y(0)=1,\;\;y'(0)=1$, then the solution you give is right (with a slight change- should be $- \frac{1}{3}x^3$). However, if you want the solution with the IC's you give $y(0)=1,\;\;y'(0)=-1$, I believe the correct solution is

$
y(x) = -\frac{1}{2}e^{-x} + \frac{1}{54}e^{3x} - \frac{1}{3}x^3 + \frac{2}{3}x^2 - \frac{14}{9}x + \frac{40}{27}$
You're right, $-\frac{2}{3}x^3$ was a typo which I corrected in the first post eventually, and my y'(0) does come out to 1. Oops. No idea how I missed that. Thanks for the help, I'll go back and see where I went wrong when I worked it out...

edit: Ah, I missed a negative sign when working out y'(0)... stupid mistake heh. All fixed now.