Homogeneous 1st Order Differential Equations

$dy/dx = F(y/x)$

Homogenous Differential Equation First Order
Standard Integration » Power Series Solution of DE » 1st Order Differential Equation » Numerical Methods for DE

Interactive Homogeneous DE Solver

Solve $dy/dx = G(x,y)$

Enter the DE as $dy/dx = \text{expression}$. The solver will attempt the substitution $y=vx$.

For equations like $M(x,y)dx + N(x,y)dy = 0$, first rearrange to $dy/dx = -M(x,y)/N(x,y)$.

Initial Condition (Optional)

Homogeneous Differential Equations Defined

A first-order differential equation is said to be homogeneous if it can be expressed in the form:

$$ \frac{dy}{dx} = F\left(\frac{y}{x}\right) $$

This means that the right-hand side of the equation can be written as a function of the ratio $y/x$ alone.

Alternatively, a differential equation of the form $M(x,y)dx + N(x,y)dy = 0$ is homogeneous if both $M(x,y)$ and $N(x,y)$ are homogeneous functions of the same degree. A function $f(x,y)$ is homogeneous of degree $n$ if $f(tx, ty) = t^n f(x,y)$ for any scalar $t$. If $M$ and $N$ are homogeneous of the same degree $n$, then $\frac{dy}{dx} = -\frac{M(x,y)}{N(x,y)}$ can be written as $F(y/x)$ by dividing the numerator and denominator by $x^n$.

Example: Consider $\frac{dy}{dx} = \frac{x^2 + y^2}{xy}$.

To check if it's homogeneous, we can substitute $y=vx$ into the right side, or see if we can rewrite it as a function of $y/x$. Divide numerator and denominator by $x^2$ (assuming $x \neq 0$): $$ \frac{dy}{dx} = \frac{\frac{x^2}{x^2} + \frac{y^2}{x^2}}{\frac{xy}{x^2}} = \frac{1 + (y/x)^2}{y/x} $$ This is of the form $F(y/x)$ where $F(v) = \frac{1+v^2}{v}$, so the DE is homogeneous.

Solution Method: Substitution $y=vx$

Homogeneous first-order differential equations are typically solved by making the substitution $y = vx$. Here, $v$ is treated as a new dependent variable which is a function of $x$. This substitution transforms the original DE into a separable one.

The steps are as follows:

  1. Identify Homogeneity and Substitute $y=vx$ into $G(x,y)$:
    Given $\frac{dy}{dx} = G(x,y)$. Substitute $y=vx$ into $G(x,y)$. If $G(x,vx)$ simplifies to an expression $F(v)$ that depends only on $v$ (i.e., all $x$'s cancel out), the equation is homogeneous.
  2. Find $dy/dx$ in terms of $v$ and $x$:
    Since $y=vx$, differentiate with respect to $x$ using the product rule: $$ \frac{dy}{dx} = \frac{d}{dx}(vx) = v \cdot \frac{dx}{dx} + x \cdot \frac{dv}{dx} = v + x \frac{dv}{dx} $$
  3. Transform the DE:
    Substitute the expression for $dy/dx$ and $G(x,y)=F(v)$ into the original DE: $$ v + x \frac{dv}{dx} = F(v) $$
  4. Separate Variables:
    Rearrange the transformed equation to separate variables $v$ and $x$: $$ x \frac{dv}{dx} = F(v) - v $$ Assuming $F(v) - v \neq 0$ (if $F(v)-v=0$, then $v$ is constant, so $y=Cx$ is a solution): $$ \frac{1}{F(v) - v} \, dv = \frac{1}{x} \, dx $$ This is now a separable differential equation.
  5. Integrate Both Sides:
    Integrate both sides of the separated equation: $$ \int \frac{1}{F(v) - v} \, dv = \int \frac{1}{x} \, dx $$ The right side typically integrates to $\ln|x| + C_1$. The left side's integral, say $H(v)$, will depend on the form of $F(v)-v$. So, $H(v) = \ln|x| + C$.
  6. Substitute Back $v=y/x$:
    Replace $v$ with $y/x$ in the integrated equation to obtain the general solution in terms of $x$ and $y$. This solution is often implicit: $$ H\left(\frac{y}{x}\right) = \ln|x| + C $$
  7. Apply Initial Conditions (if any):
    If an initial condition $y(x_0)=y_0$ is given (where $x_0 \neq 0$), substitute these values into the general solution to find the value of the constant $C$, yielding a particular solution.

Example Walkthrough: $2x \frac{dy}{dx} = x+3y$

1. Rewrite in the form $dy/dx = G(x,y)$:

Divide by $2x$ (assuming $x \neq 0$):

$$ \frac{dy}{dx} = \frac{x+3y}{2x} $$

2. Test for homogeneity / Substitute $y=vx$ into $G(x,y)$ to find $F(v)$:

Let $G(x,y) = \frac{x+3y}{2x}$. Substitute $y=vx$:

$$ F(v) = G(x,vx) = \frac{x+3(vx)}{2x} = \frac{x(1+3v)}{2x} = \frac{1+3v}{2} $$

Since this expression depends only on $v$, the DE is homogeneous.

3. Substitute $dy/dx = v + x(dv/dx)$:

The transformed DE becomes:

$$ v + x\frac{dv}{dx} = \frac{1+3v}{2} $$

4. Separate Variables:

First, isolate $x \frac{dv}{dx}$:

$$ x\frac{dv}{dx} = \frac{1+3v}{2} - v $$

Combine terms on the right side:

$$ x\frac{dv}{dx} = \frac{1+3v-2v}{2} = \frac{1+v}{2} $$

Now, separate $v$ and $x$ terms (assuming $1+v \neq 0$):

$$ \frac{2}{1+v} dv = \frac{1}{x} dx $$

5. Integrate Both Sides:

$$ \int \frac{2}{1+v} dv = \int \frac{1}{x} dx $$

The left integral is $2\ln|1+v|$. The right integral is $\ln|x|$. So:

$$ 2\ln|1+v| = \ln|x| + C_1 $$

We can rewrite $C_1$ as $\ln|C|$ for some constant $C \neq 0$ (or handle $C=0$ as a special case leading to $(1+v)^2=0$):

$$ \ln|(1+v)^2| = \ln|x| + \ln|C| = \ln|Cx| $$

Exponentiating both sides gives:

$$ (1+v)^2 = \pm Cx $$

Let $K = \pm C$ be an arbitrary constant ( $K$ can be positive, negative. If $C_1$ was arbitrary, then $(1+v)^2 = Kx$ for some constant K, including $K=0$ if $1+v=0$ was a solution path):

$$ (1+v)^2 = Kx $$

6. Substitute Back $v=y/x$:

$$ \left(1+\frac{y}{x}\right)^2 = Kx $$

Simplify the term in parentheses:

$$ \left(\frac{x+y}{x}\right)^2 = Kx $$ $$ \frac{(x+y)^2}{x^2} = Kx $$

Multiplying by $x^2$ gives the general implicit solution:

$$ (x+y)^2 = Kx^3 $$