#(x-y) dy/dx= (x+2y)# ?

#a^2 + b^2 = c^2#

2 Answers
Feb 26, 2018

# "The solution is:" #

# \qquad \quad \ ln| 4 y^2 + 4 x y + 4 x^2 | \ = \ 2 sqrt{ 3 } arctan( { x + 2 y }/ { \sqrt{ 3 } x } )+ C. #

Explanation:

#"We are asked to solve the differential equation:"#

# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad (x - y ) {dy}/{dx} \ = \ x + 2 y. #

#"We rearrange a little:"#

# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad {dy}/{dx} \ = \ { x + 2 y } / { x - y } #

# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad {dy}/{dx} \ = \ { 1 + 2 ( y/x ) } / { 1 - ( y/x ) } \quad. \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \quad \ (I) #

#"[While I may not need to mention this, this differential"#
#"equation is what is called a homogeneous differential equation."#
# "I'll discuss this after the work here. Knowing that the"#
# "differential equation is of that type, it tells us that the"#
# "following substitution will help.]"#

#"Use the substitution:" \qquad \qquad \qquad v = y/x. \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \quad \ (II) #

#"Now we compute:"#

# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \ y = vx. #

# \qquad \qquad :. \qquad \qquad \qquad \qquad \qquad \qquad \qquad {dy}/{dx} = v + x {dv}/{dx}. \qquad \qquad \qquad \qquad \qquad \qquad \qquad (III) #

#"Substituting (II) and (III) into (I):"#

# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \ v + x {dv}/{dx} \ = \ { 1 + 2 v } / { 1 - v } #

# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad x {dv}/{dx} \ = \ { 1 + 2 v } / { 1 - v } - v #

# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \ = \ { 1 + 2 v - v (1 - v) }/ { 1 - v } #

# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \ \= \ { 1 + v + v^2 }/ { 1 - v }. #

#"Thus, we have:"#

# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \quad \ x {dv}/{dx} \ = \ { 1 + v + v^2 }/ { 1 - v }. #

#"[Not necessary to note -- this is called a separable differential"#
#"equation.]"#

# \qquad \qquad \qquad \qquad \ { 1 - v } / { 1 + v + v^2 } {dv}/{dx} \ = \ 1/x #

# \qquad \qquad \qquad \ { 4 ( 1 - v ) } / { 4 + 4 v + 4 v^2 } {dv}/{dx} \ = \ 1 /x #

# \qquad \qquad \qquad \ { -4 ( v - 1 ) } / { 4 + 4 v + 4 v^2 } {dv}/{dx} \ = \ 1 /x #

# \qquad - 1/2{ 8 v - 8 } / { 4 v^2 + 4 v + 4 } {dv}/{dx} \ = \ 1 /x #

# \qquad - 1/2{ 8 v + 4 - 12 } / { 4 v^2 + 4 v + 4 }{dv}/{dx} \ = \ 1 /x #

# \qquad \qquad \qquad \ { 8 v + 4 - 12 } / { 4 v^2 + 4 v + 4 } {dv}/{dx} \ = \ -2/x #

# \qquad \qquad \qquad [ { 8 v + 4 } / { 4 v^2 + 4 v + 4 } - { 12 } /{ 4 v^2 + 4 v + 4 } ] {dv}/{dx} \ = \ -2/x #

# \qquad \qquad \ \ [ { 8 v + 4 } / { 4 v^2 + 4 v + 4 } - { 12 } / { ( 2 x + 1 )^2 + 3 } ] {dv}/{dx} \ = \ -2/x #

# \ [ { 8 v + 4 } / { 4 v^2 + 4 v + 4 } \ - \ 6 cdot ( { 2 } /{ ( 2 x + 1 )^2 + ( \sqrt{3} )^2 } ) ] {dv}/{dx} \ = \ -2/x #

# int \ [ { 8 v + 4 } / { 4 v^2 + 4 v + 4 } - 6 cdot ( { 2 } /{ ( 2 x + 1 )^2 + ( \sqrt{3} )^2 } ) ] dv #

# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \quad \ = \ int -2/x dx #

# \quad \ ln| 4 v^2 + 4 v + 4 | - 6/\sqrt{ 3 } arctan( ( 2 v + 1 )/\sqrt{ 3 } ) \ = \ -2 ln|x| + C #

# \qquad \ ln| 4 v^2 + 4 v + 4 | + 2 ln|x| \ = \ 2 sqrt{ 3 } arctan( ( 2 v + 1 )/\sqrt{ 3 } )+ C #

# \qquad \ ln( | x^2 | cdot | 4 v^2 + 4 v + 4 | ) \ = \ 2 sqrt{ 3 } arctan( ( 2 v + 1 )/\sqrt{ 3 } )+ C. #

#"Now substitute back:" \qquad v = y/x:"#

# \qquad \quad ln| x^2 ( 4 (y/x)^2 + 4 (y/x) + 4 ) | #

# \qquad \qquad \qquad \qquad \qquad \qquad \qquad = \ 2 sqrt{ 3 } arctan( ( 2 (y/x) + 1 )/\sqrt{ 3 } )+ C #

# \qquad \qquad ln| 4 y^2 + 4 x y + 4 x^2 | \ = \ 2 sqrt{ 3 } arctan( { x + 2 y }/ { \sqrt{ 3 } x } )+ C. #

#"This is our solution."#

# "Solution:" #

# \qquad \qquad ln| 4 y^2 + 4 x y + 4 x^2 | \ = \ 2 sqrt{ 3 } arctan( { x + 2 y }/ { \sqrt{ 3 } x } )+ C. #

Feb 26, 2018

See below.

Explanation:

Making #y = lambda x rArr y' = lambda + x lambda'# we have

#y' = (x+2y)/(x-y)rArr lambda + x lambda' = (1+2lambda)/(1-lambda)# or

#x lambda' = (1+2lambda)/(1-lambda)-lambda = (lambda^2+lambda+1)/(1-lambda)# which is a separable differential equation. Grouping variables

#(1-lambda)/(lambda^2+lambda+1)dlambda=dx/x#

now integrating both sides

#sqrt[3] arctan((1 + 2 lambda)/sqrt[3]) - 1/2 Logabs(1 + lambda + lambda^2) = log x + C# or

#sqrt[3] arctan((1 + 2 y/x)/sqrt[3]) - 1/2 Logabs(1 + y/x + (y/x)^2) = log x + C#

which is the solution in implicit form.