Solve the following initial value problem,
$$
\begin{align}
\frac{dy}{dx} &= \frac{20x - 2y}{7x - y} \\
y(0) &= 8
\end{align}
$$
This is a homogeneous equation. First we find the general solution following the paradigm.
We divide the right hand side top and bottom by $ x$ to write the right hand side as a function of $ y/x$
$$
\frac{dy}{dx} = \frac{20 - 2(y/x)}{7 - (y/x)}
$$
Substitute $ v=y/x,$ hence $ y=vx$ and by the product rule, $ dy/dx = v + x dv/dx$
$$
v + x \frac{dv}{dx} = \frac{20 - 2v}{7 - v}
$$
Solve this separable equation
Separate the variables.
$$
x \frac{dv}{dx} = \frac{20 - 2v}{7 - v} - v
= \frac{20 - 9v + v^2}{7 - v}
$$
$$
\frac{(7 - v)dv}{20 - 9v + v^2} = \frac{dx}{x}
$$
Integrate both sides.
We use partial fractions to rewrite
$$
\frac{7 - v}{20 - 9v + v^2} = \frac{2}{v - 5}- \frac{3}{v - 4}
$$
We can then integrate both sides of the equation in substep i to get
$$
2\log|v - 5| - 3\log|v - 4| = \log|x| + C
$$
Solve for v
We exponentiate both sides to get
$$
\frac{(v - 5)^{2}}{(v - 4)^{3}} = kx
$$
Which we can also write as
$$
(v - 5)^{2} = kx(v - 4)^{3}
$$
Check for singular solutions.
We divided by $20 - 9v + v^2$ which is 0 when $ v = 5$ and $ v = 4.$ We check these are both solutions (though $ v = 5$ is already in the general solution when $ k = 0$).
Back substitute.
$ v = y/x$ so our general solution becomes
$$
(y/x - 5)^{2} = kx(y/x - 4)^{3}
$$
Multiplying both sides by $x^{2}$ we can simplify this to
$$
(y - 5x)^{2} = k(y - 4x)^{3}
$$
Finally, our singular solutions are $ y/x = 5$ and $ y/x = 4$, which simplify to $ y = 5x$ and $ y = 4x.$
Now we plug in our initial value, $ y(0) = 8.$ We get $ (8)^{2} = k(8)^{3}$ and we solve this for $ k = 1/8,$ so the solution to the initial value problem is
$$
(y - 5x)^{2} = (1/8)(y - 4x)^{3}
$$
You may reload this page to generate additional examples.