# Thread: Differential Equation : y/x substitution

1. ## Differential Equation : y/x substitution

Hey all,
I used a v = y/x substitution on this and I got a really weird looking answer so I just want to see how right or wrong I am.

Solve: (x^2 + 2y^2)dx + xydx = 0
v = y/x and dy/dx = v +x(dv/dx)
So: x(dv/dx) = (-1/v) - v
after integrating I get:
(-1/2)ln|1 + v^2| = ln(x) + C
subbing back gives
(1 + y^2/x^2)^2 = x + e^c

Can someone please check this work and then come up with an equation for y? I have an answer but it looks so weird I don't think its right. Thanks.

2. Originally Posted by pberardi
Hey all,
I used a v = y/x substitution on this and I got a really weird looking answer so I just want to see how right or wrong I am.

Solve: (x^2 + 2y^2)dx + xydx = 0 should this be a dy
v = y/x and dy/dx = v +x(dv/dx)
So: v + x(dv/dx) = (-1/v) - 2 v
after integrating I get:
(-1/2)ln|1 + v^2| = ln(x) + C
subbing back gives
(1 + y^2/x^2)^2 = x + e^c
should be (-1/2) and *
Can someone please check this work and then come up with an equation for y? I have an answer but it looks so weird I don't think its right. Thanks.
A couple of things. First, I think your missing some things - see the red above (there are some other mistakes after that also - in blue). Second, if you write out the equation like

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

you'll also notice it's Bernoulli.

3. ## (y/x) sub difEq corrections made...please help me finish?

Thanks Danny,
I have seen the errors and redid it. If you don't mind I would like to stay with the y/x sub instead of the Bernoulli sub since we have not yet covered them ok?

Solve: (x^2 + 2y^2)dx + xydy = 0
xydy = -(x^2 + 2y^2)dx
dy/dx = -(x/y) - (2y/x)

let v = y/x, y = vx, dy/dx = v + xdv/dx

v + x(dv/dx) = -(1/v) - 2v
please check algebra here:
x(dv/dx) = (-1-3v^2)/v
-vdv/(1+3v^2) = dx/x

with a u substitution I get
LHS: -(1/6)ln|1 + 3y^2/x^2|
So:
ln|1 + 3y^2/x^2| = -6ln|x| + C

Is this correct so far? Also please could you show me some skills on how to wrap this up correctly. Thanks so much.

4. Originally Posted by pberardi
Thanks Danny,
I have seen the errors and redid it. If you don't mind I would like to stay with the y/x sub instead of the Bernoulli sub since we have not yet covered them ok?

Solve: (x^2 + 2y^2)dx + xydy = 0
xydy = -(x^2 + 2y^2)dx
dy/dx = -(x/y) - (2y/x)

let v = y/x, y = vx, dy/dx = v + xdv/dx

v + x(dv/dx) = -(1/v) - 2v
please check algebra here:
x(dv/dx) = (-1-3v^2)/v
-vdv/(1+3v^2) = dx/x

with a u substitution I get
LHS: -(1/6)ln|1 + 3y^2/x^2|
So:
ln|1 + 3y^2/x^2| = -6ln|x| + C

Is this correct so far? Also please could you show me some skills on how to wrap this up correctly. Thanks so much.
Yes, then exponentiate

$1 + \frac{3 y^2}{x^2} = e^C e^{-6\ ln|x|} = \frac{c}{x^6}$

I've used the factor that $e^C$ is a constant so I called it c only and

$e^{-6\ ln|x|} = e^{\ln |x|^{-6}} = x^{-6}$

5. ## (y/x) sub wrap up

I have this for an answer, this is the process. How right or wrong is this?

ln|1 + 3y^2/x^2| = -6ln|x| + C
1 + 3y^2/x^2 = x^-6 + e^c
3y^2/x^2 = 1/x^6 + e^c -1
3y^2 = 1/x^4 + x^2e^c - x^2
y = sqrt[ (1/3x^4) + (x^2e^c/3) - (x^2/3) ]

Yes, no, maybe?

6. Originally Posted by pberardi
I have this for an answer, this is the process. How right or wrong is this?

ln|1 + 3y^2/x^2| = -6ln|x| + C
1 + 3y^2/x^2 = x^-6 + e^c (should be x not +)
3y^2/x^2 = 1/x^6 + e^c -1
3y^2 = 1/x^4 + x^2e^c - x^2
y = sqrt[ (1/3x^4) + (x^2e^c/3) - (x^2/3) ]

Yes, no, maybe?
See in red. It will change things below that.

7. ## y/x sub wrap up

