A homogeneous differential equation looks messy because \(x\) and \(y\) are tangled together, but a single substitution, \(y = vx\), untangles it into a variables separable equation. By the end of this article you will be able to test whether an equation is homogeneous, carry out the substitution cleanly, and get back to \(x\) and \(y\) without losing marks in the final step.
What “homogeneous” means here
A function \(F(x,y)\) is homogeneous of degree \(n\) if \(F(\lambda x, \lambda y) = \lambda^n F(x,y)\) for every non-zero \(\lambda\). The differential equation
\[\frac{dy}{dx} = F(x,y)\]
is called homogeneous when \(F\) is homogeneous of degree zero, i.e. \(F(\lambda x,\lambda y) = F(x,y)\). Such an \(F\) can always be written as a function of the ratio \(\frac{y}{x}\) alone: \(F(x,y) = g\!\left(\frac{y}{x}\right)\).
The test in practice
- \(F(x,y) = \dfrac{x^2 + 3xy}{y^2}\): replacing \(x, y\) by \(\lambda x, \lambda y\) gives \(\dfrac{\lambda^2(x^2+3xy)}{\lambda^2 y^2} = F(x,y)\). Degree 0, so homogeneous.
- \(F(x,y) = \dfrac{x^2 + y}{xy}\): we get \(\dfrac{\lambda^2x^2 + \lambda y}{\lambda^2 xy}\), which is not equal to \(F(x,y)\). Not homogeneous.
- A quick visual check for polynomial fractions: every term in the numerator and denominator has the same total degree in \(x\) and \(y\). For terms like \(\cos\frac{y}{x}\) or \(e^{y/x}\), the ratio \(\frac{y}{x}\) is already degree 0.
Why \(y = vx\) works
If \(\frac{dy}{dx} = g\!\left(\frac{y}{x}\right)\), the natural new variable is \(v = \frac{y}{x}\), i.e. \(y = vx\), where \(v\) is a function of \(x\). By the product rule,
\[\frac{dy}{dx} = v + x\frac{dv}{dx}.\]
So the equation becomes \(v + x\dfrac{dv}{dx} = g(v)\), that is
\[x\frac{dv}{dx} = g(v) – v \quad\Rightarrow\quad \frac{dv}{g(v) – v} = \frac{dx}{x}.\]
The variables have separated: everything in \(v\) on one side, everything in \(x\) on the other. That is the whole reason for the substitution.
The step-by-step method
- Write the equation as \(\frac{dy}{dx} = F(x,y)\) and check that \(F\) is homogeneous of degree 0 (write this check in your answer).
- Put \(y = vx\) and \(\frac{dy}{dx} = v + x\frac{dv}{dx}\).
- Simplify the right side so that \(x\) cancels, leaving a function of \(v\) only.
- Move \(v\) to the left: \(x\frac{dv}{dx} = g(v) – v\). Separate the variables.
- Integrate both sides; add one constant.
- Replace \(v\) by \(\frac{y}{x}\) and simplify. Use any initial condition to find the constant.
Watch the \(v\) on both sides: after substituting, the \(v\) from \(v + x\frac{dv}{dx}\) almost always cancels with, or combines with, a \(v\) on the right. If nothing simplifies at this stage, recheck your algebra before integrating.
Worked example 1: a polynomial ratio
Solve \(\dfrac{dy}{dx} = \dfrac{2x^2 + y^2}{xy}\).
Check: every term in the numerator and denominator has degree 2, so the equation is homogeneous.
Put \(y = vx\):
\[v + x\frac{dv}{dx} = \frac{2x^2 + v^2x^2}{vx^2} = \frac{2}{v} + v \quad\Rightarrow\quad x\frac{dv}{dx} = \frac{2}{v}.\]
Separate: \(v\,dv = \dfrac{2}{x}\,dx\). Integrate: \(\dfrac{v^2}{2} = 2\ln|x| + C_1\).
Replace \(v = \frac{y}{x}\) and multiply by \(2x^2\):
\[y^2 = 4x^2\ln|x| + Cx^2,\quad\text{where } C = 2C_1.\]
Worked example 2: a trigonometric term with an initial condition
Solve \(x\dfrac{dy}{dx} = y + 2x\cos^2\!\left(\dfrac{y}{x}\right)\), given \(y = \dfrac{\pi}{4}\) when \(x = 1\).
Dividing by \(x\): \(\dfrac{dy}{dx} = \dfrac{y}{x} + 2\cos^2\!\left(\dfrac{y}{x}\right)\), a function of \(\frac{y}{x}\) alone, so it is homogeneous.
\[v + x\frac{dv}{dx} = v + 2\cos^2 v \quad\Rightarrow\quad \sec^2 v\,dv = \frac{2\,dx}{x}.\]
Integrating: \(\tan v = 2\ln|x| + C\), i.e. \(\tan\!\left(\dfrac{y}{x}\right) = 2\ln|x| + C\).
At \(x = 1\), \(y = \frac{\pi}{4}\): \(\tan\frac{\pi}{4} = 0 + C\), so \(C = 1\). The particular solution is
\[\tan\!\left(\frac{y}{x}\right) = 2\ln|x| + 1.\]
Worked example 3: partial fractions after substitution
Solve \(x^2\dfrac{dy}{dx} = y^2 + 3xy\), given \(y = 1\) when \(x = 1\).
\(\dfrac{dy}{dx} = \dfrac{y^2 + 3xy}{x^2}\): all terms of degree 2, homogeneous. Put \(y = vx\):
\[v + x\frac{dv}{dx} = v^2 + 3v \quad\Rightarrow\quad x\frac{dv}{dx} = v^2 + 2v = v(v+2).\]
Separate and use partial fractions, \(\dfrac{1}{v(v+2)} = \dfrac{1}{2}\left(\dfrac{1}{v} – \dfrac{1}{v+2}\right)\):
\[\frac{1}{2}\int\left(\frac{1}{v} – \frac{1}{v+2}\right)dv = \int\frac{dx}{x} \;\Rightarrow\; \ln\left|\frac{v}{v+2}\right| = 2\ln|x| + \ln|K|.\]
So \(\dfrac{v}{v+2} = Kx^2\). With \(v = \frac{y}{x}\), \(\dfrac{v}{v+2} = \dfrac{y}{y+2x}\), giving \(\dfrac{y}{y+2x} = Kx^2\).
At \((1,1)\): \(\frac{1}{3} = K\). Then \(3y = x^2(y + 2x)\), so \(y(3 – x^2) = 2x^3\) and
\[y = \frac{2x^3}{3 – x^2}.\]
Check: differentiating, \(\dfrac{dy}{dx} = \dfrac{6x^2(3-x^2) + 4x^4}{(3-x^2)^2} = \dfrac{18x^2 – 2x^4}{(3-x^2)^2}\). On the other side, \(\dfrac{y^2 + 3xy}{x^2} = \dfrac{4x^4}{(3-x^2)^2} + \dfrac{6x^2}{3-x^2} = \dfrac{4x^4 + 6x^2(3-x^2)}{(3-x^2)^2} = \dfrac{18x^2 – 2x^4}{(3-x^2)^2}\). Both sides agree, so the solution is right. Notice also that it is valid only for \(-\sqrt{3} < x < \sqrt{3}\) around the given point, since the solution is undefined at \(x = \pm\sqrt{3}\).
Writing the constant as \(\ln|K|\) made it easy to combine the logarithms. This is a neat habit whenever both sides of your integral produce logs.
Spotting the type in a mixed exercise
In tests the three first-order types are mixed together, so decide the method before you start writing:
- Can you move all \(x\) terms to one side and all \(y\) terms to the other directly? Use variables separable.
- Is the right side unchanged when \(x, y\) become \(\lambda x, \lambda y\)? Use \(y = vx\).
- Does it fit \(\frac{dy}{dx} + Py = Q\)? Use the integrating factor.
When \(x = vy\) is better
If the equation is given as \(\frac{dx}{dy} = G\!\left(\frac{x}{y}\right)\), or the right side is simpler in terms of \(\frac{x}{y}\), substitute \(x = vy\) and \(\frac{dx}{dy} = v + y\frac{dv}{dy}\). The logic is identical with the roles of \(x\) and \(y\) swapped.
Common mistakes
- Writing \(\frac{dy}{dx} = v\) instead of \(v + x\frac{dv}{dx}\). This is the most expensive slip in the chapter.
- Skipping the homogeneity check. State it in one line; it shows the examiner why you chose this method.
- Not substituting back. The final answer must be in \(x\) and \(y\), not \(v\).
- Dropping modulus signs in \(\ln|x|\) and \(\ln|v|\) without stating a domain.
- Finding the constant before replacing \(v\) with a wrong value of \(v\). At \((1,1)\), \(v = 1\); at \((2,1)\), \(v = \frac{1}{2}\). It is safer to substitute \(x\) and \(y\) after writing the answer in \(x\) and \(y\).
Practise next
Try more equations on the homogeneous differential equations topic page. Since every homogeneous equation ends as a variables separable one, revise that too, and compare with linear equations so you can identify each type quickly. Sign up for a free student account to take timed practice tests.
Frequently asked questions
How do I recognise a homogeneous differential equation quickly?
Write it as \(\frac{dy}{dx} = F(x,y)\). If replacing \(x, y\) by \(\lambda x, \lambda y\) leaves \(F\) unchanged, it is homogeneous. For polynomial fractions, check that every term has the same total degree.
Is a homogeneous equation also variables separable?
Not directly, but after the substitution \(y = vx\) it always becomes variables separable in \(v\) and \(x\).
When should I use x = vy instead of y = vx?
Use \(x = vy\) when the equation is given as \(\frac{dx}{dy}\) in terms of \(\frac{x}{y}\), or when that form makes the algebra simpler. Then \(\frac{dx}{dy} = v + y\frac{dv}{dy}\).
Can I leave the answer in implicit form?
Yes. Many solutions, such as \(\tan\left(\frac{y}{x}\right) = 2\ln|x| + 1\), are naturally implicit. Make it explicit only if the question asks or if it is easy to do.