Skip to content
Tutorials Center
My learning

Topics

Lesson 8 of 39 ยท First-order ODEs

Substitutions: Homogeneous and Bernoulli Equations

Turn hard first-order ODEs into easy ones with substitutions: y = vx for homogeneous equations, v = y^(1-n) for Bernoulli, and v = ax+by+c. Verified in Python.

When an equation is neither separable nor linear nor exact, the most powerful move is to change variables until it becomes one of the types you already know. The art lies in recognizing which substitution fits. Three families cover a large share of textbook and real problems: homogeneous equations, Bernoulli equations, and equations whose right side depends on a linear combination a*x + b*y.

Homogeneous equations (the y = v*x substitution)

In this context an equation y' = f(x, y) is homogeneous if f depends only on the ratio y/x, meaning f(x, y) = G(y/x). (This is a different use of the word from "homogeneous linear equation".) Examples: y' = (x + y)/x, y' = (x**2 + y**2)/(x*y), y' = y/x + sin(y/x).

Substitute v = y/x, so y = v*x and y' = v + x*v'. The equation becomes v + x*v' = G(v), i.e. x*v' = G(v) - v, which is separable:

dv/(G(v) - v) = dx/x.

Solve, then replace v by y/x.

Worked example

y' = (x + y)/x = 1 + y/x. With y = v*x: v + x*v' = 1 + v, so x*v' = 1, v = ln|x| + C, and y = x*(ln|x| + C).

Python Homogeneous equation by y = vx

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

For y' = (x**2 + y**2)/(x*y), divide numerator and denominator by x**2: G(v) = (1 + v**2)/v, so x*v' = 1/v, v*dv = dx/x, v**2/2 = ln|x| + C, hence y**2 = 2*x**2*ln|x| + C*x**2.

Bernoulli equations

A Bernoulli equation has the form

y' + p(x)*y = g(x)*y**n,

with n any real number. If n = 0 or 1 it is already linear. Otherwise, set v = y**(1 - n). Then v' = (1 - n)*y**(-n)*y'; dividing the original equation by y**n gives y**(-n)*y' + p*y**(1 - n) = g, which translates to

v'/(1 - n) + p*v = g, or v' + (1 - n)*p*v = (1 - n)*g: linear in v. Solve it with an integrating factor, then undo the substitution.

Worked example

y' + y = x*y**3: here n = 3, v = y**(-2), and the equation becomes v' - 2*v = -2*x. The integrating factor is e**(-2*x); the solution is v = x + 1/2 + C*e**(2*x), so y = 1/sqrt(x + 1/2 + C*e**(2*x)). Note y = 0 is also a solution (lost when dividing by y**n).

Python Bernoulli: compare formula and numerical solution

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The logistic equation P' = r*P - (r/K)*P**2 is a Bernoulli equation with n = 2; the substitution v = 1/P makes it linear, an alternative to separation.

Other substitutions worth knowing

  • Linear argument: if y' = F(a*x + b*y + c), let v = a*x + b*y + c. Then v' = a + b*F(v), which is autonomous and separable. Example: y' = (x + y)**2 with v = x + y gives v' = 1 + v**2, so v = tan(x + C) and y = tan(x + C) - x.
  • Reduction of order for missing variables: y'' = f(x, y') has no y; let p = y' and solve the first-order equation p' = f(x, p). If x is missing, let p = y' and use y'' = p*dp/dy.
  • Almost homogeneous: y' = F((a*x + b*y + c)/(d*x + e*y + f)) becomes homogeneous after shifting x and y to the intersection point of the two lines.
Python Linear-argument substitution

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Choosing a method

Which first-order method?

Separable y' = g(t) h(y)
Linear y' + p y = g, use mu
Exact M_y equals N_x

Try these three first

1 / 2

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which substitution handles y' = (x2 + y2)/(x*y)?

    Dividing top and bottom by x**2 shows the right side depends only on y/x, so use y = v*x.
  2. 2. For y' + p(x) y = g(x) y**3, the linearizing substitution is

    For Bernoulli with exponent n, set v = y**(1 - n); with n = 3 that is y**(-2).
  3. 3. After y = v*x, the homogeneous equation becomes

    x v' = G(v) - v can be written dv/(G(v) - v) = dx/x.
  4. 4. For y' = (x + y)**2, a good substitution is

    The right side is a function of x + y, so v = x + y gives the separable equation v' = 1 + v**2.

Summary

  • Homogeneous (y' = G(y/x)): put y = v*x to get a separable equation for v.
  • Bernoulli (y' + p y = g y**n): put v = y**(1 - n) to get a linear equation.
  • If the right side is a function of a*x + b*y, let v be that combination.
  • Reduction of order handles second-order equations missing y or x.
  • Remember to restore the original variable and to check constant solutions that division may have discarded.

Next: Autonomous Equations, Equilibria and Stability