Toggle Main Menu Toggle Search

### Homogeneous First Order Differential Equations

#### Definition

A first order differential equation is homogeneous if it takes the form:

$\frac{\mathrm{d} y}{\mathrm{d} x}=F\left(\frac{y}{x}\right),$

where $F\left(\dfrac{y}{x}\right)$ is a homogeneous function. In this context homogeneous is used to mean a function of $x$ and $y$ that is left unchanged by multiplying both arguments by a constant, i.e.

$f(x,y) = f(kx,ky).$

Note: The word “homogeneous” can also be used to describe a differential equation in the form $Ly=0$, where $L$ is a linear differential operator. An example of such a homogeneous equation is:

$\frac{\mathrm{d}^2y}{\mathrm{d} x^2}+\frac{\mathrm{d} y}{\mathrm{d} x}+y=0.$

The different types of homogeneous equation are entirely separate entities, and it is important not to confuse the two.

#### Solving by Substitution

A homogeneous differential equation can often be solved by making the substitution $v(x)=\dfrac{y}{x}$, where $v=v(x)$ is a function of $x.$ Rearranging this gives $y=vx$.

An expression for $\displaystyle \frac{\mathrm{d} y}{\mathrm{d} x}$ in terms of $x$ and $v$ can be found by differentiating both sides of $y=xv$ with respect to $x$:

\begin{align} \frac{\mathrm{d} y}{\mathrm{d} x} &= \frac{\mathrm{d}}{\mathrm{d} x}\Bigl[xv\Bigl] \\ &= v + x\frac{\mathrm{d} v}{\mathrm{d} x}. \end{align}

Note that the product rule has been used to differentiate the right-hand side.

This can be expressed more compactly using prime notation:

$y' = v + xv'.$

Recall that the general form of a homogeneous first order differential equation is:

$y'=F\left(\frac{y}{x}\right).$

Substituting $y'=v+xv'$ and $v(x)=\dfrac{y}{x}$ into the equation gives:

$v+xv'=F(v).$

This can be rearranged to form a separable differential equation:

\begin{align} xv' &= F(v)-v \\ v' &= \frac{F(v)-v}{x} \\ \frac{\mathrm{d} v}{\mathrm{d} x} &= \frac{F(v)-v}{x} \\ \frac{\mathrm{d} v}{F(v)-v} &= \frac{\mathrm{d} x}{x}. \end{align}

This can be integrated directly to give a solution for $v$. Substituting this solution into $y=xv$ then gives the solution for $y$.

In some cases the substitution $y=xv$ will not lead to solution. For these equations a substitution of a different form, for example $y=\dfrac{1}{v}$, will lead to a differential equation in $v$ that is either separable or can be solved using an integrating factor.

#### Worked Examples

###### Example 1

Solve the differential equation:

$\frac{\mathrm{d} y}{\mathrm{d} x} = \frac{x^2+y^2}{2x^2}.$

###### Solution

First note that the question has not specified that the equation is to be solved by substitution. Here it is advisable to spend a few moments thinking about the most appropriate method for solving the equation.

In this case the equation cannot be separated, so it cannot be solved by separating and then integrating directly. As there is a $y^2$ on the right-hand side it cannot be put in the form of an integrating factor problem either.

If the equation is homogeneous it can be solved via a substitution. Recall that a function is homogeneous if:

$f(x,y) = f(kx,ky).$

Here $f(x,y)$ is the expression that appears on the right-hand side of the equation:

$f(x,y) = \frac{x^2+y^2}{2x^2}.$

Replacing $x$ with $kx$ and $y$ with $ky$ gives:

\begin{align} f(kx,ky) &= \frac{(kx)^2 + (ky)^2}{2(kx)^2} \\ &= \frac{k^2x^2 + k^2y^2}{2k^2x^2} \\ &= \frac{k^2 \left( x^2 + y^2 \right)}{2k^2x^2}. \end{align}

There is a factor of $k^2$ on both top and bottom; these cancel out to leave:

$f(kx,ky) = \frac{x^2+y^2}{2x^2} = f(x,y).$

It has been shown that $f(kx,ky) = f(x,y)$; the differential equation is therefore homogeneous, indicating that the substitution $y=xv$ is the most appropriate method for solving.

Differentiating the substitution, using the product rule to differentiate the right-hand side, gives:

$y' = v + xv'.$

The differential equation can be rewritten using this result and the original substitution, $y = xv$:

$v + xv' = \frac{x^2 + (xv)^2}{2x^2}.$

On multiplying out this equation it can be seen that there is a common factor of $x^2$ in both the numerator and denominator of the expression on the right-hand side:

$v + xv' = \frac{x^2 + x^2v^2}{2x^2}.$

Cancelling this factor of $x^2$ gives:

$v + xv' = \frac{1+v^2}{2}.$

A cancellation such as this will always happen and the remaining equation should be solvable by a simple method such as separation or an integrating factor.

The above equation is solvable by separation. Taking all the terms containing $v$ onto the right-hand side gives:

$xv' = \frac{1+v^2}{2} - v,$

Multiplying both sides by $2$ and then factoring the right-hand side gives:

\begin{align} 2xv' &= 1+v^2 - 2v \\ 2xv' &= (1-v)^2.\end{align}

The equation can now be separated and integrated directly using standard integrals:

