Example. Find the solution to the Cauchy problem

$$
x y^{\prime}+y=x y^{2}
$$

with the initial condition

$$
y(1)=1
$$
Solution.

By transforming the equation to the form

$$
y^{\prime}+\frac{1}{x} y=y^{2}
$$

we confirm that this is a Bernoulli equation with $\alpha=2$.

1. Using the substitution

$$
y=z^{1 /(1-\alpha)}=z^{-1}
$$

the equation (3) is transformed into a linear equation

$$
z^{\prime}-\frac{1}{x} z=-1
$$

2. We solve equation (4) using the method of variation of arbitrary constants:

a) solving the homogeneous equation

$$
z^{\prime}-\frac{1}{x} z=0
$$

we get $z=C x$

b) we seek the solution of the non-homogeneous equation in the form

$$
z=C(x) x
$$

c) substituting into equation (4)

$$
z=C(x) x, \quad z^{\prime}=C^{\prime}(x) x+C(x)
$$

we obtain a separable equation

$$
C^{\prime}(x) x=-1
$$

Separating variables and integrating, we get

$$
C(x)=C_{0}-\ln x
$$

Thus, the general solution of the non-homogeneous equation (4) is

$$
z=x\left(C_{0}-\ln x\right)
$$

or, after substituting $z=y^{-1}$,

$$
y=\frac{1}{x\left(C_{0}-\ln x\right)}
$$

3. Using the initial condition $y(1)=1$:

$$
\frac{1}{1\left(C_{0}-0\right)}=1
$$

we get $C_{0}=1$.

Answer. $y=\frac{1}{x(1-\ln x)}$.

Conditions of the problems. Find the solutions of the Cauchy problems for differential equations.

1. $x y^{\prime}=4 y=x^{2} \sqrt{y}, \quad y(1)=0$.
2. $y^{\prime}-\frac{2 x y}{1+x^{2}}=\frac{4 \sqrt{y}}{\sqrt{1+x^{2}}} \operatorname{arctg} x, \quad y(1)=\frac{\pi^{4}}{128}$.
3. $x y^{\prime}+y=-x^{2} y^{2}$,

$y(1)=1$.
4. $x y^{\prime}+y=y^{2} \ln x$,
$y(1)=1$.
5. $(x+1) y^{\prime}+y=-y^{2}(x+1)$,

$y(0)=1$.
6. $y^{\prime}+2 y=e^{x} y^{2}$,

$y(0)=1$.
7. $y^{\prime}+y=x y^{2}$,

$y(0)=1$.
8. $y^{\prime}+\frac{2 y}{x}=\frac{2 \sqrt{y}}{\cos ^{2} x}$,

$y(\pi)=\frac{1}{\pi^{2}}$.
9. $y^{\prime} \operatorname{sh} x+y \operatorname{ch} x=\frac{\operatorname{sh} 2 x}{2} y^{2}$,

$y(0)=\frac{1}{\operatorname{sh} 1}$.
10. $y^{\prime}-y \operatorname{tg} x+y^{2} \cos x=0$,

$y(0)=1$.

## Answers.

1. $y=\frac{x^{4}}{4} \ln ^{2}|x|$.
2. $y=\left(1+x^{2}\right) \operatorname{arctg}^{4} x$.
3. $y=\frac{1}{x^{2}}$.
4. $y=\frac{1}{1+\ln x}$.
5. $y=\frac{1}{(1+x)(1+\ln |1+x|)}$.
6. $y=e^{-x}$.
7. $y=\frac{1}{1+x}$.
8. $y=\left(\frac{1+\ln |\cos x|}{x}+\operatorname{tg} x\right)^{2}$.
9. $y=\frac{1}{\operatorname{sh} x}$.
10. $y=\frac{1}{(x+1) \cos x}$.

## 11.6. Equations in Total Differentials

Problem Statement. Find the integral curves of the differential equation

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

Plan of Solution.

1. If in some domain $D$, $P(x, y)$ and $Q(x, y)$ have continuous partial derivatives and the condition

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

is satisfied, then $P(x, y) d x+Q(x, y) d y$ is the differential of some function $U(x, y)$. Then equation (1) is called an equation in total differentials and can be written as

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

where $U(x, y)$ is a twice continuously differentiable unknown function.

From ( $1^{\prime}$ ) it follows that the integral curves are determined by the equation $U(x, y)=C$ for all possible values of $C$.

To find $U$, note that

$$
\frac{\partial U}{\partial x}=P(x, y), \quad \frac{\partial U}{\partial y}=Q(x, y)
$$

2. Integrating the first equation in (2) with respect to $x$, we get

$$
U=\int P(x, y) d x+\varphi(y)
$$

where $\varphi(y)$ is an unknown function that still needs to be found.

3. Differentiating $U$ with respect to $y$, we have

$$
\frac{\partial U}{\partial y}=\frac{\partial}{\partial y} \int P(x, y) d x+\varphi^{\prime}(y)
$$

Using the second equation in (2), we get the equation

$$
\frac{\partial}{\partial y} \int P(x, y) d x+\varphi^{\prime}(y)=Q(x, y)
$$

4. We find $\varphi(y)$ and then $U(x, y)$.

Answer. The integral curves are determined by the equation $U(x, y)=C$ for all possible values of $C$.