Example. Find the solution to the Cauchy problem for the equation

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

with the initial condition

$$
y(1)=1 \text {. }
$$
SOLUTION.

1st method.

1. We write the corresponding homogeneous linear equation:

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

This is a separable equation.

2. Separating the variables and integrating, we obtain the general solution of the homogeneous equation

$$
y=C x .
$$

3. We apply the method of variation of the arbitrary constant:

a) we seek the solution of the non-homogeneous equation (8) in the form

$$
y=C(x) x
$$

where $C(x)$ is an unknown function of $x$;

b) substituting into equation (8)

$$
y=C(x) x \quad \text { and } \quad y^{\prime}=C^{\prime}(x) x+C(x),
$$

we obtain a differential equation for $C(x)$

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

This is a separable equation.

Separating the variables

$$
d C=-\frac{2}{x^{3}} d x
$$

and integrating, we get

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

where $C_{0}$ is an arbitrary constant.

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

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

5. Using the initial condition $y(1)=1$, we get

$$
\frac{1}{1^{2}}+C_{0}=1
$$

we find $C_{0}=0$ and substitute it into the general solution (9).

Answer. $y=1 / x$.

2nd method.

1. We seek the solution of equation (8) in the form

$$
y=u(x) v(x)
$$

where $u$ and $v$ are unknown functions of $x$.

2. Equation (8) takes the form

$$
u^{\prime} v+u v^{\prime}-\frac{1}{x} u v=-\frac{2}{x^{2}}
$$

3. Since we now have two unknown functions, and the equation they must satisfy is only one, we can take another equation arbitrarily, as long as it does not narrow the set of solutions $y$.

Let one of the functions (for example, $u(x)$) satisfy the equation

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

Then equation (10) takes the form

$$
v^{\prime} u=-\frac{2}{x^{2}}
$$

Solving equation (11) (a separable equation), we find

$$
u(x)=A x
$$

where $A$ is an arbitrary constant ( $A \neq 0$, to not narrow the set of solutions).

4. Substituting $u(x)$ into equation (12) and solving it for $v$:

$$
v^{\prime}=-\frac{2}{A x^{3}} \Longrightarrow v=\frac{1}{A x^{2}}+B
$$

where $B$ is an arbitrary constant.

5. We write the general solution of equation (8) in the form

$$
y(x)=u(x) v(x)=\frac{1}{x}+C x
$$

where $C=A B$ is an arbitrary constant.

6. Using the initial condition $y(1)=1$, we find $C=0$.

Answer. $y=1 / x$.

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

1. $x y^{\prime}+y-e^{x}=0, \quad y(0)=1$.
2. $y^{\prime}-y \operatorname{tg} x=\frac{1}{\cos x}, \quad y(0)=0$.
3. $y^{\prime} \cos ^{2} x+y=\operatorname{tg} x, \quad y(0)=0$.
4. $y^{\prime}-y \operatorname{th} x=\operatorname{ch}^{2} x$,

$y(0)=0$.
5. $y^{\prime}-\frac{y}{x \ln x}=x \ln x$,

$y(e)=\frac{e^{2}}{2}$.
6. $y^{\prime} \sin x-y \cos x=1$,

$y\left(\frac{\pi}{2}\right)=0$.
7. $y^{\prime}-y \operatorname{tg} x=\cos x$,

$y(0)=0$.
8. $y^{\prime}-2 x y=3 x^{2}-2 x^{4}$,

$y(0)=0$.
9. $x y^{\prime}-2 y=2 x^{4}$,

$y(1)=0$.
10. $y^{\prime}+y \cos x=e^{\sin x}$,

$y(0)=0$.

Answers.

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

## 11.5. Bernoulli Equation

Problem Statement. Find the solution of the Cauchy problem for the Bernoulli equation

$$
y^{\prime}+g(x) y=f(x) y^{\alpha} \quad(\alpha \neq 0,1)
$$

with the initial condition

$$
y\left(x_{0}\right)=y_{0}
$$

PLAN OF SOLUTION.

1. Using the substitution

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

the equation is reduced to a linear equation

$$
z^{\prime}+p(x) z=q(x)
$$

where $p=(1-\alpha) g$ and $q=(1-\alpha) f$.

2. We solve the linear equation (2) and make the substitution $z=y^{1-\alpha}$.
3. Using the initial condition $\left(1^{\prime}\right)$, we find the solution of the given Cauchy problem.

We write the answer in the form $y=\varphi(x)$.

Remark. When solving the Bernoulli equation, we can avoid reducing it to a linear equation and instead seek the solution in the form $y=u(x) v(x)$ or apply the method of variation of the arbitrary constant.