variation of parameters - worked out 2 solutions, but diff answers! Watch
x^2y'' +xy' - y = x^2e^x
I know the 2 independent solutions are y1 = x and y2 = 1/x, but I have tried 2 ways of doing this and got different answers...
Finding two functions c1(x) and c2(x) that satisfy:
c1' y1 + c2' y2 = 0
c1' y1' + c2' y2' = exp(x)
c1' x + c2' (1/x) = 0
c1' - c2' (1/x²) = exp(x)
c1'(x) = (1/2) exp(x), and c1(x) = (1/2) exp(x)
c2'(x) = -(x²/2) exp(x), and
c2(x) = [ -(x²/2) + x - 1] exp(x)
Therefore, a particular solution of the diff. eq. is
yp(x) = c1 y1 + c2 y2
= (1 - 1/x) exp(x)
I used the formula
Yp = -y1 int[(y2 f(x))/(W(y1,y2) dx + y2 int[(y1 f(x))/(W(y1,y2) dx
which gave -1/x int[-1/2x^4e^x] dx + x int[-1/2x^2e^x] dx
which turned out to give:
Yp = -x^2e^x + 5xe^x - 12e^x + 12/xe^x
So could anyone please tell me which is the correct way? And whichever one is wrong could you explain where the problem is?
Thanks in advance!
Edit (and so you should divide through by x^2, so your f(x) is just e^x, not x^2 e^x).
Still having one problem tho... after using this formula I end up with yp = -e^x +e^x/x but the signs should be the other way round...I've checked every inch of my work but can't see anything wrong!
First integral is:
-1/x int [ -1/2x^2 e^x] dx = 1/2x e^x - e^x + e^x/x
Second integral is:
x int [-1/2 e^x] dx = -1/2x e^x
Wheres the mistake?!?!?
P.S. It's about time you learned how to use LaTeX - you're a pretty regular poster, and it's very hard to follow your working given the way you typeset things.
Hence the Wronskian = [1/x] -[x][-1/x^2] = 1/x + 1/x = 2/x.
I reckon that you got the sign wrong when you worked this out.