#### Explain Solution R.D.Sharma Class 12 Chapter 21 Differential Equations Exercise 21.9 Question 38 Maths Textbook Solution.

Answer: $\frac{2}{3} \tan ^{-1}\left(\frac{2 y+x}{x \sqrt{3}}\right)-\frac{\pi}{\sqrt{3}}=\log \left(x^{2}+x y+y^{2}\right)$

Given: $\left ( x-y \right )\frac{dy}{dx}=x+2y$

To find: we have to find the solution of given differential equation.

Hint: we will put $y=vx \: and\: \frac{dy}{dx}=v+x\frac{dv}{dx}$

Solution: we have,

$\left ( x-y \right )\frac{dy}{dx}=x+2y$            ..(i)

It is homogeneous equation.

put $y=vx \: and\: \frac{dy}{dx}=v+x\frac{dv}{dx}$

So,

\begin{aligned} &(x-v x)\left(v+x \frac{d v}{d x}\right)=x+2 v x \\ &\Rightarrow(1-v)\left(v+x \frac{d v}{d x}\right)=1+2 v \\ &\Rightarrow v+x \frac{d v}{d x}=\frac{1+2 v}{1-v} \\ &\Rightarrow x \frac{d v}{d x}=\frac{1+2 v}{1-v}-v \\ &\Rightarrow x \frac{d v}{d x}=\frac{1+2 v-v(1-v)}{1-v} \\ &\Rightarrow x \frac{d v}{d x}=\frac{1+2 v+v^{2}}{1-v} \end{aligned}

Separating the variables and integrating both side we get

\begin{aligned} &\int \frac{v-1}{1+2 v+v^{2}} d v=-\int \frac{d x}{x} \\ &\Rightarrow \int \frac{\frac{1}{2}(2 v+1)-\frac{3}{2}}{1+v+v^{2}} d v=-\log |x| \\ &\Rightarrow \frac{1}{2} \int \frac{(2 v+1)}{1+v+v^{2}}-\frac{3}{2} \int \frac{1}{1+v+v^{2}} d v=-\log |x| \\ &\Rightarrow \log \left|1+v+v^{2}\right|-3 \int \frac{1}{v^{2}+v+1+\left(\frac{1}{2}\right)^{4}-\left(\frac{1}{2}\right)^{2}}=-2 \log |x| \end{aligned}

\begin{aligned} &\left.\Rightarrow \log \left|v^{2}+v+1\right|-3 \frac{1}{\frac{\sqrt{3}}{2}} \tan ^{-1} \mid \frac{v+\frac{1}{2}}{\frac{\sqrt{3}}{2}}\right)=-2 \log |x|\\ &\text { Putting } \mathrm{v}=\frac{y}{x}\\ &\Rightarrow \log \left|\frac{y^{2}}{x^{2}}+\frac{y}{x}+1\right|-2 \sqrt{3} \tan ^{-1}\left(\frac{\frac{2 y}{x}+1}{\sqrt{3}}\right)=-\log |x|+c\\ &\Rightarrow \log \left|y^{2}+x y+x^{2}\right|-\log x^{2}-2 \sqrt{3} \tan ^{-1}\left(\frac{2 y+x}{x \sqrt{3}}\right)=-\log x^{2}+c\\ &\Rightarrow \log \left|y^{2}+x y+x^{2}\right|=c+2 \sqrt{3} \tan ^{-1}\left(\frac{2 y+x}{x \sqrt{3}}\right) \end{aligned}

It is given that y=0 when x=1

Putting y=0, x=1 in equation (ii) we get

\begin{aligned} &\Rightarrow \log |1|=c+2 \sqrt{3} \tan ^{-1}\left(\frac{1}{\sqrt{3}}\right) \\ &\Rightarrow 0=c+2 \sqrt{3} \times \frac{\pi}{6} \\ &\Rightarrow c=-\frac{\pi}{\sqrt{3}} \\ \end{aligned}

Putting value of c in equation (ii) we get

\begin{aligned} &\Rightarrow \log \left|y^{2}+x y+x^{2}\right|=2 \sqrt{3} \tan ^{-1}\left(\frac{2 y+x}{x \sqrt{3}}\right)-\frac{\pi}{\sqrt{3}} \end{aligned}

This is required solution.