# Thread: Help with a basic homogenous ODE

1. ## Help with a basic homogenous ODE

I'm having a bit of trouble with a homogeneous ODE:

$\frac{dy}{dx} = \frac{x^2 + 3y^2}{2xy}$

In order to solve this by substituting v = y/x, I first need to manipulate the right side to get all variables in the form of y/x. However, when I simplify it, I get:

$\frac{dy}{dx} = \frac{x}{2y} + \frac{3y}{2x}$

...which leaves each fraction opposite of the other. What am I missing?

2. So

$\frac{dy}{dx}=\frac{2}{v}+\frac{3v}{2}.$

The whole point is to get a separable equation, right? Of course, you need to get the derivative in terms of v and x.

[EDIT]: See below for a correction.

3. $\frac{2}{v}$ or $\frac{1}{2v}$ ?

In any case, if I go with the latter, then I can get things here:

$\frac{1}{x} dx = 2v + \frac{2}{3} \frac{1}{v} - \frac{1}{v} dv$

I integrate both sides, move things around, and I get:

$\frac{y^2}{x^2} - \frac{1}{3} ln \left\vert{} \frac{y}{x} \right\vert{} - ln \left\vert{} x \right\vert{} = c$

However, the book answer is:

$x^2 + y^2 - cx^3 = 0$

So, either I made some serious mistakes, or there's some algebra magic going on.

4. Originally Posted by Lancet
$\frac{2}{v}$ or $\frac{1}{2v}$ ?
The second - you're correct.

In any case, if I go with the latter, then I can get things here:

$\frac{1}{x} dx = 2v + \frac{2}{3} \frac{1}{v} - \frac{1}{v} dv$
This doesn't look right to me. I get

$\frac{dx}{x}=\frac{2v\,dv}{1+v^{2}}.$

Can you see how I got this? If so, carry this correction through and see what you get.

5. Originally Posted by Ackbeet

This doesn't look right to me.

Okay, I'll show the details, and maybe you can help me figure out where I went wrong...

$x \frac{dv}{dx} = \frac{1}{2v} + \frac{3}{2} v - v$

$\frac{1}{x} dx = 2v + \frac{2}{3} * \frac{1}{v} - \frac{1}{v} dv$

$\int \frac{1}{x} dx = \int 2v + \frac{2}{3} * \frac{1}{v} - \frac{1}{v} dv$

$ln \left\vert{} x \right\vert{} = v^2 + \frac{2}{3} ln \left\vert{} v \right\vert{} - ln \left\vert{} v \right\vert{} + c$

$ln \left\vert{} x \right\vert{} = v^2 - \frac{1}{3} ln \left\vert{} v \right\vert{} + c$

$\frac{y^2}{x^2} - \frac{1}{3} ln \left\vert{} \frac{y}{x} \right\vert{} - ln \left\vert{} x \right\vert{} = c$

6. Hmm. Maybe I didn't make myself clear. For your Post # 5, I think the very first equation is wrong. Could you please show me the steps before that equation?

7. Originally Posted by Ackbeet
Hmm. Maybe I didn't make myself clear. For your Post # 5, I think the very first equation is wrong. Could you please show me the steps before that equation?
Ah, definitely not what I thought you were referencing. No problem, here we go:

$\frac{dy}{dx} = \frac{x^2 + 3y^2}{2xy}$

$\frac{dy}{dx} = \frac{x^2}{2xy} + \frac{3y^2}{2xy}$

$\frac{dy}{dx} = \frac{x}{2y} + \frac{3y}{2x}$

$v + x \frac{dv}{dx} = \frac{x}{2xv} + \frac{3}{2} v$

$x \frac{dv}{dx} = \frac{1}{2v} + \frac{3}{2} v - v$

8. Originally Posted by Lancet
Ah, definitely not what I thought you were referencing. No problem, here we go:

$\frac{dy}{dx} = \frac{x^2 + 3y^2}{2xy}$

$\frac{dy}{dx} = \frac{x^2}{2xy} + \frac{3y^2}{2xy}$

$\frac{dy}{dx} = \frac{x}{2y} + \frac{3y}{2x}$

$v + x \frac{dv}{dx} = \frac{x}{2xv} + \frac{3}{2} v$

$x \frac{dv}{dx} = \frac{1}{2v} + \frac{3}{2} v - v$
Ok, I'm with you now. This last equation looks correct to me, now that I look at it some more.

From your previous post:

Originally Posted by Lancet
$x \frac{dv}{dx} = \frac{1}{2v} + \frac{3}{2} v - v$

$\frac{1}{x} dx = 2v + \frac{2}{3} * \frac{1}{v} - \frac{1}{v} dv$
Ok, here's the mistake: addition does not distribute over multiplication like that. You should do this instead:

