#### Provide Solution For  R.D. Sharma Maths Class 12 Chapter 21 Differential Equations Exercise 21.9 Question 22 Maths Textbook Solution.

Answer: $\tan \left ( \frac{y}{x} \right )=log\left ( \frac{c}{x} \right )$

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

To Solve: We have to solve the given differential equation.

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

Solution: Here, given that

$\Rightarrow x\frac{dy}{dx}=y-x\cos ^{2}\left ( \frac{x}{y} \right )$

$\Rightarrow \frac{dy}{dx}=\frac{y-x\cos ^{2}\left ( \frac{y}{x} \right )}{x}\rightarrow \left ( 1 \right )$

It is homogeneous equation.

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

So, equation $\left ( 1 \right )$ becomes

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

Separating the variables we get

\begin{aligned} &\Rightarrow \int \frac{d v}{\cos ^{2} v}=-\int \frac{d x}{x} \\ &\Rightarrow \int \sec ^{2} v d v=-\int \frac{d x}{x} \\ &\Rightarrow \tan v=-\log x+\log c \\ \end{aligned}

$\qquad \Rightarrow \tan \left(\frac{y}{x}\right)=\log \left(\frac{c}{x}\right)\left[\therefore \log c-\log x=\log \left(\frac{c}{x}\right)\right]$

This is required solution