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

Answer:\begin{aligned} \sin \left(\frac{y}{x}\right)=\log |x|+\frac{1}{\sqrt{2}} \\ \end{aligned}

Given:\begin{aligned} &x\cos \left(\frac{y}{x}\right) \frac{d y}{d x}=y \cos \left(\frac{y}{x}\right)+x \end{aligned}

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,

\begin{aligned} &x\cos \left(\frac{y}{x}\right) \frac{d y}{d x}=y \cos \left(\frac{y}{x}\right)+x \end{aligned}      ....(i)

It is homogeneous equation.

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

So,

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

Separating the variables and integrating both side we get

\begin{aligned} &\int \cos v d v=\int \frac{d x}{x} \\ &\Rightarrow \sin v=\log |x|+c \\ &\text { Putting } v=\frac{y}{x} \\ &\Rightarrow \sin \left(\frac{y}{x}\right)=\log |x|+c \end{aligned}            ...(ii)

It is given that $y=\frac{\pi }{4}$ when $x=1$

Putting $y=\frac{\pi }{4}$$x=1$ in equation (ii) we get

$\Rightarrow \sin \left ( \frac{\pi }{4} \right )=c$

$\Rightarrow c=\frac{1}{\sqrt{2}}$

Putting value of c in equation (ii) we get

$\Rightarrow \sin \left ( \frac{y}{x} \right )=log\mid x\mid +\frac{1}{\sqrt{2}}$

This is required solution.