$x \frac{dv}{dx} = \frac{1}{2v} + \frac{3}{2} v - v=\frac{1}{2v} + \frac{v}{2}$

$2x\,v'=\frac{1}{v}+v=\frac{1+v^{2}}{v}.$

Can you continue?

9. Originally Posted by Ackbeet

Ok, here's the mistake: addition does not distribute over multiplication like that. You should do this instead:

Ah! I'm not sure I was ever formally taught the trick of flipping numerators/denominators on both sides - I just picked it up, thus why this aspect of it was unknown to me. Thanks!

So, taking it from here, I now end up with:

$\frac{y^2}{x^2} - x + 1 = c$

Is that the same as the book answer I referenced earlier? Or did I make another mistake? I can't quite eyeball them as being identical, but that doesn't mean anything.

10. Originally Posted by Lancet
Ah! I'm not sure I was ever formally taught the trick of flipping numerators/denominators on both sides - I just picked it up, thus why this aspect of it was unknown to me. Thanks!

So, taking it from here, I now end up with:

$\frac{y^2}{x^2} - x + 1 = c$

Is that the same as the book answer I referenced earlier? Or did I make another mistake? I can't quite eyeball them as being identical, but that doesn't mean anything.
Your answer is much closer, but it's still not the same as the book's answer (which is also what I got). The main difference is the location of the arbitrary constant. Can you post your work again, please?

11. Originally Posted by Lancet
Ah! I'm not sure I was ever formally taught the trick of flipping numerators/denominators on both sides - I just picked it up, thus why this aspect of it was unknown to me. Thanks!

So, taking it from here, I now end up with:

$\frac{y^2}{x^2} - x + 1 = c$

Is that the same as the book answer I referenced earlier? Or did I make another mistake? I can't quite eyeball them as being identical, but that doesn't mean anything.
Your answer is much closer, but it's still not the same as the book's answer (which is also what I got). The main difference is the location of the arbitrary constant. Can you post your work again, please?

12. Originally Posted by Ackbeet
Your answer is much closer, but it's still not the same as the book's answer (which is also what I got). The main difference is the location of the arbitrary constant. Can you post your work again, please?
Sure:

$2x \frac{dv}{dx} = \frac{v^2 + 1}{v}$

$\frac{1}{2x} dx = \frac{v}{v^2 + 1} dv$

$\int \frac{1}{2x} dx = \int \frac{v}{v^2 + 1} dv$

$\frac{1}{2} ln \left\vert{} x \right\vert{} = \frac{1}{2} ln \left\vert{} v^2 + 1 \right\vert{} + c$

$ln \left\vert{} x \right\vert{} = ln \left\vert{} v^2 + 1 \right\vert{} + c$

$e^(ln \left\vert{} x \right\vert{}) = e^(ln \left\vert{} v^2 + 1 \right\vert{} + c)$

$x = v^2 + 1 + c$

$x = \frac{y^2}{x^2} + 1 + c$

$\frac{y^2}{x^2} - x + 1 = c$

13. Originally Posted by Lancet
Sure:

$2x \frac{dv}{dx} = \frac{v^2 + 1}{v}$

$\frac{1}{2x} dx = \frac{v}{v^2 + 1} dv$

$\int \frac{1}{2x} dx = \int \frac{v}{v^2 + 1} dv$

$\frac{1}{2} ln \left\vert{} x \right\vert{} = \frac{1}{2} ln \left\vert{} v^2 + 1 \right\vert{} + c$

$ln \left\vert{} x \right\vert{} = ln \left\vert{} v^2 + 1 \right\vert{} + c$

$e^(ln \left\vert{} x \right\vert{}) = e^(ln \left\vert{} v^2 + 1 \right\vert{} + c)$
The mistake occurs right here. Whenever you take the exponential of an expression such as x+c, the arbitrary constant, which was additive, becomes multiplicative:

$e^{x+C}=e^{C}e^{x}.$

You can redefine the arbitrary constant as $K=e^{C}$ to get $Ke^{x}.$

So, instead of

$x = v^2 + 1 + c,$
you should have gotten

$x=c(v^{2}+1).$

Incidentally, in order to get some larger expression to show up all in an exponent (or subscript), enclose it with curly braces thus: e^{x+y}.

14. Originally Posted by Ackbeet

The mistake occurs right here. Whenever you take the exponential of an expression such as x+c, the arbitrary constant, which was additive, becomes multiplicative:

Aha! Thank you, I understand where I went wrong now. With that correction, I can successfully obtain the correct answer. Whew! That was a small bear for me. Thanks for sticking with me through all of that and helping me understand where I was going wrong.

15. Originally Posted by Lancet
Aha! Thank you, I understand where I went wrong now. With that correction, I can successfully obtain the correct answer. Whew! That was a small bear for me. Thanks for sticking with me through all of that and helping me understand where I was going wrong.
You're very welcome. Have a good one!