# Thread: Help with a basic equation

1. ## Help with a basic equation

Hello everyone,
I need some help with the following ordinary differential equation:
y'=(2y-x)/(2x-y), and y(2)=3

and I also have to solve it for y(0)=0 and explain what happens exactly.

I'll appreciate any help.

2. Originally Posted by GIPC
Hello everyone,
I need some help with the following ordinary differential equation:
y'=(2y-x)/(2x-y), and y(2)=3

and I also have to solve it for y(0)=0 and explain what happens exactly.

I'll appreciate any help.
this is homogenious.

note that you have $\displaystyle \displaystyle \frac {dy}{dx} = \frac {2 \frac yx - 1}{2 - \frac yx}$

Let $\displaystyle \displaystyle v = \frac yx \implies y = vx \implies \frac {dy}{dx} = x \frac {dv}{dx} + v$

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

Now that equation is separable. continue...

3. let me see if I got it right.

I get
x*dv=(v^2-1)/(2-v) dx
I integrate both sides and get
x*v=[(v^2-1)/(2-v)]*x +C

using v=y/x
y=...=[y^2-x^2]/(2x^2-xy) + C

now what do I do from here?

4. Originally Posted by GIPC
let me see if I got it right.

I get
x*dv=(v^2-1)/(2-v) dx
I integrate both sides and get
x*v=[(v^2-1)/(2-v)]*x +C

using v=y/x
y=...=[y^2-x^2]/(2x^2-xy) + C

now what do I do from here?
you can't integrate like that!

It is a separable equation, meaning, you have to separate the variables. Only x's should be on one side, and only v's on the other. this includes the dx and dv

we reverse the sides and get
(2-v)/(v^2-1) dv = dx/x
integrate and get
1/2[ln(1-v) - 3ln(v+1)]= lnx +C
so
ln[(1-y/x)/(y/x+1)^3]=2lnx+2c
(1-y/x)/[(y/x+1)^3]=x*e^2c

what shoud i do from here?

6. Originally Posted by GIPC

we reverse the sides and get
(2-v)/(v^2-1) dv = dx/x
integrate and get
1/2[ln(1-v) - 3ln(v+1)]= lnx +C
so
ln[(1-y/x)/(y/x+1)^3]=2lnx+2c
(1-y/x)/[(y/x+1)^3]=x*e^2c

what shoud i do from here?
Lets take it from $\displaystyle \displaystyle \ln \left| \frac {v - 1}{(v + 1)^3} \right| = 2 \ln |x| + C = 2 \ln |Ax| = \ln (Ax)^2$

Then we have

$\displaystyle \displaystyle \frac {v - 1}{(v + 1)^3} = (Ax)^2$

$\displaystyle \displaystyle \Rightarrow \frac {\frac yx - 1}{\left( \frac yx + 1 \right)^3} = (Ax)^2$

multiply the left side by $\displaystyle \displaystyle \frac {x^3}{x^3}$ to get

$\displaystyle \displaystyle \frac {x^2y - x^3}{(y + x)^3} = (Ax)^2$

divide both sides by $\displaystyle \displaystyle x^2$ to get

$\displaystyle \displaystyle \frac {y - x}{(y + x)^3} = A^2$

Plug in your initial data: $\displaystyle \displaystyle y(2) = 3$ and solve for $\displaystyle \displaystyle A$. you end up with

$\displaystyle \displaystyle \frac {y - x}{(y + x)^3} = \frac 1{125}$