\begin{align} v' &= \frac{(1-v)^2}{2x}, \\ \frac{\mathrm{d} v}{\mathrm{d} x} &=\frac{(1-v)^2}{2x}, \\ (1-v)^{-2} \mathrm{d} v &= \frac{\mathrm{d} x}{2x}, \\ \int (1-v)^{-2} \mathrm{d} v &= \frac{1}{2} \int \frac{1}{x} \mathrm{d} x, \\ -\frac{1}{1-v} &= \frac{1}{2}\ln(x) + C, \end{align}

where $C$ is the arbitrary constant of integration.

To express this equation in $v$ in terms of $y$ and $x$ substitute back using $v = \dfrac{y}{x}$ to give:

$-\frac{1}{1-\frac{y}{x} } = \frac{1}{2}\ln(x) + C.$

Finally, this can be rearranged to find $y$ as a function of $x$:

First set $\ln(D)=C$, then by the laws of logarithms:

$\dfrac{1}{2}\ln(x)+C=\ln\left(Dx^{\left(\frac{1}{2}\right)}\right),$

and the equation becomes: \begin{align} \frac{1}{\frac{y}{x} - 1} &= \ln\left(Dx^{\left(\frac{1}{2}\right)}\right), \\ \frac{y}{x} - 1 &= \frac{1}{\ln\left(Dx^{\left(\frac{1}{2} \right)}\right)} \\ \frac{y}{x} &= 1 + \frac{1}{\ln\left(Dx^{\left(\frac{1}{2} \right)}\right)}, \\ y &= x \left( 1 + \frac{1}{\ln\left(Dx^{\left(\frac{1}{2} \right)}\right)} \right). \end{align}

###### Video Example 1

Newcastle University Maths-Aid solves the differential equation $\displaystyle \frac{\mathrm{d} y}{\mathrm{d} x}= \frac{x^2+y^2}{2x^2}$.

###### Example 2

Solve the differential equation:

$x\frac{\mathrm{d} y}{\mathrm{d} x} + y = xy^2,$

using the substitution $y = \dfrac{1}{v}$.

###### Solution

The first step is to express $\dfrac{\mathrm{d} y}{\mathrm{d} x}$ in terms of $v$. To do this, differentiate the given substitution:

\begin{align} y &= \frac{1}{v}, \\ \frac{\mathrm{d} y}{\mathrm{d} x} &= \frac{\mathrm{d </div>{\mathrm{d} x} \left( \frac{1}{v} \right). \end{align}

The chain rule is used to differentiate the right-hand side:

\begin{align} \frac{\mathrm{d} y}{\mathrm{d} x} &= \frac{\mathrm{d} v}{\mathrm{d} x} \cdot \frac{\mathrm{d}}{\mathrm{d} v} \left( \frac{1}{v} \right), \\ \frac{\mathrm{d} y}{\mathrm{d} x} &= - \frac{1}{v^2} \frac{\mathrm{d} v}{\mathrm{d} x}. \end{align}

Substituting this and $y=\dfrac{1}{v}$ into the original differential equation gives:

$x \left( -\frac{1}{v^2}\frac{\mathrm{d} v}{\mathrm{d} x} \right) + \frac{1}{v} = x \left( \frac{1}{v} \right)^2.$

Here some cancellation is possible, and the remaining equation will be of a form which can be solved.

Multiplying both sides by $v^2$ gives:

$-x\frac{\mathrm{d} v}{\mathrm{d} x} + v = x,$

This can be rearranged into the form of equation that can be solved with an integrating factor. Dividing each side by $-x$ gives:

$\frac{\mathrm{d} v}{\mathrm{d} x} - \frac{1}{x}v = -1.$

The integrating factor is formed by first integrating the coefficient of $v$:

$F(x) = \int -\frac{1}{x} \mathrm{d} x = - \ln(x),$

and then exponentiating to give:

$e^{F(x)} = e^{-\ln(x)} = \frac{1}{x},$

having noted that $-\ln(x)=\ln(x^{-1})$ and $e^{\ln(a)}=a$ for any $a$, by the laws of logarithms.

Multiplying both sides of the differential equation by this integrating factor gives:

$\frac{1}{x} \frac{\mathrm{d} v}{\mathrm{d} x} - \frac{1}{x^2}v = -\frac{1}{x}.$

The left-hand side can be expressed as a single derivative (as a result of the product rule), and the equation becomes:

$\frac{\mathrm{d}}{\mathrm{d} x} \left( \frac{1}{x}v \right) = -\frac{1}{x}.$

Integrating both sides gives a solution in terms of $v$:

\begin{align} \int\frac{\mathrm{d}}{\mathrm{d} x} \left( \frac{1}{x}v \right) &=\int -\frac{1}{x} \\ \frac{1}{x}v &= -\ln(x) + C. \end{align}

A solution in terms of $y$ can be found by recalling the original substitution, $y=\dfrac{1}{v}$. Rearranging this gives $v = \dfrac{1}{y}$, and substituting this into the solution for $v$ gives:

$\frac{1}{xy} = - \ln(x) + C.$

Rearranging this gives the solution expressed in the form $y=y(x)$:

\begin{align} \frac{xy}{1} &= \frac{1}{-\ln(x) + C}, \\ xy &= \frac{1}{C - \ln(x)}, \\ y &= \frac{1}{x \left( C - \ln(x) \right)}. \end{align}

}}

###### Video Example 2

Newcastle University Maths-Aid solves the differential equation $\displaystyle x\frac{\mathrm{d} y}{\mathrm{d} x}+y=xy^2$.

#### Video Example

Prof. Robin Johnson finds the general solution of $\dfrac{\mathrm{d}y}{\mathrm{d}x}=\dfrac{3y-4x}{x}$.

#### More Support

You can get one-to-one support from Maths-Aid.