#### Provide solution for  RD Sharma maths Class 12 Chapter 21 Differential Equation Exercise Revision Exercise (RE) Question 56 textbook solution.

Answer : $x y \sec x=\tan x+c$

Hint       : You must know the rules of solving differential equation and integration

Given    : $x \cos x \frac{d y}{d x}+y(x \sin x+\cos x)=1$

Solution :

\begin{aligned} x \cos x \frac{d y}{d x}+y(x \sin x+\cos x) &=1 \\ \frac{d y}{d x}+y\left(\frac{x \sin x}{x \cos x}+\frac{\cos x}{x \cos x}\right) &=\frac{1}{x \cos x} \\ \frac{d y}{d x}+\left(\tan x+\frac{1}{x}\right) y &=\frac{1}{x \cos x} \end{aligned}

Comparing with, $\frac{d y}{d x}+P y=Q$

Where, $P=\tan x+\frac{1}{x}, Q=\frac{1}{x \cos x}$

Therefore,

\begin{aligned} I . F &=e^{\int\left(\tan x+\frac{1}{x}\right) d x} \\ &=e^{\log |\sec x|+\log |x|} \\ &=e^{\log |x \sec x|} \\ &=|x \sec x| \end{aligned}                   $\left[e^{\log x}=x\right]$

So the solution is,

\begin{aligned} y \times I . F &=\int(I . F) \times(Q) d x+C \\ x y \sec x &=\int x \sec x \times \frac{1}{x \cos x} d x+c \\ &=\int \sec ^{2} x+c \\ x y \sec x &=\tan x+c \end{aligned}    $\left[\int \sec ^{2} x d x=\tan x\right]$