# Homogenous ode problem

1. Sep 5, 2009

### Mechdude

1. The problem statement, all variables and given/known data
this i a problem on homogeneous ode given as an exercise in class
$$\frac {dy} {dx} = \frac {2xy} {x^2+y^2}$$
im supposed to find the solution,
2. Relevant equations
substitute $$v= \frac {y} {x}$$
do it as a homogeneous ode and on and on

3. The attempt at a solution
i worked all the way to this point
$$\int \frac {dv} {dx} = \int \frac {v+v^3} {1+v^2}$$ after the trivial substitution for homogeneous odes and stuff $v= \frac {y} {x}$
which then i tried separation of variables on it,
$$\int \frac {1+v^2} {v+v^3}dv = \int \frac {dx} {x}$$
the right side is trivial so i will not continue to blabber about it,
now separating the left into two equations ;
$$\int \frac {1} {v+v^3} dv +\int \frac{v^2} {v+v^3} dv =...$$
the first integral there has me stumped the second well seems doable by substitution, unless its more deceptive than i think since i got an ans of $\frac {1} {2} \ln (1+v^2)$ after doing the substitution $u=1+v^2$ , who can help me with that first integral $\int \frac {1} {v+v^3} dv$ ?

Last edited: Sep 5, 2009
2. Sep 5, 2009

### Hootenanny

Staff Emeritus
Welcome to Physics Forums.

For your first integral, try taking a factor of v out of the denominator and then using the substitution v = tan(theta).

3. Sep 5, 2009

thanks man,

4. Sep 5, 2009

### HallsofIvy

Yes, but why? In addition to being "homogeneous", that de is separable and it is easier doing it that way. In fact, it is probably a good idea to recognize immediately that, for $x\ne 0$,
$$\frac{2xy}{x+ x^3}= \frac{2y}{1+ x^2}$$

So this "separates" as
$$\frac{dy}{y}= 2\frac{dx}{x^2+ 1}$$
and both sides are easy to integrate.

5. Sep 5, 2009

### Mechdude

because its a class exercise for the method :) , and i realize i wrote the wrong question but the working for the right question so here is the correct question $$\frac{dx}{dy}=\frac{2xy} {x^2+y^2}$$ i will correct the posting too

6. Sep 5, 2009

### Mechdude

is this what you mean? : $$\frac{1}{v(1+v^2)}$$ and substituting $v=tan(\theta)$
$$dv= tan^2(\theta) + 1$$ now we have $$\int \frac{tan^2(\theta) + 1 }{tan\theta (1 + tan^2 (\theta))} d\theta$$ after cancelling :
$$\int \frac {d\theta} {tan(\theta)}$$ but tan is identical to $\frac{sin}{cos}$ using $u=sin(\theta)$ we got now: $$\int \frac{du} {u}$$ and the grand finale $$\ln(sin(\theta))$$

7. Sep 5, 2009

### Hootenanny

Staff Emeritus
That is indeed what I mean. However, you should note that this integral no longer applies to your "corrected" question.

8. Sep 5, 2009

### Mechdude

why? The working i gave was for the corrected question , not the first erroneous one

9. Sep 5, 2009

### Hootenanny

Staff Emeritus

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

and substituting y=vx yields,

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

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

$$\int\frac{1+v^2}{v\left(1-v^2\right)}\;dv = \int\frac{dx}{x}$$

Which does not match your integrals. It seems that you have dropped a sign.

10. Sep 6, 2009

### Mechdude

thanks, my signs need some more work,
from here is this how this would be done: $$\int\frac{1}{v\left(1-v^2\right)}\;dv$$
let $v= sin\theta$ , $dv= cos\theta d\theta$ and we have,
$$\int \frac {cos\theta}{sin\theta cos^2 \theta }d\theta$$
eventually
$$2\int \frac {1}{sin2\theta}d\theta$$ and
$$2\int csc2\theta d\theta$$

11. Sep 6, 2009

### Hootenanny

Staff Emeritus
From here
note that

$$\sin2\theta = \frac{2\tan\theta}{1+tan^2\theta} = \frac{2\tan\theta}{\sec^2\theta}$$

Hence,

$$2\int \frac {1}{sin2\theta}d\theta = \int\frac{\sec^2\theta}{\tan\theta}d\theta$$

And note that,

$$\frac{d}{d\theta}\tan\theta = \sec^2\theta$$

From here, your integral is trivial.

12. Sep 6, 2009

### ehild

$$\frac{1+v^2}{v\left(1-v^2\right)}\ = \frac{1}{v}+\frac{1}{1-v}-\frac{1}{1+v}$$

ehild

13. Sep 7, 2009

### Mechdude

Thanks, i get the method now