Solve the differential equation # (2y-x)dy/dx=2x+y# where #y=3# when #x=2#?

2 Answers
Jul 12, 2017

See below.

Explanation:

Making #y = lambda x# we have

#dy = x dlambda + lambda dx# and substituting

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

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

#dx/x = -1/2(2lambda-1)/(lambda^2-lambda-1)dy# and after integrating both sides

#log x = -1/2log(2(1+lambda-lambda^2))+C# or

#x = C_0/sqrt(2(1+lambda-lambda^2))# or

#1/2(C_0/x)^2=1+lambda-lambda^2# and solving for #lambda#

#lambda = (x^2 pm sqrt[ 5 x^4-2 C_0^2 x^2])/(2 x^2) = y/x# and finally

#y = x( (x^2 pm sqrt[ 5 x^4-2 C_0^2 x^2])/(2 x^2) ) =#

and simplifying

#y = 1/2(xpmsqrt[ 5 x^2-2 C_0^2])#

For initial conditions we have

#3=1/2(2pm sqrt(20-2C_0^2))# we have

#C_0 = pm sqrt(2)# and finally

#y = 1/2(x pm sqrt(5x^2-4))#

Jul 12, 2017

# y^2-xy-x^2+1=0#

Explanation:

We have:

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

We can rearrange this Differential Equation as follows:

# dy/dx = (2x+y)/(2y-x) #
# " " = (2x+y)/(2y-x) * (1/x)/(1/x) #
# " " = (2+(y/x))/(2(y/x)-1) #

So Let us try a substitution, Let:

# v = y/x => y=vx#

Then:

# dy/dx = v + x(dv)/dx #

And substituting into the above DE, to eliminate #y#:

# v + x(dv)/dx = (2+v)/(2v-1) #

# :. x(dv)/dx = (2+v)/(2v-1) - v#
# :. " " = {(2+v) - v(2v-1)}/(2v-1) #
# :. " " = {2+v - 2v^2+v}/(2v-1)#
# :. " " = {2+2v - 2v^2}/(2v-1)#
# :. " " = -(2(v^2-v-1))/(2v-1)#

# :. (2v-1)/(v^2-v-1) \ (dv)/dx = -2/x #

This is now a separable DIfferential Equation, and so "separating the variables" gives us:

# int \ (2v-1)/(v^2-v-1) \ dv = - int \ 2/x \ dx #

This is now a trivial integration problem, thus:

# ln(v^2-v-1) = -2lnx + lnA #
# " " = lnA/x^2 #

# :. v^2-v-1 = A/x^2 #

And restoring the substitution we get:

# (y/x)^2-(y/x)-1 = A/x^2 #

Using #y=3# when #x=2#:

# 9/4-3/2-1 = A/4 => A = -1#

Thus:

# (y/x)^2-(y/x)-1 = -1/x^2#
# :. y^2-xy-x^2=-1#
# :. y^2-xy-x^2+1=0#