Explain solution for RD Sharma Class 12 Chapter 21 Differential Equation Exercise 21.10 Question 36 subquestion (ix) maths textbook solution.

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

Give : $\frac{d y}{d x} \cos ^{2} x=\tan x-y$

Hint : Using integration by parts.

Explanation: $\frac{d y}{d x} \cos ^{2} x=\tan x-y$

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

Divide by $\cos^{2}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(\frac{1}{\cos ^{2} x}\right) y=\frac{\tan x}{\cos ^{2} x} \end{aligned}

This is a first order linear differential equation of the form

\begin{aligned} &\frac{d y}{d x}+P y=Q \\ &P=\frac{1}{\cos ^{2} x} \operatorname{and} Q=\frac{\tan x}{\cos ^{2} x} \end{aligned}

The integrating factor $If$  of this differential equation is

\begin{aligned} &I f=e^{\int P d x} \\ &=e^{\int \frac{1}{\cos ^{2} x} d x} \\ &=e^{\int \sec ^{2} x d x} \\ &=e^{\tan x} \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \quad\left[\int \sec ^{2} x d x=\tan x+C\right] \end{aligned}

Hence, the solution of different equation is

\begin{aligned} &y I f=\int Q I f d x+C \\ &=y e^{\tan x}=\int \frac{\tan x}{\cos ^{2} x} e^{\tan x} d x+C \end{aligned}                   ......(i)

Using integration by parts,

$=\int \tan x \sec ^{2} x e^{\tan x} d x+C$

Put $\tan x=t, \sec ^{2} x d x=d t$

\begin{aligned} &=\int t e^{t} d t+C \\ &=t e^{t}-\int(1) e^{t} d t \\ &=t e^{t}-e^{t}+C \\ &=\tan x e^{\tan x}-e^{\tan x}+C \end{aligned}

Put in (i)

$=y e^{\tan x}=\tan x e^{\tan x}-e^{\tan x}+C$

Divide by $e^{\tan x}$

$=y=\tan x-1+\frac{C}{e^{\tan x}}$