Solve the following differential equation:-

\[x \log x\frac{dy}{dx} + y = \frac{2}{x}\log x\]

#### Solution

We have,

\[x \log x\frac{dy}{dx} + y = \frac{2}{x}\log x\]

Dividing both sides by `x log x,` we get

\[\frac{dy}{dx} + \frac{y}{x \log x} = \frac{2}{x}\frac{\log x}{x \log x}\]

\[ \Rightarrow \frac{dy}{dx} + \frac{y}{x \log x} = \frac{2}{x^2}\]

\[ \Rightarrow \frac{dy}{dx} + \left( \frac{1}{x \log x} \right)y = \frac{2}{x^2}\]

\[\text{Comparing with }\frac{dy}{dx} + Py = Q,\text{ we get}\]

\[P = \frac{1}{x \log x} \]

\[Q = \frac{2}{x^2}\]

Now,

\[I . F . = e^{\int P\ dx} \]

\[ = e^{\int\frac{1}{x \log x}dx} \]

\[ = e^{\log\left| \left( \log x \right) \right|} \]

\[ = \log x\]

So, the solution is given by

\[y \times I . F . = \int Q \times I . F . dx + C\]

\[ \Rightarrow y\log x = 2\int\frac{1}{x^2} \times \log x dx + C\]

\[ \Rightarrow y\log x = I + C . . . . . . . . \left( 1 \right)\]

Where,

\[ \Rightarrow I = 2\log x\int\frac{1}{x^2} dx - 2\int\left[ \frac{d}{dx}\left( \log x \right)\int\frac{1}{x^2} dx \right]dx\]

\[ \Rightarrow I = \frac{- 2}{x}\log x + 2\int\left[ \frac{1}{x^2} \right]dx\]

\[ \Rightarrow I = \frac{- 2}{x}\log x - \frac{2}{x} . . . . . . . . \left( 2 \right)\]

From (1) and (2) we get

\[ \therefore y\log x = \frac{- 2}{x}\log x - \frac{2}{x} + C\]

\[ \Rightarrow y\log x = \frac{- 2}{x}\left( \log x + 1 \right) + C\]