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)=x⁢v⁢(x).y(x)=xv(x).

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

y′=F⁢(yx)⟹(x⁢v)′=F⁢(v)⟹x⁢v′+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)
x⁢v′=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+2⁢x⁢y)/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)=x⁢v⁢(x)y(x)=xv(x). Following the procedure leading to (1.5),

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

Separating variables and integrating both sides,

∫d⁢vv⁢(1+v)=∫d⁢xx.\int\frac{{\rm d}v}{v(1+v)}=\int\frac{{\rm d}x}{x}.

Note that we have implicitly assumed that v=y/x≠0v=y/x\neq 0 and v=y/x≠−1v=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)+B⁢vv⁢(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=0⟹B=−A=−1A+B=0\Longrightarrow B=-A=-1. Therefore

1v⁢(1+v)=1v−11+v.\frac{1}{v(1+v)}=\frac{1}{v}-\frac{1}{1+v}.

Substituting this into the separated ODE,

∫[1v−11+v]⁢dv\displaystyle\int\left[\frac{1}{v}-\frac{1}{1+v}\right]\,\mathrm{d}v
=\displaystyle=
∫d⁢xx\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|+C⟹v1+v=±exp⁡[ln⁡|x|+C]=±eC⁢|x|=D⁢x,\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=D⁢x⟹v=D⁢x⁢(1+v)⟹v⁢(1−D⁢x)=D⁢x⟹v=D⁢x1−D⁢x.\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=D⁢x1−D⁢x⟹y=D⁢x21−D⁢x.\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=D1−D⟹1−D=2⁢D⟹3⁢D=1⟹D=13.\frac{1}{2}=\frac{D}{1-D}\Longrightarrow 1-D=2D\Longrightarrow 3D=1% \Longrightarrow D=\frac{1}{3}.

Hence,

y=13⁢x21−13⁢x=x23−x,y=\frac{\frac{1}{3}x^{2}}{1-\frac{1}{3}x}=\frac{x^{2}}{3-x},

which is the required answer.