Example 3. Solve the Cauchy problem:

$$
\begin{aligned}
x(x-1) y^{\prime}+y & =x^{2}(2 x-1) \\
\left.y\right|_{x=2} & =4
\end{aligned}
$$
Solution. We look for the general solution of equation (9) in the form

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

we have $y^{\prime}=u^{\prime} v+u v^{\prime}$.

Substituting the expressions for $y$ and $y^{\prime}$ into (9), we get

$$
x(x-1)\left(u^{\prime} v+u v^{\prime}\right)+u v=x^{2}(2 x-1)
$$

or

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

The function $v=v(x)$ is found from the condition $x(x-1) v^{\prime}+v=0$. Taking any particular solution of the last equation, for example $v=\frac{x}{x-1}$, and substituting it into (11), we get the equation $u^{\prime}=2 x-1$, from which we find the function $u(x)=x^{2}-x+C$. Therefore, the general solution of equation (9) will be

$$
y=u v=\left(x^{2}-x+C\right) \frac{x}{x-1}, \text { or } y=\frac{C x}{x-1}+x^{2}
$$

Using the initial condition (10), we get the equation for finding $C$: $4=C \frac{2}{2-1}+2^{2}$, from which $C=0$; so the solution to the given Cauchy problem will be

$$
y=x^{2}
$$

$\Delta$