How to I solve homogeneous equation of y dy/dx +x=2y ?

3 Answers
Jun 14, 2018

The general solution is ln(|y/x-1|)-x/(y-1)=-ln(|x|)+C

Explanation:

The ODE is

ydy/dx+x=2y

Divide by y

dy/dx+x/y=2

Let y=vx

Then,

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

Substituting in the ODE

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

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

Therefore,

(vdv)/(v-1)^2=-dx/x

Integrating both sides

int(vdv)/(v-1)^2=-intdx/x=-lnx+C

For the LHS,

Let u=v-1, =>, du=dv

int(vdv)/(v-1)^2=int((u+1)du)/u^2

=int(1/u+1/u^2)du

=ln(u)-1/u

=ln(v-1)-1/(v-1)

=ln(y/x-1)-1/(y/x-1)

=ln(y/x-1)-x/(y-x)

The general solution is

ln(y/x-1)-x/(y-x)=-ln(x)+C

Where C in RR

Jun 14, 2018

Substitute u=y/x and solve

Explanation:

Be careful with terminology here - "homogeneous ordinary differential equation" can mean two entirely different things!

1) An equation in y and its derivatives w.r.t. x where all coefficients are functions of x alone.
2) A first-order ODE where dy/dx is equal to a function of y/x. This type of ODE can be solved by the substitution u=y/x.

In this question we are dealing with the second meaning; let's rearrange into the needed form:
ydy/dx+x=2y
dy/dx=2-x/y

Substitute u=y/x. Note that by the quotient rule (du)/dx=d/dx(y/x)=(xdy/dx-y)/x^2=1/xdy/dx-y/x^2=1/xdy/dx-u/x
so
dy/dx=x(du)/dx+u

Substituting in:
x(du)/dx+u=2-1/u
x(du)/dx=2-u-1/u
1/(2-u-1/u)(du)/dx=1/x

This is now a separable equation, so integrate for the solution:
int(du)/(2-u-1/u)=intdx/x

The x integral is straightforward - the natural logarithm ln|x|+C. The u integral needs some rearrangement.

int(du)/(2-u-1/u)=intu/(2u-u^2-1)du=int-u/(u^2-2u+1)du
=int-u/(u-1)^2du=int-(u-1+1)/(u-1)^2du
=int-(u-1)/(u-1)^2-1/(u-1)^2du
=int-1/(u-1)-1/(u-1)^2du
=-ln|u-1|+1/(u-1)+C

Put the two integral solutions together:
-ln|u-1|+1/(u-1)=ln|x|+C

Now substitute back for y:
-ln|y/x-1|+1/(y/x-1)=ln|x|+C

Some tidying up rearrangement:
-ln|(y-x)/x|+x/(y-x)=ln|x|+C
-ln|y-x|+ln|x|+x/(y-x)=ln|x|+C
-ln|y-x|+x/(y-x)=C
ln|y-x|-x/(y-x)=C

As we have both y and x both inside and outside of the logarithm there's no beautiful way to express this as a function of one in terms of the other; this is as tidy as we get.

Jun 14, 2018

The general solution of given equation is :
y=x+c*e^(x/(x-y)

Explanation:

Here,

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

=>y(dy)/(dx)=2y-x

=>(dy)/(dx)=(2y-x)/y

=>(dy)/(dx)=(2(y/x)-1)/(y/x)to[homogeneous euqn.]

Subst. y/x=v=>y=vx=>(dy)/(dx)=v+x(dv)/(dx)

So,

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

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

=>x(dv)/(dx)=-(v-1)^2/v

=>v/(v-1)^2dv=-1/xdx

Integrating both sides:

intv/(v-1)^2dv=int-1/xdx

=>int((v-1)+1)/(v-1)^2dv=-int1/xdx

=>int[1/(v-1)+1/(v-1)^2]dv=-ln|x|+lnc

=>ln|v-1|-1/(v-1)=-ln|x|+lnc

=>ln|v-1|+ln|x|-lnc=1/(v-1)

ln|((v-1)x)/c|=-1/(v-1)

Subst. back ,y/x=v ,we get

ln|((y/x-1)x)/c|=-1/(y/x-1)

=>ln|(y-x)/c|=-x/(y-x)

=>ln|(y-x)/c|=x/(x-y)

(y-x)/c=e^(x/(x-y)

y-x=c*e^(x/(x-y)

=>y=x+c*e^(x/(x-y)

This is the general solution of given equation.