Homogeneous First-Order ODE

April 13, 2026

Problem

Solve dy/dx = (x^2 + y^2) / (x y). Substitute y = v x to reduce the equation to separable form, and show the substitution in action.

Explanation

What "homogeneous" means here

Homogeneous gets used for (at least) two completely different things in differential equations — be careful:

  • Homogeneous linear ODE (right side is zero): any(n)++a0y=0a_n y^{(n)} + \cdots + a_0 y = 0. Relevant for #183–#185.
  • Homogeneous first-order ODE (this problem): the right side dy/dx=F(x,y)dy/dx = F(x, y) is a function of the ratio y/xy/x only: dydx=F ⁣(yx).\frac{dy}{dx} = F\!\left(\frac{y}{x}\right).

Equivalently, numerator and denominator are both polynomial and of the same total degree so the scaling cancels. Example of degree-2/degree-2: dydx=x2+y2xy\frac{dy}{dx} = \frac{x^{2} + y^{2}}{x \, y} Every term on top and bottom is degree-2, so this is homogeneous.

Why the substitution y=vxy = v x works

Let v=y/xv = y/x (so vv depends on xx). Then y=vxy = v x and, by product rule, dydx=v+xdvdx.\frac{dy}{dx} = v + x \, \frac{dv}{dx}.

Substituting into dy/dx=F(y/x)=F(v)dy/dx = F(y/x) = F(v): v+xv=F(v)    xv=F(v)vv + x \, v' = F(v) \implies x \, v' = F(v) - v dvF(v)v=dxx\frac{dv}{F(v) - v} = \frac{dx}{x}

That is separable. Integrate, then back-substitute v=y/xv = y/x.

The given equation

dydx=x2+y2xy\frac{dy}{dx} = \frac{x^{2} + y^{2}}{x y}

Let's verify homogeneity first. Divide top and bottom by x2x^{2}: dydx=1+(y/x)2(y/x)=1+v2v.\frac{dy}{dx} = \frac{1 + (y/x)^{2}}{(y/x)} = \frac{1 + v^{2}}{v}.

So F(v)=(1+v2)/vF(v) = (1 + v^{2})/v. Homogeneous. ✓

Step-by-step solution

Step 1 — Substitute y=vxy = v x.

v+xv=1+v2vv + x \, v' = \frac{1 + v^{2}}{v}

Step 2 — Isolate xvx v'. xv=1+v2vv=1+v2v2v=1vx \, v' = \frac{1 + v^{2}}{v} - v = \frac{1 + v^{2} - v^{2}}{v} = \frac{1}{v}

Step 3 — Separate. vdv=dxxv \, dv = \frac{dx}{x}

Step 4 — Integrate. vdv=dxx\int v \, dv = \int \frac{dx}{x} v22=lnx+C1\frac{v^{2}}{2} = \ln|x| + C_1 v2=2lnx+C(C=2C1)v^{2} = 2 \ln|x| + C \quad (C = 2 C_1)

Step 5 — Back-substitute v=y/xv = y/x. (yx)2=2lnx+C\left(\frac{y}{x}\right)^{2} = 2 \ln|x| + C y2=x2(2lnx+C)\boxed{\, y^{2} = x^{2} \bigl(2 \ln|x| + C\bigr) \,}

(For x>0x > 0, x=x|x| = x.)

Verification

Implicit differentiation of y2=2x2lnx+Cx2y^{2} = 2 x^{2} \ln x + C x^{2}: 2yy=4xlnx+2x+2Cx=2x(2lnx+1+C)2 y \, y' = 4 x \ln x + 2 x + 2 C x = 2 x (2 \ln x + 1 + C) yy=x(2lnx+1+C)y \, y' = x (2 \ln x + 1 + C)

Also, y2/x2=2lnx+Cy^{2} / x^{2} = 2 \ln x + C, so 2lnx+C=y2/x22 \ln x + C = y^{2}/x^{2}. Plug back: yy=x ⁣(y2x2+1)=y2x+x=y2+x2xy \, y' = x \!\left( \frac{y^{2}}{x^{2}} + 1 \right) = \frac{y^{2}}{x} + x = \frac{y^{2} + x^{2}}{x}

Divide by yy: y=y2+x2xyy' = \frac{y^{2} + x^{2}}{x \, y} \quad\checkmark

Geometric picture

The direction field of a homogeneous ODE is radial-symmetric in a scaling sense: the slope at (x,y)(x, y) depends only on the angle θ=arctan(y/x)\theta = \arctan(y/x), not on how far out from the origin you are. Along any ray through the origin the slope is constant. That's exactly why the substitution y=vxy = v x (moving along rays) strips the radial dependence away.

Quick detection checklist

Is your equation dy/dx=f(x,y)dy/dx = f(x, y) homogeneous? Two quick tests:

  1. Scaling test. Replace (x,y)(tx,ty)(x, y) \to (t x, t y). If f(tx,ty)=f(x,y)f(tx, ty) = f(x, y) for all t0t \ne 0, it's homogeneous (degree-0).
  2. Ratio test. Write ff as a single fraction. If every term in the numerator has the same degree dd, and likewise for the denominator, and the two degrees match, it's homogeneous.

Common mistakes

  • Confusing the two meanings of "homogeneous" — this one is about the right-side scaling, not about the equation being set to zero.
  • Forgetting the vv in dy/dx=v+xdv/dxdy/dx = v + x \, dv/dx. Students often write dy/dx=xdv/dxdy/dx = x \, dv/dx only.
  • Using y/xy/x as a free variable without explicitly substituting. Define vv up front and track it carefully.
  • Absolute values. lnx\ln|x| matters when x<0x < 0 — pick a domain and stay on one side of zero.

When the substitution stalls

If the ODE isn't quite homogeneous but has a linear-shift form like dydx=ax+by+cdx+ey+f,c,f0,\frac{dy}{dx} = \frac{a x + b y + c}{d x + e y + f}, \qquad c, f \ne 0, you can often translate (x,y)(xx0,yy0)(x, y) \to (x - x_0, y - y_0) to kill c,fc, f first, then apply the homogeneous substitution. Or: if the two lines ax+by+cax + by + c, dx+ey+fdx + ey + f are parallel, use the substitution w=ax+byw = a x + b y (a different linearization).

Try it in the visualization

Slide the initial condition along a ray through the origin and watch the slope stay the same (the hallmark of a homogeneous ODE). Overlay the substitution y=vxy = v x — the map that sends rays through the origin into vertical lines in the (x,v)(x, v) plane, turning the radial ODE into a separable one.

Interactive Visualization

Parameters

1.00
4.00
5.00
5.00
5.00
45.00
Your turn

Got your own math or physics problem?

Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.

Sign Up Free to Try It30 free visualizations every day
Homogeneous First-Order ODE | MathSpin