Homogeneous ODEs

A First Order ODE is said to be homogeneous if it can be written as follows: $$ y'(x) = f( y(x) / x) $$ Note that the equation does not change its form with the scaling: $$ y \rightarrow a y $$ $$ x \rightarrow a x $$ It can be solved with the following change of variables: $$ y(x) = u(x) x $$ $$ y'=u'x + u = f(u) $$ Now, we have an ODE for \(u\) which is separable $$ \frac{du}{f(u)-u} = \frac{dx}{x}$$

Example 1

Solve the following ODE $$ y' = 1 + y/x $$

solution:

$$ y = u x $$ $$ y' = u'x + u = 1 + u $$ $$ du = dx/x $$ $$ u = \log{x} + c $$ $$ y = x \log{x} + c x $$

Example 2

Solve the following ODE $$ y' = \frac{x-y}{x+y} $$

solution: Homogeneous ODE

$$ y' = \frac{1-y/x}{1+y/x} = f(y/x), y = u x \rightarrow y' = u'x + u = \frac{1-u}{1+u}$$ $$ u'x = \frac{1-2u-u^2}{1+u} \rightarrow \frac{(1+u) du}{1-2u-u^2} = \frac{dx}{x} \rightarrow \frac{(-2-2u) du}{-2(1-2u-u^2)} = \frac{dx}{x} $$ $$ \log{(1-2u-u^2)} = -2 \log{x} + c \rightarrow 1-2u-u^2 = \frac{c_1}{x^2} $$ $$ u = - 1 \pm \frac{\sqrt{2 x^2 - c_1}}{x} \rightarrow y(x) = - x \pm \sqrt{2 x^2 - c_1} $$