Find the general solution for each of the following differential equations. x \frac{d y}{d x}+y=x \log x
Find the general solution for each of the following differential equations. x \frac{d y}{d x}+y=x \log x

Solution:

x \frac{d y}{d x}+y=x \log x\dots (1)
To solve (1) we will use following formula
\begin{array}{l} \int \frac{1}{x} d x=\log x \\ a^{\log _{a} b=b} \\ \qquad \int u \cdot v d x=u . \int v d x-\int\left(\frac{d u}{d x} \cdot \int v d x d\right) d x \\ \frac{d}{d x}(\log x)=1 / x \\ \int x^{n} d x=\frac{x^{n+1}}{n+1} \end{array}
General solution :
For the differential equation in the form of is given by,\frac{d y}{d x}+P y=Q
y \cdot(I . F .)=\int Q \cdot(I . F .) d x+c
Where, integrating factor,
\text { I. } F .=e \int^{p d x}
Dividing equation (1) by x,
\frac{d y}{d x}+\frac{1}{x} y=\log x \ldots \ldots \ldots(2)
Comparing (2) with
\frac{d y}{d x}+P y=Q
Where, \mathrm{P}=\frac{1}{x} and \mathrm{Q}=\log x
Therefore, integrating factor is
\begin{array}{c} \text { I. } F .=e \int p d x \\ \qquad e^{\frac{1}{x} d x} \\ e^{\log x} \ldots \ldots \ldots \cdots \cdot \frac{1}{x} d x=\log x \\ x \ldots \ldots \ldots\left(a^{\log _{a} b}=b\right) \end{array}
General solution is
\begin{array}{r} y \cdot(I . F .)=\int Q \cdot(I . F \cdot) d x+c \\ y \cdot(x)=\int(x \log x) d x+c \ldots \ldots \ldots(3) \end{array}
Let,
\mathrm{I}=\int(x \log x) d x
Let, u=\log x \& v=x
\begin{array}{l} I=\log x \int x d x-\int\left(\frac{d}{d x}(\log x) \cdot \int x d x\right) d x \\ \left(\int u \cdot v d x=u \cdot \int v d x-\int\left(\frac{d u}{d x} \cdot \int v d x\right) d x\right) \\ I=\log x \cdot \frac{x^{2}}{2}-\int \frac{1}{x} \cdot \frac{x^{2}}{2} \mathrm{~d} \mathrm{x} \\ \mathrm{I}=\frac{x^{2}}{2} \cdot \log x-\frac{x^{2}}{4} \end{array}
Substituting I in (3), we get
\mathrm{xy}=\frac{x^{2}}{2} . \log x-\frac{x^{2}}{4}+C
Multiplying above equation by 4 we get
4 x y=2 x^{2} \cdot \log x-x^{2}+4 c