Answer
The solution of the given initial-value problem
$$
x y^{\prime}-y=x \ln x \quad\quad y(1)=2
$$
is
$$
y=\frac{1}{2} x(\ln x)^{2}+2 x
$$
Work Step by Step
The initial-value problem is:
$$
x y^{\prime}-y=x \ln x \quad\quad y(1)=2
$$
$$
x y^{\prime}-y=x \ln x \Rightarrow y^{\prime}-\frac{1}{x} y=\ln x \quad\quad (1)
$$
This is a linear equation and the integrating factor is
$$
I(x)=e^{\int(-1 / x) d x}=e^{-\ln |x|}=\left(e^{\ln |x|}\right)^{-1}=|x|^{-1}=1 / x
$$
Multiplying Eq.(1) by $1 / x $ gives
$$
\frac{1}{x} y^{\prime}-\frac{1}{x^{2}} y=\frac{1}{x} \ln x \Rightarrow\left(\frac{1}{x} y\right)^{\prime}=\frac{1}{x} \ln x
$$
Then we integrate both sides of the last equation:
$$
\frac{1}{x} y=\int \frac{\ln x}{x} d x \Rightarrow \frac{1}{x} y=\frac{1}{2}(\ln x)^{2}+C
$$
So the solution of the differential equation is:
$$
y=\frac{1}{2} x(\ln x)^{2}+C x
$$
Now
$$
y(1)=2 \Rightarrow 2=0+C \Rightarrow C=2,
$$
Thus:
$$
y=\frac{1}{2} x(\ln x)^{2}+2 x
$$