# Solving differential equations.

1. Oct 6, 2012

### Zondrina

1. The problem statement, all variables and given/known data

I came across two, not so obvious DEs that have stumped me abit.

(1) x2y' = xy + x2ey/x
(2) x2y' + 2xy = 5y3

2. Relevant equations

I know these are not separable, and more than likely require an integrating factor to put them into exact form so I can integrate them that way.

3. The attempt at a solution

I'm sort of stuck on both of them.

For (1) I divided through by x2 to get y' = y/x + ey/x which further yields y' - y/x = ey/x which is sadly implicit in nature and not solvable by means of a regular integrating factor.

Its the same for (2), once again I divide through by x2 to attain y' + (2/x)y = 5y3/x2 which is once again implicit and not solvable by regular means.

I know I probably need to put these into exact form somehow, but I'm having trouble putting them into the form :

$M(x, y) + N(x, y) \frac{dy}{dx} = 0$ So I can solve for an integrating factor $\mu (x)$ which satisfies :

$$\frac{\frac{∂M(x, y)}{∂y} - \frac{∂N(x, y)}{∂x}}{N(x, y)} = \frac{d\mu}{dx}$$

2. Oct 7, 2012

### rock.freak667

For the first one, try a substitution of y=Vx.

3. Oct 7, 2012

### voko

For the second one, observe x^2y' + 2xy = (x^2y)'.

4. Oct 7, 2012

### Zondrina

I didn't know what substitution was, but I learned it quickly and I managed to get the solution to the first equation to be :

-e-y/x = ln|x| + c which I decided to obviously leave implicit as no real solutions of y would exist.

As for the second equation, voko you mentioned I could re-write this as :

d/dx [x2y] = 5y3 I'm not sure how this would help though?

5. Oct 7, 2012

### voko

What is in square brackets is another function u(x). Can you express y via x and u?

Speaking of the first one, consider the case when c is a large negative constant.

6. Oct 7, 2012

### Zondrina

So for the first one I COULD re-write it as :

y = xln|d-ln|x|| where d is some arbitrary constant ( I get d after some arithmetic ).

As for the second one, are you hinting that a substitution v(x) = x2y which simplifies to x-2v(x) = y is what I need here?

7. Oct 7, 2012

### voko

For the first one, I think it should be y = -x ln...

The second one, try :)

8. Oct 7, 2012

### Zondrina

For the first one when I integrate and sub back m obvious choice of v = y/x I get :

-e^-y/x = ln|x| + c
e^-y/x = d - ln|x|
-y/x = ln|d - ln|x||
y = -xln|d-ln|x||

I c wut u did thur.

As for the second one I get the answer as : y = ±$\sqrt{\frac{x}{2} + c}$

I think that's good?

9. Oct 7, 2012

### voko

I do not think the second result is correct. Please show your steps.

10. Oct 7, 2012

### Zondrina

x2y' + 2xy = 5y3
d/dx [x2y] = 5y3

Substituting v = x2y yields :

dv/dx = 5y3

Also notice that y = vx-2 so :

dv/dx = 5(vx-2)3
dv/dx = 5v3x-6

Separating variables and integrating gives us :

-(1/2v2) = -x-5 + c

Subbing back v = x2y and simplifying :

-(1/2(x2y)2 = -x-5 + c
2x4y2 = x5+c
y2 = x/2 + c/x4
y = ±$\sqrt{\frac{x}{2} + \frac{c}{x^4}}$

I really should write my steps out haha.

11. Oct 7, 2012

### voko

Good so far.

Wrong, both the LHS and the RHS.

12. Oct 7, 2012

### Zondrina

Oh snap, silly mistake. I should also stop rushing when showing my work.

-(1/2(x2y)2) = -x-5 + c
1/(2x4y2) = x-5 - c
2x4y2 = 1/(x-5-c)
y2 = 1/(2x4(x-5-c))

y = ±$\sqrt{\frac{1}{2x^4(x^{-5}-c)}}$

13. Oct 7, 2012

### voko

That's better :) To be completely sure, you could try and plug that into the original equation.

14. Oct 7, 2012

### Zondrina

Yup it works perfectly. Although I DO have a technicality question out of my own curiosity.

Say I was given an initial condition y(x0) = y0.

If y0 > 0, then the solution corresponds to the positive portion of y.

If y0 < 0, then the solution corresponds to the negative portion of y.

Now if y0 = 0, I'm not really sure what happens here? Which solution would I pick or would it never be the case that y0 = 0 because y is discontinuous there regardless of my choice. Seems logical, but some confirmation would be nice.

Thanks for all your help btw :)

15. Oct 7, 2012

### voko

y = 0 is a singular solution in this equation. It corresponds to an infinite c. Note the regular solutions approach it as x goes to zero.

16. Oct 7, 2012

### Zondrina

Ahh I see. That makes sense now, thank you.