Differential Equations, Topic 5 of 10

Homogeneous
First-Order ODEs

When an ODE can be written purely as a function of y/x, one substitution, v = y/x, converts it into a separable equation that can always be solved.

Degree-of-homogeneity test v = y/x substitution derivation 10 worked examples
Share this page

§ 01What Does "Homogeneous" Mean Here?

Warning: "homogeneous" has two different meanings in differential equations. Here we mean a specific structural property of first-order ODEs, not the zero right-hand side of second-order equations.

A first-order ODE is homogeneous (in the sense of this page) if it can be written in the form:

Homogeneous first-order ODE — standard form
dy/dx = F(y/x)

That is, when you simplify the right-hand side completely, the only way x and y appear is as the ratio y/x. This is the defining property. Another equivalent way to state it: the ODE can be written as dy/dx = f(x, y)/g(x, y) where both f and g are homogeneous functions of the same degree.

Homogeneous Functions and Degree

A function h(x, y) is homogeneous of degree n if scaling both variables by any constant λ scales the function by λⁿ:

Definition of homogeneous function
h(λx, λy) = λⁿ h(x, y)   for all λ ≠ 0

Examples:

  • h = x² + xy + y²: degree 2, since h(λx,λy) = λ²x² + λ²xy + λ²y² = λ²h ✓
  • h = x³ − y³, degree 3, since h(λx,λy) = λ³(x³−y³) = λ³h ✓
  • h = √(x² + y²), degree 1, since h(λx,λy) = λ√(x²+y²) = λh ✓
  • h = x² + y + 1, not homogeneous (terms have different degrees)

The Degree Test — Is the ODE Homogeneous?

Given dy/dx = f(x,y)/g(x,y), replace x → λx and y → λy in both numerator and denominator. If the λs cancel completely, the ODE is homogeneous.

ODEf(x,y) degreeg(x,y) degreeVerdict
dy/dx = (x² + y²)/(xy) 22 ✓ Homogeneous
dy/dx = (x + y)/(x − y) 11 ✓ Homogeneous
dy/dx = y³/(x²y + x³) 33 ✓ Homogeneous
dy/dx = (x² + 1)/y 2 (mixed)1 ✗ Not homogeneous
dy/dx = (xy + y²)/x 21 ✗ Not homogeneous
dy/dx = (x³ + y³)/(x²y) 33 ✓ Homogeneous
Quick shortcut: write everything in terms of y/x Divide numerator and denominator by an appropriate power of x. If the result depends only on v = y/x (no x or y left separately), the equation is homogeneous. For example: (x + y)/(x − y) → divide top and bottom by x → (1 + y/x)/(1 − y/x) = (1 + v)/(1 − v). Purely a function of v — homogeneous confirmed.
⚠ The naming collision In second-order ODEs, "homogeneous" means the right-hand side is zero: ay″ + by′ + cy = 0. That is a completely different use of the word. When someone says "homogeneous ODE" at first-order level, they mean the dy/dx = F(y/x) structure described on this page. Always check context.

§ 02The Substitution v = y/x — Full Derivation

The substitution v = y/x is not magic, it falls out directly from the structure of the equation. Here is exactly why it works.

If the ODE is dy/dx = F(y/x), introduce the new variable v = y/x, so y = vx. Differentiate with respect to x using the product rule:

Differentiating y = vx
dy/dx = v + x · dv/dx

Now substitute into dy/dx = F(y/x) = F(v):

Derivation Reducing to a separable equation
v + x · dv/dx = F(v)
substituting y = vx into the ODE
x · dv/dx = F(v) − v
isolate the dv/dx term
dv / [F(v) − v] = dx / x
separate variables — v terms on left, x on right
∫ dv / [F(v) − v] = ∫ dx/x = ln|x| + C
integrate both sides
Back-substitute: v = y/x
replace v with y/x to express solution in original variables

The key insight is that after substituting y = vx and dy/dx = v + x(dv/dx), the variable x always factors out completely from F(v) − v, leaving a separable equation in v and x. The integral on the left, ∫dv/[F(v)−v], may be simple or may require partial fractions, but it only involves v, not x.

Why x only appears as ln|x| The right-hand side always integrates to ln|x| + C. This is because the only x in the equation after separation is dx/x. The left-hand side integral varies from problem to problem, but the right side is always the same.

§ 03The 5-Step Method

Every homogeneous first-order ODE is solved in five steps. The method never changes: only the integrals differ.

