Example 6. Solve the differential equation

$$
\left(1+x^{2} y^{2}\right) y+(x y-1)^{2} \cdot x \cdot y^{\prime}=0
$$
Solution. Obviously, the variables cannot be separated. Let's perform the substitution $x y = z$, i.e., $y = \frac{z}{x}$, where $z$ is a new unknown function of the argument $x$. Differentiating the first equality, we get $y + x y' = z'$. Hence, $x y' = z' - y$. Substituting into the original equation gives:

\[
\left(1 + z^2\right) \cdot \frac{z}{x} + (z-1)^2 \left(z' - \frac{z}{x}\right) = 0, \quad \text{or} \quad z'(z-1)^2 + \frac{2z^2}{x} = 0.
\]

Replacing $z' = \frac{dz}{dx}$ and separating the variables, we get:

\[
\frac{(z+1)^2}{z^2} dz = -\frac{2 dx}{x}.
\]

After integration, we obtain:

\[
z - 2 \ln |z| - \frac{1}{z} = -2 \ln |x| + C.
\]

It remains to return to the variables $x$ and $y$ (where $z = x y$):

\[
x y - 2 \ln |x y| - \frac{1}{x y} + 2 \ln |x| = C
\]

Answer. \( x y - \frac{1}{x y} - 2 \ln |y| = C \).

## Exercises

Find the general solutions or general integrals of the differential equations, and where initial conditions are given, find the corresponding particular solutions.

1. \( y' x^3 = 2 y - 5 \). 2. \( y(1 - x^2) dy - x(1 - y^2) dx = 0 \).
2. \( y' = \sin x \cdot \sin y \). 4. \( (1 + y^2) dx = (1 + x^2) dy \).
3. \( 3 e^x \tan y dx + (1 - e^x) \cos^{-2} y dy = 0 \).
4. \( (1 + x^2) y' + y \sqrt{1 + x^2} = x y ; x = 0, y = 1 \).
5. \( (1 + e^x) y dy = e^x dx \). 8. \( (1 + e^x) y \cdot y' = e^y ; x = 0, y = 0 \).
6. \( y' = (8 x + 2 y + 1)^2 \). 10. \( (2 x - y) dx = (2 y - 4 x - 3) dy \).
7. \( \frac{y'}{y} = \frac{\ln y}{\sin x} \).

## Answers

1. \( \ln \sqrt{2 y - 5} = -\frac{1}{2 x^2} + C \). 2. \( 1 - y^2 = (1 - x^2) \cdot C \).
2. \( \tan \frac{y}{2} = C e^{-\cos x} \). 4. \( y = -\frac{C + x}{C x - 1} \). 5. \( \tan y = C (1 - e^x)^3 \).
3. \( (x + \sqrt{1 + x^2}) y = C \sqrt{1 + x^2} ; (x + \sqrt{1 + x^2}) y = \sqrt{1 + x^2} \).
4. \( y^2 = 2 \ln (1 + e^x) + C \). 8. \( (1 + y) e^{-y} = \ln (1 + e^x) - x + C \).
5. \( 8 x + 2 y + 1 = 2 \tan (4 x + c) \).
6. \( 5 x + 10 y + C = 3 \ln |10 x - 5 y + 6| \). 11. \( \ln y = C \cdot \tan \frac{x}{2} \).

## § 3. Homogeneous Equations of the First Order

$1^{\circ}$. A homogeneous equation of the first order is a differential equation of the form

\[
y' = f\left(\frac{y}{x}\right)
\]

By using the substitution \(\frac{y}{x} = t\), i.e., \(y = t x, y' = t' x + t\), the homogeneous equation can be reduced to an equation with separable variables in terms of the new function \(t = t(x)\).

$2^{\circ}$. An equation of the form \(y' = f\left(\frac{a_1 x + b_1 y + c_1}{a_2 x + b_2 y + c_2}\right)\), where \(\left|\begin{array}{cc}a_1 & b_1 \\ a_2 & b_2\end{array}\right| \neq 0\), can be reduced to a homogeneous equation by the substitutions \(x = u + x_0, y = v + y_0\), where \(x_0\) and \(y_0\) are numbers satisfying the system of equations

\[
\left\{\begin{array}{l}
a_1 x_0 + b_1 y_0 + c_1 = 0 \\
a_2 x_0 + b_2 y_0 + c_2 = 0
\end{array}\right.
\]

Considering the equality \(y' = \frac{dy}{dx} = \frac{d(v + y_0)}{d(u + x_0)} = \frac{dv}{du} = v'\), the given equation can be reduced to a homogeneous equation in terms of the new function \(v = v(u)\):

\[
v' = f\left(\frac{a_1 u + b_1 v}{a_2 u + b_2 v}\right)
\]

If the reduced linear system is unsolvable, i.e., its determinant is zero, then the given equation can be reduced to an equation with separable variables by the substitution \(a_1 x + b_1 y = z\) (see point $3^{\circ}$ and Example 3 from § 2).

## Examples with Solutions