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

Answer : $y=-e^{-x}+\frac{x}{e}$

Given : $x \frac{d y}{d x}-y=(x+1) e^{-2 x}, y(1)=0$

Hint : Using integration by parts and $\int \frac{1}{x} d x$

Explanation : $x \frac{d y}{d x}-y=(x+1) e^{-2 x}$

Divide by x , we get

\begin{aligned} &=\frac{d y}{d x}-y\left(\frac{1}{x}\right)=\frac{(x+1)}{x} e^{-x} \\ &=\frac{d y}{d x}+y\left(\frac{-1}{x}\right)=\frac{(x+1)}{x} e^{-x} \end{aligned}

This is a linear differential equation of the form

\begin{aligned} &\frac{d y}{d x}+P x=Q \\ &P=-\frac{1}{x} \text { and } Q=\frac{(x+1)}{x} e^{-x} \end{aligned}

The integrating factor $If$  of this differential equation is

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

Hence, is the solution is

\begin{aligned} &y I f=\int \text { QIfd } x+C \\ &=y\left(\frac{1}{x}\right)=\int \frac{(x+1)}{x} e^{-x} \frac{1}{x} d x+C \\ &=\frac{y}{x}=\int \frac{(x+1)}{x} e^{-x} \frac{1}{x} d x+C \end{aligned}

\begin{aligned} &=\frac{y}{x}=I_{1}+C \ldots(i) \\ &=I_{1}=\int \frac{(x+1)}{x} e^{-x} \frac{1}{x} d x+C \\ &=\frac{1}{x} \frac{e^{-x}}{-1}-\int\left(\frac{-1}{x^{2}}\right) \frac{e^{-x}}{-1} d x+\int \frac{e^{-x}}{x^{2}} d x \end{aligned}

\begin{aligned} &=-\frac{e^{-x}}{x}-\int \frac{e^{-x}}{x^{2}} d x+\int \frac{e^{-x}}{x^{2}} d x \\ &=-\frac{e^{-x}}{x} \end{aligned}

By (i) $\frac{y}{x}=-\frac{e^{-x}}{x}+C$

Multiply by x

\begin{aligned} &=y=-e^{-x}+C x \ldots(i i) \\ &\text{Now}\; y(1)=0 \text { when } x=1, y=0 \\ &=0=-e^{-1}+C(1) \\ &=0=-\frac{1}{e}+C \\ &=C=\frac{1}{e} \end{aligned}

Put in (ii)

\begin{aligned} &=y=-e^{-x}+\frac{1}{e} x \\ &=y=-e^{-}+\frac{x}{e} \end{aligned}