Danny,
I am sorry but I really need some instruction on how to wrap this up. I am a little shaky when it comes to the exponentiation part. Can I see how you would finish this off and get an equation for y that is correct please?

8. Originally Posted by pberardi
Danny,
I am sorry but I really need some instruction on how to wrap this up. I am a little shaky when it comes to the exponentiation part. Can I see how you would finish this off and get an equation for y that is correct please?
Sure.

Originally Posted by pberardi
I have this for an answer, this is the process. How right or wrong is this?

(1) \ln|1 + 3y^2/x^2| = -6 ln|x| + C
(2) 1 + 3y^2/x^2 = x^-6 + e^c
(3) 3y^2/x^2 = 1/x^6 + e^c -1
(4) 3y^2 = 1/x^4 + x^2e^c - x^2
(5) y = sqrt[ (1/3x^4) + (x^2e^c/3) - (x^2/3) ]

Yes, no, maybe?
From your steps above

$
(1)\;\;\; \ln \left|1 + \frac{3y^2}{x^2} \right| = -6\ln|x| + C
$

$
(2)\;\;\;1 + \frac{3y^2}{x^2} = x^{-6} e^c\;\;\; (\text{let}\;\; e^c = k)
$

$
(3)\;\;\;\frac{3y^2}{x^2} = \frac{k}{x^6} -1
$

$
(4)\;\;\;3y^2 = \frac{k}{x^4} - x^2
$

$
(5)\;\;\;y = \pm \sqrt{ \frac{k}{x^4} - \frac{x^2}{3} }\;\;\;( \text{the 3 is absorbed into \it{k}})
$

Hope it helps.

9. Hello, pberardi!

I came up with a different answer.
My journey was quite intricate, but the answer came out rather "neat."

$(x^2 + 2y^2)\,dy + xy\,dx \:= \:0$

We have: . $\frac{dy}{dx} \:=\:-\frac{xy}{x^2+y^2}$

Divide top and bottom of the fraction by $x^2\!:\;\;\frac{dy}{dx} \:=\:-\frac{\frac{y}{x}}{1 + \left(\frac{y}{x}\right)^2}$

Let: . $v = \frac{y}{x}\quad\Rightarrow\quad y \,=\,vx \quad\Rightarrow\quad \frac{dy}{dx} \:=\:v + x\frac{dv}{dx}$

Substitute: . $v + x\frac{dv}{dx} \;=\;-\frac{v}{1+v^2}$

. . Then: . $x\frac{dv}{dx} \;=\;-\frac{v}{1+v^2} - v \;=\;-\frac{v(v^2+2)}{v^2+1}$

Separate variables: . $\frac{v^2+1}{v(v^2+2)}\,dv \;=\;-\frac{dx}{x}$

The left side requires Partial Fractions: . $\frac{1}{2}\left[\frac{1}{v} + \frac{v}{v^2+2}\right]\,dv \;=\;-\frac{dx}{x}$

Integrate: . $\tfrac{1}{2}\left[\ln v + \tfrac{1}{2}\ln(v^2+2)\right] \;=\; -\ln x + c_1$

Multiply by 2: . $\ln v + \ln\sqrt{v^2+1} \;=\;-2\ln x + c_2$

. . . . . $\ln\left(v\sqrt{v^2+1}\right) \;=\;\ln\left(x^{-2}\right) + \ln(c_3) \;=\;\ln\left(c_3x^{-2}\right)$

Exponentiate: . $v\sqrt{v^2+1} \;=\;\frac{c_3}{x^2}$

Back-substitute: . $\frac{y}{x}\sqrt{\frac{y^2}{x^2} + 1} \;=\;\frac{c_3}{x^2} \quad\Rightarrow\quad \frac{y}{x}\,\frac{\sqrt{y^2+x^2}}{x} \;=\;\frac{c_3}{x^2}$

Therefore: . $y\sqrt{x^2+y^2} \;=\;c_3 \quad\Rightarrow\quad y^2(x^2+y^2) \;=\;C$

10. Originally Posted by pberardi
Hey all,
I used a v = y/x substitution on this and I got a really weird looking answer so I just want to see how right or wrong I am.

Solve: (x^2 + 2y^2)dx + xydx = 0
From his original post

Originally Posted by Soroban
Hello, pberardi!

I came up with a different answer.
My journey was quite intricate, but the answer came out rather "neat."

We have: . $\frac{dy}{dx} \:=\:-\frac{xy}{x^2+y^2}$

I guess it depends what $dx$ you change

(also, theres a 2 in the original post)

11. ## thank you

Thanks Danny for all the effort. And thank you too Soroban for chiming in. I really appreciate it.