Example 6. Integrate the equation

$$
x^{2}(x-1) y^{\prime}-y^{2}-x(x-2) y=0
$$
Solution. The given equation can be brought to the form

$$
y^{\prime}-\frac{x(x-2)}{x^{2}(x-1)} y=\frac{1}{x^{2}(x-1)} y^{2}
$$

This is a Bernoulli equation, i.e., an equation of the form (9.28). Here,

$$
p(x)=-\frac{x(x-2)}{x^{2}(x-1)} ; q(x)=\frac{1}{x^{2}(x-1)} ; \alpha=2
$$

The substitution (9.29) in this case takes the form

$$
u(x)=y^{1-\alpha}=y^{1-2}=y^{-1}=\frac{1}{y}
$$

That is,

$$
u(x)=\frac{1}{y}, y=\frac{1}{u(x)}
$$

from which

$$
u^{\prime}(x)=-\frac{1}{y^{2}} y^{\prime}, y^{\prime}=-y^{2} u^{\prime}(x)
$$

Substituting (B) and (C) into equation (A), we obtain a linear inhomogeneous equation with respect to $u$:

$$
x^{2}(x-1) \frac{d u}{d x}+x(x-2) u=-1
$$

We solve the corresponding homogeneous linear equation:

$$
x^{2}(x-1) \frac{d u}{d x}+x(x-2) u=0
$$

Since

$$
\frac{d u}{d x}=-\frac{x(x-2)}{x^{2}(x-1)} \cdot u
$$

and

$$
\frac{d u}{u}=-\frac{x-2}{x(x-1)} d x=-\left(\frac{2}{x}-\frac{1}{x-1}\right) d x
$$

then

$$
\begin{gathered}
\ln u=-2 \ln x+\ln (x-1)+\ln C_{1} \\
\ln u=\ln \frac{C_{1}(x-1)}{x^{2}},
\end{gathered}
$$

from which

$$
u=\frac{C_{1}(x-1)}{x^{2}}
$$

The general solution of equation (D) is sought using the method of variation of arbitrary constants.

We assume

$$
u=C_{1}(x) \cdot \frac{x-1}{x^{2}}
$$

Differentiating the function $u(x)$, we get

$$
\frac{d u}{d x}=C_{1}^{\prime}(x) \frac{x-1}{x^{2}}+C_{1}(x) \frac{2-x}{x^{3}}
$$

Substituting (H) into equation (D), we find

$$
x^{2}(x-1)\left[C_{1}^{\prime}(x) \frac{x-1}{x^{2}}+C_{1}(x) \frac{2-x}{x^{3}}\right]+
$$

$$
+x(x-2) C_{1}(x) \frac{x-1}{x^{2}}=-1
$$

or

$$
\begin{gathered}
C_{1}^{\prime}(x)=-\frac{1}{(x-1)^{2}}, \frac{d C_{1}(x)}{d x}=-\frac{1}{(x-1)^{2}}, d C_{1}=-\frac{d x}{(x-1)^{2}} \\
C_{1}(x)=\frac{1}{x-1}+C
\end{gathered}
$$

Substituting (J) into (G), we obtain the general solution of equation (D):

$$
u(x)=\frac{x-1}{x^{2}}\left[\frac{1}{x-1}+C\right]
$$

Transitioning to the variable $y$, we get:

$$
\begin{gathered}
\frac{1}{y}=\left(C+\frac{1}{x-1}\right) \frac{x-1}{x^{2}} \\
\frac{1}{y}=C \frac{x-1}{x^{2}}+\frac{1}{x^{2}}=\frac{1+C(x-1)}{x^{2}}
\end{gathered}
$$

Therefore,

$$
y=\frac{x^{2}}{1+C(x-1)}
$$

is the general solution of the original equation.

## Problems

Find the general solutions of the linear differential equations of the first order:

1. $y^{\prime}-4 y=e^{2 x}$.
2. $y^{\prime}-\frac{x y}{x^{2}+1}=x$.
3. $y^{\prime}+\frac{x}{1-x^{2}} y=1$.
4. $y^{\prime}-\frac{2 x}{1+x^{2}} y=1+x^{2}$.
5. $y^{\prime}-y \operatorname{tg} x=\frac{2 x}{\cos x}$.
6. $y^{\prime} x-y-x^{2}=0$.
7. $y^{\prime}-\frac{2 x}{x^{2}+1} y=2 x\left(x^{2}+1\right)$.
8. $y^{\prime} \cos x+y \sin x=1$.

Integrate the Bernoulli equations:
9. $y y^{\prime}+y^{2}+4 x(x+1)=0$.
10. $x y^{\prime}-4 y=x^{2} \sqrt{y}$.

## Answers

1. $y=C e^{4 x}-\frac{1}{2} e^{2 x}$.
2. $y=1+x^{2}+C \sqrt{1+x^{2}}$.
3. $y=\sqrt{1-x^{2}} \times$

$\times(\arcsin x+C)$. 4. $y=(x+C)\left(1+x^{2}\right)$. $\quad$ 5. $y=\frac{x^{2}+C}{\cos x} . \quad$ 6. $y=x^{2}+C x$.
7. $y=C\left(x^{2}+1\right)+\left(x^{2}+1\right)^{2}$.
8. $y=C \cos x+\sin x$.
9. $4 x^{2}+y^{2}=C e^{-2 x}$.

10. $y=x^{4}(\ln \sqrt{x}+C)^{2}$.

## § 9.4. Equations in Total Differentials

An equation in total differentials is a differential equation

$$
P(x, y) d x+Q(x, y) d y=0
$$

where the left-hand side is the total differential of some function:

$$
P(x, y) d x+Q(x, y) d y=d u(x, y)
$$

Equation (9.30) with (9.31) can be written as:

$$
d u(x, y)=0
$$

so its general integral has the form

$$
u(x, y)=C
$$

The function $u(x, y)$ can be found from the system of equations:

$$
\frac{\partial u}{\partial x}=P(x, y) ; \frac{\partial u}{\partial y}=Q(x, y)
$$

The equality

$$
\frac{\partial P}{\partial y}=\frac{\partial Q}{\partial x}
$$

is a necessary and sufficient condition for the left-hand side of equation (9.30) to be the total differential of some function.

If the left-hand side of equation (9.30) is not a total differential and there exists a function $\mu=\mu(x, y)$ such that

$$
\mu(P d x+Q d y)=d u
$$

then the function $\mu=\mu(x, y)$ is called an integrating factor.

The function $\mu(x, y)$ satisfies the equation

$$
\frac{\partial}{\partial y}(\mu P)=\frac{\partial}{\partial x}(\mu Q)
$$

If

$$
\frac{1}{Q}\left(\frac{\partial P}{\partial y}-\frac{\partial Q}{\partial x}\right)=f(x)
$$

then the integrating factor depends only on $x$, i.e.,

$$
\mu=\mu(x) .
$$

If

$$
\frac{1}{P}\left(\frac{\partial P}{\partial y}-\frac{\partial Q}{\partial x}\right)=\varphi(y)
$$

then the integrating factor depends only on $y$, i.e.,

$$
\mu=\mu(y)
$$