# Yes another ODE *groan*

1. Nov 1, 2005

### Beer-monster

Okay, so I'm trying to work out a streamline of a 2D fluid, I apply the usual relation ship between the diffential and the flow velocities and get the following differential equation.
$$\frac {dy } {dy} = \frac {(y^2-x^2)} {2xy}$$
I know this is a homogeneous equation (the lecturer included that handy tip), so I try the substitustion y = xv. Play with the equation until I get end up with
$$\frac {dv} {dx} = -\frac {v} {2} - \frac {1} {v}$$
Which my best attempts to seperate gets me (note I should have thought about this tex stuff first )
$$\ln y = -\frac {y^2} {2x^2} + C$$
Which is not the given answer. Any idea where I'm going wrong. Is it my method of solving the equation? Or did I make the wrong substitution? Is the degree of the equation different from what I though (and what do they mean by degree anyway can anyone explain...I seem to have forgottten )
Thanks for any help
~Beery

Last edited: Nov 1, 2005
2. Nov 1, 2005

### NateTG

I think you might get a different result if you tried it again. I would guess that the problem is 'careless' errors in your algebra.

3. Nov 1, 2005

### saltydog

So y=xv and when I substitute that into the DE, I get:

$$(x^2v^2-x^2)dx-2x(xv)(xdv+vdx)=0$$

Can you simplify that down to:

$$(v^2-1-2v^2)dx-2xvdv=0$$

and then re-arrange it to:

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

?

4. Nov 2, 2005

### Beer-monster

Um sorta. The second part was a bit fiddly but I think I got there.
Your method is a little unfamilar took some sorting.
Subbing for y=xv and working through using the method I'm more familar with I get something similiar
$$\frac{dv}{dx} +v = \frac{(x^2v^2-x^2)}{2x^2v}$$
Cancelling for x^2

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

This is the bit I'm not sure about. I deduct v from both side then invert the whole thing to get.

$$\frac{1}{x} \frac{dx}{dv} = \frac{2v}{v^2 -1} - \frac {1}{v}$$
Which I'm not sure is correct (and I also -despite many attempts- never got the hang of partial fractions)
Does this make sense?

Last edited: Nov 2, 2005
5. Nov 2, 2005

### saltydog

Beer, not sure what you're doing. Seem to be missing an x in the first expression. That last step is not appropriate. This is the correct way:

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

so multiplying by 2xydx leads to:

$$2xydy=(y^2-x^2)dx$$

or:

$$(y^2-x^2)dx-(2xy)dy=0\quad\tag{1}$$

Now let y=xv so that:

$$dy=xdv+vdx$$

Now just substitute this and the expression y=xv into (1) to get:

$$(x^2v^2-x^2)dx-2x(xv)(xdv+vdx)=0$$

You can simplify this right? Then just divide by $x^2$ to obtain:

$$v^2dx-dx-2xvdv-2v^2dx=0$$

rearrage:

$$(v^2-1-2v^2)dx-2xvdv=0$$

divide by:

$$x(v^2-1-2v^2)$$

results in:

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

You can finish it. Please go through each step above by hand to make sure you understand it then since I did yours, you do this one:

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

Last edited: Nov 2, 2005
6. Nov 2, 2005

### Beer-monster

Well I tried your problem and my maths must be much suckier than I thought. I followed your method as best I could and got something stupid i.e.

$$-\frac{1}{3v} + v = \ln{x} + C$$

Which is probably miles off.

I probably chose the wrong substitution or divided by the wrong factor somewhere.

Times like these (when I spend a few hours on a problem and still can't solve it) I get quite stressed with myself.

*sigh*

7. Nov 3, 2005

### saltydog

Beer, sorry I take so long to get back with you. I seem to be on a different schedule as you. This is important:

Did you follow my example above in detail and understand every part of it? If so, can you then not look at my solution and solve the problem (up to the first order in v) by yourself? You can do that right? If not, where are you having problems? First get that one straight ok? Now for the second one:

Using y=xv, I get:

$$(x^2+3v^2x^2)(vdx+xdv)=x^2vdx$$

right?

Group them together:

$$x^2vdx+x^3dv+3v^3x^2dx+3v^2x^3dv=x^2vdx$$

divide by x^2:

$$vdx+xdv+3v^3dx+3v^2xdv=vdx$$

group the dv's and dx's:

$$(v+3v^3-v)dx+(x+3v^3x)dv=0$$

or:

$$3v^3dx+x(1+3v^2)dv=0$$

divide by:

$$x3v^3$$

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

Can you finish it?

Last edited: Nov 3, 2005
8. Nov 3, 2005

### Beer-monster

Yeah I tried it now and got the method, at first I wasn't quite sure how you got the divisions you did. But after trying it myself I got the same thing, but in more steps (slower but more intuitive for me).

My main problem then was the integration. Luckily it was tutorial session and my lecturer pointed out that the numerator was the differential of the denominator thus the integral was just the log of the denominator. That had honestly never occured to me

Don't you just hate it when the answer is really simple but your brain just never saw it *headdesks*:grumpy: ?

It was the same with your problem, I followed the method but couldn't solve the integral. Does the same apply, since the numerator is related to the differential of the denomonator, does that make the answer just the integral of the donminator.

Should I check for this whenever I get a similar function (i.e. an algebraic fraction I can't factorise)?

9. Nov 3, 2005

### saltydog

If the numerator is the differntial of the denominator that is correct. But that's not the case with the v's on the RHS of this:

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

right?

the differential of the denominator is $9v^2dv$

To integrate the first expression, I would just split the RHS up into two parts:

$$\frac{1+3v^2}{3v^3}=1/3v^{-3}+v^{-1}$$

thus we have:

$$\frac{dx}{x}+(1/3v^{-3}+v^{-1})dv=0$$

Integrating:

$$ln(x)+1/3(-1/2 v^{-2})+ln(v)=c$$

letting v=y/x:

$$ln(y/x)-\frac{x^2}{6y^2}=c-ln(x)$$

simplifying:

$$6y^2ln(y/c)=x^2$$

10. Nov 3, 2005

### Beer-monster

That had also occured to me but it didn't work with the previous on so I didn't think it would now. I'm such a dope.

Thanks so much for all your help Saltydog, now that I got that method, I hopefully won't be as helpless with these sorts of equations next time