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

Answer :  $y e^{\tan x}=e^{\tan x}(\tan x-1)+c$

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

Given    : $\cos ^{2} x \frac{d y}{d x}+y=\tan x$

Solution : $\cos ^{2} x \frac{d y}{d x}+y=\tan x$

\begin{aligned} \frac{d y}{d x}+\frac{y}{\cos ^{2} x} &=\frac{\tan x}{\cos ^{2} x} \\ \frac{d y}{d x}+\left(\sec ^{2} x\right) y &=(\tan x) \sec ^{2} x \end{aligned}

Comparing with ,

$\frac{dy}{dx}+Py=Q$

Where, $\mathrm{P}=\sec ^{2} x, \mathrm{Q}=(\tan x)\left(\sec ^{2} x\right)$

Now,

\begin{aligned} \text { I.F } &=e^{\int \sec ^{2} x d x} \\ &=e^{\tan x} \end{aligned}

So, the solution is

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

Now,

$I=\int \tan x\left(\sec ^{2} x\right) \times e^{\tan x} d x$

Integrating by parts,

\begin{aligned} &\text { Put } t=\tan x \\ &d t=\sec ^{2} x d x \end{aligned}

Therefore,

\begin{aligned} I &=\int\left(t \times e^{t}\right) d t \\ I &=t \times \int e^{t} d t-\int\left(\frac{d t}{d t} \times \int e^{t} d t\right) d t \\ &=t e^{t}-\int e^{t} d t \\ &=t e^{t}-e^{t} \end{aligned}

Therefore,

\begin{aligned} I &=\tan x e^{\tan x}-e^{\tan x} \\ &=e^{\tan x}(\tan x-1) \end{aligned}

Hence, the required solution is

$y e^{\tan x}=e^{\tan x}(\tan x-1)+c$