# Solving a DE

1. Sep 22, 2011

### fluidistic

1. The problem statement, all variables and given/known data
I must solve $x^2y'+y^2=xyy'$.

2. Relevant equations
Not sure but I think that $f(tx,ty)=t^nf(x,y)$ could help.

3. The attempt at a solution
My first reflex was to define a new variable $z=y^2$ but I was stuck a few steps further.
So I checked out if it was homogeneous and I found out that yes it is, of order 2.
So I called a new variable $v=y/x$.
After some algebra, I reached $v(x)=Ae^{\int \frac{x^2-1}{x}dx}$ where A is a constant. Now to get y(x), I'd multiply v(x) by x.
I'm not asking if my result is correct (I might have made some errors but overall I think the method does work. I'll check the result tomorrow since it's already too late), rather if there's a nicer or faster way to solve the exercise.
What would you have done in order to solve the DE?

2. Sep 22, 2011

### flyingpig

I have absolutely no idea how you found it was exact and I have to leave soon.

My advice is to divide both sides by x^2 and see what you recognize. I have to sleep now my friend.

3. Sep 23, 2011

### icystrike

It is a homogenous equation. Therefore, it should be alright if you substitute v=y/x

4. Sep 23, 2011

### HallsofIvy

Staff Emeritus
Well, both flyingpig and icystrike tell you this equation is homogenous and recomend the substitution v= y/x. But your post says that is exactly what you did!

The only question is why you left
$$\int \frac{x^2- 1}{x}dx= \int x dx- \int\frac{dx}{x}$$
as an integral rather than actually integrating it!

5. Sep 23, 2011

### fluidistic

Thank you all guys, so my way was ok and it seems it's efficient.
Well I said "homogeneous", not exact. I guess you were tired like me. :)
I see. That's exactly what I've done so I'm happy it seems I'm grasping it.
Yes... about the integral, I was so tired that when I saw the quotient I didn't even think 1 s about solving the integral. Now that I look at it, it looks like a piece of cake.
Thanks once again guys, problem solved.

6. Sep 23, 2011

### fluidistic

Hmm I'm turning insane.
I reached $v(x)=\frac{C}{x}e^{\frac{x^2}{2}}$ which indeed satisfy the DE $x^2(xv'+v)+v^2x^2-x^2v(xv'+v)=0$ as it should.
Now to get y(x), I thought I simply had to multiply v(x) by x, but this didn't work.
If I do so, I reach $y(x)=Ce^{\frac{x^2}{2}}$. This doesn't satisfy the original DE... I really don't understand why.
The left hand side of the original DE becomes $x^3Ce^{\frac{x^2}{2}}+C^2e^{x^2}$. The right hand side (which should be equal to the left hand side but isn't) is $x^2C^2e^{x^2}$.

If you're interested in my y', it's $y'(x)=xCe^{\frac{x^2}{2}}$. I have no idea what's going on!

7. Oct 9, 2011

### fluidistic

Hey guys I still don't know what I did wrong. I posted my work in my last post and the answer doesn't satisfy the original DE...
On the other hand I attacked the problem by a friend's approach.
I divided the original DE by xy to get $y' \left ( 1 - \frac{x}{y} \right ) -\frac{y}{x}=0$. Then $y'=\frac{y}{x} \cdot \frac{1}{1-\frac{x}{y}}$ which is separable. I get the implicit solution for y: $\frac{y}{x}-\ln \left ( \frac{y}{x} \right )=\ln x+C$.
But I still haven't figured out my error(s) in my last post.