girgit.org

Differential Equations

Solving homogeneous equations: put y = vx

The big ideaA homogeneous equation \( \frac{dy}{dx} = g\left(\frac{y}{x}\right) \) becomes variable separable when you put y = vx, because then everything depends on v and x separately.

In simple words

The equation only cares about the ratio "y compared with x". So give that ratio its own name, v. Now ask the question again using v instead of y. Like magic, the x parts and the v parts come apart, and you can sort them into two piles as before. At the very end, swap v back for y over x.

Why y = vx works

If the right side is a function of \( \frac{y}{x} \) only, call that ratio v. So \( v = \frac{y}{x} \), that is

\[ y = vx, \]

where v is a new unknown function of x. Differentiate with the product rule (both v and x change):

\[ \frac{dy}{dx} = v + x\frac{dv}{dx}. \]

Try it: on a real solution curve, compare the slope of the ray through the origin (that is v) with the slope of the curve.

Put both into \( \frac{dy}{dx} = g(v) \): \( v + x\frac{dv}{dx} = g(v) \), so \( x\frac{dv}{dx} = g(v) - v \). This separates:

\[ \int \frac{dv}{g(v) - v} = \int \frac{dx}{x} + C. \]

The recipe, step by step

StepWhat to doExample: \( \frac{dy}{dx} = \frac{x + y}{x} \)
1Write \( \frac{dy}{dx} = F(x, y) \) and check F has degree 0.\( F(\lambda x, \lambda y) = F(x, y) \), yes
2Write F in terms of \( \frac{y}{x} \).\( 1 + \frac{y}{x} \)
3Put y = vx and \( \frac{dy}{dx} = v + x\frac{dv}{dx} \).\( v + x\frac{dv}{dx} = 1 + v \)
4Simplify to \( x\frac{dv}{dx} = g(v) - v \).\( x\frac{dv}{dx} = 1 \)
5Separate and integrate.\( dv = \frac{dx}{x} \Rightarrow v = \log|x| + C \)
6Replace v by \( \frac{y}{x} \).\( y = x\log|x| + Cx \)

Guess first: what is dy/dx?

We put y = vx. Guess: is \( \frac{dy}{dx} \) simply v, the way the derivative of 5x is 5?

See what happens
No. v is not a constant: it is the ratio \( \frac{y}{x} \), which changes as you move along the curve. So the product rule gives \( \frac{dy}{dx} = v \cdot 1 + x\frac{dv}{dx} \). If you write only v, the equation becomes \( v = g(v) \), which has no x and no derivative left: the method falls apart. The extra term \( x\frac{dv}{dx} \) is the whole point.

Worked example: partial fractions inside

Solve \( \frac{dy}{dx} = \frac{y^2 + 2xy}{x^2} \).

  1. Top and bottom both have degree 2, so it is homogeneous: \( \frac{dy}{dx} = \left(\frac{y}{x}\right)^2 + 2\frac{y}{x} \).
  2. Put y = vx: \( v + x\frac{dv}{dx} = v^2 + 2v \), so \( x\frac{dv}{dx} = v^2 + v = v(v + 1) \).
  3. Separate: \( \frac{dv}{v(v + 1)} = \frac{dx}{x} \). Partial fractions: \( \frac{1}{v(v+1)} = \frac{1}{v} - \frac{1}{v + 1} \).
  4. Integrate: \( \log\left| \frac{v}{v + 1} \right| = \log|x| + \log|C| \), so \( \frac{v}{v + 1} = Cx \).
  5. Put \( v = \frac{y}{x} \): \( \frac{v}{v+1} = \frac{y}{x + y} \). So \( y = Cx(x + y) \).

Worked example: a particular solution

Solve \( \frac{dy}{dx} = \frac{y}{x} + \tan\frac{y}{x} \), given \( y = \frac{\pi}{2} \) when x = 1.

  1. Already in terms of \( \frac{y}{x} \). Put y = vx: \( v + x\frac{dv}{dx} = v + \tan v \), so \( x\frac{dv}{dx} = \tan v \).
  2. Separate: \( \cot v\,dv = \frac{dx}{x} \). Integrate: \( \log|\sin v| = \log|x| + \log|C| \), so \( \sin v = Cx \).
  3. General solution: \( \sin\frac{y}{x} = Cx \). At x = 1, \( y = \frac{\pi}{2} \): \( \sin\frac{\pi}{2} = C \), so C = 1.
  4. Particular solution: \( \sin\frac{y}{x} = x \).

When it is easier the other way up: x = vy

If the equation comes as \( \frac{dx}{dy} = h\left(\frac{x}{y}\right) \), swap the roles: put x = vy, so \( \frac{dx}{dy} = v + y\frac{dv}{dy} \). For example, \( \frac{dx}{dy} = \frac{x}{y} + \frac{y}{x} \) gives \( v + y\frac{dv}{dy} = v + \frac{1}{v} \), so \( v\,dv = \frac{dy}{y} \), \( \frac{v^2}{2} = \log|y| + C \), and finally \( x^2 = 2y^2(\log|y| + C) \). Use this when the terms are full of \( \frac{x}{y} \), such as \( e^{x/y} \).

Don't mix these up

  • Always swap v back to \( \frac{y}{x} \) at the end. An answer with v in it is unfinished.
  • y = vx goes with \( \frac{dy}{dx} = v + x\frac{dv}{dx} \); x = vy goes with \( \frac{dx}{dy} = v + y\frac{dv}{dy} \). Don't mix the pairs.

Try it. Solve \( (x + 2y)\,dy = (2x - y)\,dx \), which we showed is homogeneous on the previous page.

Answer
\( v + x\frac{dv}{dx} = \frac{2 - v}{1 + 2v} \), so \( x\frac{dv}{dx} = \frac{2 - 2v - 2v^2}{1 + 2v} \). Separate: \( \frac{(1 + 2v)\,dv}{1 - v - v^2} = \frac{2\,dx}{x} \). The top is minus the derivative of the bottom, so \( -\log|1 - v - v^2| = 2\log|x| + C_1 \), which gives \( x^2(1 - v - v^2) = C \). With \( v = \frac{y}{x} \): \( x^2 - xy - y^2 = C \).

Words to know

Substitution y = vx
Naming the ratio \( \frac{y}{x} \) as a new unknown v.
\( v + x\frac{dv}{dx} \)
The derivative of vx by the product rule.
Substitution x = vy
The other way up, for \( \frac{dx}{dy} = h\left(\frac{x}{y}\right) \).
Back-substitution
Replacing v by \( \frac{y}{x} \) at the end.

After putting y = vx in \( \frac{dy}{dx} = \frac{x^2 + y^2}{xy} \), what do you get?

  1. \( v = \frac{1 + v^2}{v} \)
  2. \( v + x\frac{dv}{dx} = \frac{1 + v^2}{v} \)
  3. \( v + x\frac{dv}{dx} = 1 + v^2 \)

Which substitution suits \( \frac{dx}{dy} = \frac{x}{y} + e^{x/y} \)?

  1. y = vx
  2. x = vy
  3. v = xy

Solving a homogeneous equation, you reach \( v = \log|Cx| \). What is the final answer?

  1. \( y = x\log|Cx| \)
  2. \( y = \log|Cx| \)
  3. \( y = \frac{\log|Cx|}{x} \)