Solving Homogeneous ODEs — 5 Steps

  1. Verify homogeneity. Confirm the equation has the form dy/dx = F(y/x) by dividing through by x^n or by checking that f and g have the same degree.
  2. Substitute v = y/x, so y = vx. dy/dx = v + x · dv/dx Replace every occurrence of y with vx and every dy/dx with v + x(dv/dx).
  3. Separate variables in v and x. dv / [F(v) − v] = dx / x Rearrange so all v terms (including dv) are on the left and all x terms (including dx) are on the right.
  4. Integrate both sides. ∫ dv / [F(v) − v] = ln|x| + C The right side is always ln|x| + C. Evaluate the left integral: this is where most of the work happens.
  5. Back-substitute v = y/x. Replace v with y/x in the result to express the general solution in terms of x and y. If an initial condition is given, find C now.

§ 04Worked Examples

Ten fully solved problems: starting with clean rational cases and building to equations requiring partial fractions, IVPs, and implicit solutions.

Example 1 The simplest case — linear ratio Pure

Solve: dy/dx = (x + y) / x

Step 1 — Verify homogeneity
(x + y)/x = 1 + y/x = 1 + v  →  F(v) = 1 + v ✓
Step 2 — Substitute y = vx
v + x·dv/dx = 1 + v
Step 3 — Separate variables
x·dv/dx = 1  →  dv = dx/x
Step 4 — Integrate
v = ln|x| + C
Step 5 — Back-substitute v = y/x
y/x = ln|x| + C  →  y = x(ln|x| + C)
y = x(ln|x| + C)
Example 2 Degree 1 — fraction of linear terms Pure

Solve: dy/dx = (x + y) / (x − y)

Express as F(v): divide top and bottom by x
F(v) = (1 + v)/(1 − v)
Substitute and separate
v + x·dv/dx = (1+v)/(1−v) x·dv/dx = (1+v)/(1−v) − v = (1+v − v(1−v))/(1−v) = (1+v²)/(1−v)
Separate variables
(1−v)/(1+v²) dv = dx/x
Integrate left side: split into two pieces
∫1/(1+v²) dv − ∫v/(1+v²) dv = arctan(v) − ½ln(1+v²)
Integrate right side and combine
arctan(v) − ½ln(1+v²) = ln|x| + C
Back-substitute v = y/x
arctan(y/x) − ½ln(1+y²/x²) = ln|x| + C
arctan(y/x) − ½ ln(x² + y²) = C

Note: ½ln(1+y²/x²) + ln|x| = ½ln((x²+y²)/x²) + ln|x| = ½ln(x²+y²) − ln|x| + ln|x| = ½ln(x²+y²). Absorbed into C.

Example 3 Degree 2 — quadratic terms Pure

Solve: dy/dx = (x² + y²) / (2xy)

Divide top and bottom by x²
F(v) = (1 + v²)/(2v)
Substitute
v + x·dv/dx = (1+v²)/(2v) x·dv/dx = (1+v²)/(2v) − v = (1+v²−2v²)/(2v) = (1−v²)/(2v)
Separate
2v/(1−v²) dv = dx/x
Integrate: left side — note d/dv[1−v²] = −2v, so ∫2v/(1−v²)dv = −ln|1−v²|
−ln|1−v²| = ln|x| + C  →  ln|1−v²| = −ln|x| + K 1 − v² = A/x
Back-substitute v = y/x
1 − y²/x² = A/x  →  x² − y² = Ax
x² − y² = Cx
Example 4 IVP — finding the particular solution IVP

Solve: dy/dx = (y² − x²) / (2xy),  y(1) = 2

Divide by x²: F(v) = (v² − 1)/(2v)
Substitute and find the separable equation
x·dv/dx = (v²−1)/(2v) − v = (v²−1−2v²)/(2v) = −(v²+1)/(2v)
Separate
2v/(v²+1) dv = −dx/x
Integrate: ∫2v/(v²+1) dv = ln(v²+1)
ln(v²+1) = −ln|x| + C  →  (v²+1)x = A
Back-substitute v = y/x
(y²/x² + 1)x = A  →  (y² + x²)/x = A  →  x² + y² = Ax
Apply y(1) = 2:   1 + 4 = A → A = 5
x² + y² = 5x

This is a circle of radius 5/2 centred at (5/2, 0), a geometrically elegant particular solution.

Example 5 Equation leading to a logarithmic implicit solution Pure

Solve: x·dy/dx = y + x·e^(y/x)

