1.2 Homogeneous ODEs

A homogeneous first-order ODE can be written in the form

equation (1.3) (1.3)
y=f(x,y)=F(yx).y^{\prime}=f(x,y)=F\left(\frac{y}{x}\right).

We will assume that F(y/x)F(y/x) is a continuous function of its argument.

Idea: Define a new variable, v(x)v(x), such that

equation (1.4) (1.4)
y(x)=xv(x).y(x)=xv(x).

Rewriting (1.3) in terms of v(x)v(x) and xx,

y=F(yx)(xv)=F(v)xv+v=F(v).y^{\prime}=F\left(\frac{y}{x}\right)\Longrightarrow\left(xv\right)^{\prime}=F(% v)\Longrightarrow xv^{\prime}+v=F(v).

Hence,

equation (1.5) (1.5)
xv=F(v)v,xv^{\prime}=F(v)-v,

which can be solved by separating variables.

Example 1.5.

Find the general solution to y=(y2+2xy)/x2y^{\prime}=(y^{2}+2xy)/x^{2}. Then find the specific solution satisfying y(1)=0.5y(1)=0.5.

Solution.

Rearranging this equation,

y=(yx)2+2(yx)F(yx).y^{\prime}=\left(\frac{y}{x}\right)^{2}+2\left(\frac{y}{x}\right)\equiv F\left% (\frac{y}{x}\right).

This is a homogeneous, first-order ODE, so we set y(x)=xv(x)y(x)=xv(x). Following the procedure leading to (1.5),

(xv)\displaystyle\left(xv\right)^{\prime}
=\displaystyle=
v2+2v\displaystyle v^{2}+2v
xv+v\displaystyle\Longrightarrow xv^{\prime}+v
=\displaystyle=
v2+2v\displaystyle v^{2}+2v
xv\displaystyle\Longrightarrow xv^{\prime}
=\displaystyle=
v2+v\displaystyle v^{2}+v
xv\displaystyle\Longrightarrow xv^{\prime}
=\displaystyle=
v(1+v).\displaystyle v(1+v).

Separating variables and integrating both sides,

dvv(1+v)=dxx.\int\frac{{\rm d}v}{v(1+v)}=\int\frac{{\rm d}x}{x}.

Note that we have implicitly assumed that v=y/x0v=y/x\neq 0 and v=y/x1v=y/x\neq-1. Neither of these special solutions are consistent with y(1)=0.5y(1)=0.5, so this is valid.

To evaluate the integral on the left-hand side, use a partial fractions decomposition,

1v(1+v)Av+B1+v,\frac{1}{v(1+v)}\equiv\frac{A}{v}+\frac{B}{1+v},

where AA and BB are constants. Hence,

1v(1+v)=A(1+v)+Bvv(1+v)=A+(A+B)vv(1+v).\frac{1}{v(1+v)}=\frac{A(1+v)+Bv}{v(1+v)}=\frac{A+(A+B)v}{v(1+v)}.

For this to be true for any vv, we require that A=1A=1 and A+B=0B=A=1A+B=0\Longrightarrow B=-A=-1. Therefore

1v(1+v)=1v11+v.\frac{1}{v(1+v)}=\frac{1}{v}-\frac{1}{1+v}.

Substituting this into the separated ODE,

[1v11+v]dv\displaystyle\int\left[\frac{1}{v}-\frac{1}{1+v}\right]\,\mathrm{d}v
=\displaystyle=
dxx\displaystyle\int\frac{{\rm d}x}{x}
ln|v|ln|1+v|\displaystyle\Longrightarrow\ln|v|-\ln|1+v|
=\displaystyle=
ln|x|+C,\displaystyle\ln|x|+C,

where CC is a constant. Hence

ln|v1+v|=ln|x|+Cv1+v=±exp[ln|x|+C]=±eC|x|=Dx,\ln\left|\frac{v}{1+v}\right|=\ln|x|+C\Longrightarrow\frac{v}{1+v}=\pm\exp% \left[\ln|x|+C\right]=\pm\mathrm{e}^{C}|x|=Dx,

where DD is a new constant. Rearranging,

v1+v=Dxv=Dx(1+v)v(1Dx)=Dxv=Dx1Dx.\frac{v}{1+v}=Dx\Longrightarrow v=Dx(1+v)\Longrightarrow v(1-Dx)=Dx% \Longrightarrow v=\frac{Dx}{1-Dx}.

Recalling that v=y/xv=y/x, this leads to the general solution

yx=Dx1Dxy=Dx21Dx.\frac{y}{x}=\frac{Dx}{1-Dx}\Longrightarrow y=\frac{Dx^{2}}{1-Dx}.

Now, given that y(1)=0.5y(1)=0.5,

12=D1D1D=2D3D=1D=13.\frac{1}{2}=\frac{D}{1-D}\Longrightarrow 1-D=2D\Longrightarrow 3D=1% \Longrightarrow D=\frac{1}{3}.

Hence,

y=13x2113x=x23x,y=\frac{\frac{1}{3}x^{2}}{1-\frac{1}{3}x}=\frac{x^{2}}{3-x},

which is the required answer.