Please solve RD Sharma Class 12 Chapter 21 Differential Equation Exercise 21.10 Question 37 Subquestion (ii) maths textbook solution.

Answer : $x+y+\log x=1$

Give : $x \frac{d y}{d x}-y=\log x, y(1)=0$

Hint : Using $\int \frac{1}{x} d x$

Explanation : $x \frac{d y}{d x}-y=\log x$

Divide by x

$=\frac{d y}{d x}+\left(\frac{-1}{x}\right) y=\frac{\log x}{x}$

This is a first order linear differential equation of the form

\begin{aligned} &\frac{d y}{d x}+P x=Q \\ &P=\frac{-1}{x} \text { and } Q=\frac{\log x}{x} \end{aligned}

The integrating factor $If$  of this differential equation is

\begin{aligned} &I f=e^{\int P d x} \\ &=e^{\int \frac{-1}{x} d x} \\ &=e^{-\int \frac{1}{x} d x} \; \; \; \; \; \; \; \; \; \; \; \; \; \quad\left[\int \frac{1}{x} d x=\log |x|+C\right] \end{aligned}

\begin{aligned} &=e^{-\log x} \\ &=e^{\log x^{-1}} \\ &=x^{-1} \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \quad\left[e^{\log e^{x}}=x\right] \\ &=\frac{1}{x} \end{aligned}

Hence, the solution of different equation is

\begin{aligned} &y I f=\int Q I f d x+C \\ &=y \frac{1}{x}=\int \frac{\log x}{x} \frac{1}{x} d x+C \\ &=\frac{y}{x}=\int \frac{\log x}{x} \frac{1}{x} d x+C \end{aligned}             .....(i)

We have $\int \frac{\log x}{x} \frac{1}{x} d x$

Put

\begin{aligned} \log & x=t \Rightarrow x=e^{t} \\ &=\frac{1}{x} d x=d t\; \; \; \; \; \; \; \; \; \; \; \quad \quad\left[\log a^{b}=x, b=a^{x}\right] \\ &=\int \frac{t}{e^{t}} d t \\ &=\int t e^{-t} d t \end{aligned}

Using integration by parts

\begin{aligned} &=t \frac{e^{-t}}{-1}-\int(1) \frac{e^{-t}}{-1} d t \\ &=-t e^{-t}+e^{-t}+C \\ &=-\frac{t}{e^{t}}+\frac{1}{e^{t}}+C \\ &=-\frac{\log x}{x}+\frac{1}{x}+C \end{aligned}

Substituting in (i)

$=\frac{y}{x}=-\frac{\log x}{x}+\frac{1}{x}+C$

Multiplying by x

$=y=1-\log x+C$                 ......(ii)

Given $y(1)=0$

When $x=1,y=0$

\begin{aligned} &=0=1-0+C \; \; \; \; \; \; \; \; \; \; \quad[\log 0=1] \\ &=C=-1 \end{aligned}

Substituting in (ii)

\begin{aligned} &=y=1-\log x-1 x \\ &=y=1-\log x-x \\ &=y++\log x=1 \end{aligned}