Rewrite: dy/dx = y/x + e^(y/x) → F(v) = v + eᵛ
Substitute
v + x·dv/dx = v + ev x·dv/dx = ev
Separate
e−v dv = dx/x
Integrate
−e−v = ln|x| + C
Back-substitute v = y/x
−e−y/x = ln|x| + C
−e^(−y/x) = ln|x| + C
Example 6 Partial fractions needed on the left Pure

Solve: dy/dx = (2y − x) / (2x − y)

Divide by x: F(v) = (2v − 1)/(2 − v)
Substitute
x·dv/dx = (2v−1)/(2−v) − v = (2v−1 − 2v + v²)/(2−v) = (v²−1)/(2−v)
Separate
(2−v)/(v²−1) dv = dx/x
Partial fractions: (2−v)/[(v−1)(v+1)] = A/(v−1) + B/(v+1)
2−v = A(v+1) + B(v−1) v=1: 1 = 2A → A = ½;   v=−1: 3 = −2B → B = −3/2
Integrate
½ ln|v−1| − (3/2) ln|v+1| = ln|x| + C
Back-substitute v = y/x, simplify
½ ln|y/x − 1| − (3/2) ln|y/x + 1| = ln|x| + C ½ ln|(y−x)/x| − (3/2) ln|(y+x)/x| = ln|x| + C
(y − x)^(1/2) / (y + x)^(3/2) = Kx²
Example 7 Trigonometric F(v) Pure

Solve: dy/dx = y/x + tan(y/x)

F(v) = v + tan(v) directly visible
Substitute
v + x·dv/dx = v + tan(v) x·dv/dx = tan(v)
Separate
cot(v) dv = dx/x
Integrate: ∫cot(v)dv = ln|sin(v)|
ln|sin(v)| = ln|x| + C sin(v) = Ax
Back-substitute v = y/x
sin(y/x) = Ax
sin(y/x) = Cx
Example 8 IVP with trigonometric equation IVP

Solve: x·dy/dx = y − x·sin²(y/x),  y(1) = π/4

Rewrite: dy/dx = y/x − sin²(y/x) → F(v) = v − sin²v
Substitute
x·dv/dx = (v − sin²v) − v = −sin²v
Separate
−cosec²(v) dv = dx/x   [i.e. −dv/sin²v]
Integrate: ∫−cosec²v dv = cot v
cot(v) = ln|x| + C
Back-substitute and apply y(1) = π/4
cot(π/4) = ln|1| + C  →  1 = 0 + C  →  C = 1 cot(y/x) = ln|x| + 1
cot(y/x) = ln|x| + 1
Example 9 Degree 3 — higher-degree homogeneous Pure

Solve: dy/dx = (x³ + y³) / (x²y)

Divide by x³/x²: F(v) = (1 + v³)/v
(x³+y³)/(x²y) = (x³+x³v³)/(x² · xv) = (1+v³)/v
Substitute
x·dv/dx = (1+v³)/v − v = (1+v³−v²)/v

Since 1+v³−v² = 1−v²+v³: this does not factor tidily; separate directly.

Separate
v/(1+v³−v²) dv = dx/x
General implicit solution
∫ v dv / (1 − v² + v³) = ln|x| + C Back-substitute v = y/x for the final implicit relation.
∫(y/x) d(y/x) / (1 − (y/x)² + (y/x)³) = ln|x| + C  (implicit)

This illustrates that not every homogeneous ODE yields a neat closed-form solution. The method is always valid; the resulting integral may require numerical methods.

Example 10 Reverse — constructing a homogeneous ODE from its solution Pure

The general solution of a homogeneous ODE is y² = x²(ln|x| + C). Recover the ODE.

Differentiate implicitly with respect to x
2y · dy/dx = 2x(ln|x| + C) + x²·(1/x) = 2x(ln|x| + C) + x
Replace (ln|x| + C) using the solution: ln|x| + C = y²/x²
2y · dy/dx = 2x · y²/x² + x = 2y²/x + x
Divide by 2y and simplify
dy/dx = y/x + x/(2y)
Verify: divide top and bottom by x to write as F(y/x)
= y/x + (1/2)/(y/x) = v + 1/(2v)   ✓ homogeneous
dy/dx = y/x + x/(2y)

§ 05Common Mistakes

