Provide Solution for RD Sharma Class 12 Chapter 21 Differential Equation Exercise 21.10 Question 37 subquestion (ii)

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

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

Hint: Using  \begin{aligned} &\int \frac{1}{x} d x\\ & \end{aligned}

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 \\ & \end{aligned}

$P=\frac{-1}{x} \text { and } Q=\frac{\log x}{x}$

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] \\ &=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 \ldots(i) \end{aligned}

We have  \begin{aligned} &\int \frac{\log x}{x} \frac{1}{x} d x \\ & \end{aligned}

Put  $x=t \Rightarrow x=e^{t}$

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 \ldots(i i)$

Given  $y\left ( 1 \right )= 0$

\begin{aligned} \text { When } x &=1, y=0 \\ &=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}