# variation of parameters - worked out 2 solutions, but diff answers!Watch

Announcements
#1
Use variation of parameters to determine the general solution of the differential equation:

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...

Method 1

Finding two functions c1(x) and c2(x) that satisfy:

c1' y1 + c2' y2 = 0
c1' y1' + c2' y2' = exp(x)

or

c1' x + c2' (1/x) = 0
c1' - c2' (1/x²) = exp(x)

Then

c1'(x) = (1/2) exp(x), and c1(x) = (1/2) exp(x)

and

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)

Method 2

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?

0
11 years ago
#2
Surely you are perfectly capable of substituting both of your answers into the original DE to see which one actually works?
0
#3
Thanks DFranklin, I only thought you could do that with solutions. So I've checked this and realised the first one is right...but I still can't see whats wrong with the second method and this is the one I prefer by far, is it most likely that I've made a mistake in the integration by parts?

Cheers again!
0
11 years ago
#4
Vague memory: don't you need the coefficient of to be 1 for your second method?

Edit (and so you should divide through by x^2, so your f(x) is just e^x, not x^2 e^x).
0
#5
Ahhhhhh thank you, that makes much more sense!

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?!?!?
0
11 years ago
#6
I confess I'm not seeing the mistake, but I've never actually been taught this, so I'm having to trust your equations.

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.
0
11 years ago
#7
You have y[suffix 1] = 1/x and y[suffix 2] = x.
Hence the Wronskian = [1/x][1] -[x][-1/x^2] = 1/x + 1/x = 2/x.
I reckon that you got the sign wrong when you worked this out.
0
X

new posts
Back
to top
Latest
My Feed

### Oops, nobody has postedin the last few hours.

Why not re-start the conversation?

see more

### See more of what you like onThe Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

### University open days

• University of East Anglia
Sun, 20 Oct '19
• University for the Creative Arts
Sun, 20 Oct '19
• University of Gloucestershire
Sun, 20 Oct '19

### Poll

Join the discussion

Yes I know where I'm applying (86)
68.8%
No I haven't decided yet (23)
18.4%
Yes but I might change my mind (16)
12.8%