⚠ Confusing the two meanings of "homogeneous" A first-order ODE of the form dy/dx = F(y/x) is called homogeneous. A second-order ODE with zero right-hand side (ay″ + by′ + cy = 0) is also called homogeneous — but these are entirely different concepts. Make sure you know which type you are dealing with before choosing a method.
⚠ Forgetting dy/dx = v + x·dv/dx The most common algebraic slip: after writing y = vx, students differentiate to get dy/dx = v·(dv/dx) instead of dy/dx = v + x·(dv/dx). The product rule gives two terms, not one. Always write out y = vx → dy/dx = v + x·dv/dx before substituting.
⚠ Not simplifying F(v) − v before separating The expression x·dv/dx = F(v) − v must be fully simplified algebraically before you separate variables. Skipping this step and trying to integrate a complex fraction that could be simplified leads to unnecessarily hard integrals.
⚠ Forgetting to back-substitute at the end After solving the separable equation in v and x, the answer is still in terms of v = y/x. You must replace v with y/x to express the solution in the original variables. An answer left in terms of v is incomplete.
⚠ Applying this method to non-homogeneous equations If the degrees of f(x,y) and g(x,y) differ, the method fails. For example dy/dx = (x² + y)/x has f of degree 2 and the y term of degree 1 — it is not homogeneous, and substituting v = y/x will not separate the variables.

§ 06Practice Quiz — 10 Questions

Identify, set up, and solve. Some questions test classification; others require carrying out steps of the method.

Score: 0 / 0
Question 1 — Classification

Which of the following ODEs is homogeneous (in the first-order sense)?

  1. (a) dy/dx = x + y: substitute y = vx, so x + y = x + vx = x(1 + v). This still depends on x itself, not just on v = y/x, so it cannot be written as a pure function of v. Not homogeneous.
  2. (b) (x² + y²)/(xy): divide by x²/x → (1 + v²)/v, purely a function of v = y/x. Homogeneous ✓
  3. (c) dy/dx = y + sin x, sin x depends only on x, not the ratio y/x. Not homogeneous.
  4. (d) x²y + 1, the +1 breaks homogeneity. Not homogeneous.
Question 2 — Substitution

After substituting y = vx into dy/dx = F(y/x), dy/dx becomes:

Question 3 — Degree check

The function f(x, y) = x⁴ − 3x²y² + y⁴ is homogeneous of degree n. What is n?

Replace x → λx, y → λy and factor out λ.
Question 4 — Setting up the separable equation

For dy/dx = (x + y)/x, after substituting v = y/x, x·dv/dx equals:

  1. F(v) = (x + y)/x = 1 + y/x = 1 + v
  2. v + x·dv/dx = 1 + v
  3. x·dv/dx = 1
Question 5 — Right-hand side integral

After separating variables in a homogeneous ODE, the right-hand side is always ∫dx/x. What is this integral?

Question 6 — Applying the method

For the ODE dy/dx = (x² + y²)/(2xy), after substituting v = y/x, x·dv/dx = (1 − v²)/(2v). The separated equation is (2v)/(1 − v²) dv = dx/x. Integrating gives −ln|1 − v²| = ln|x| + C. So 1 − v² = A/x. Using the IVP y(2) = 2, what is A?

At x = 2, y = 2 → v = y/x = 1. Substitute v = 1, x = 2 into 1 − v² = A/x.
  1. v = y/x = 2/2 = 1
  2. 1 − 1² = A/2 → 0 = A/2 → A = 0
  3. Solution: x² − y² = 0 → y = x (the particular solution is the line y = x)
Question 7 — Back-substitution

After solving a homogeneous ODE you obtain v + ln|v| = ln|x| + C. Replacing v = y/x gives:

Question 8 — IVP constant

The ODE dy/dx = y/x + tan(y/x) has solution sin(y/x) = Cx. If y(π) = π/2, what is C? Give your answer to 3 decimal places.

At x = π, y = π/2 → v = y/x = 1/2. sin(1/2) = Cπ → C = sin(0.5)/π.
  1. sin(y/x) = Cx
  2. y = π/2, x = π → v = 1/2
  3. sin(0.5) = Cπ → C = sin(0.5)/π ≈ 0.4794/3.1416 ≈ 0.153
Question 9 — Identifying the variable substitution

For a homogeneous ODE, what substitution always reduces it to a separable equation?

Question 10 — Geometry of solutions

The particular solution to the IVP dy/dx = (y² − x²)/(2xy) with y(1) = 2 is x² + y² = 5x. Geometrically, this curve is:

  1. x² + y² = 5x → x² − 5x + y² = 0 → (x − 5/2)² + y² = 25/4
  2. This is a circle centred at (5/2, 0) with radius 5/2.

§ 07What to Study Next

You can now classify and solve homogeneous first-order ODEs. The three natural next steps are:

Cookie Settings