#### Provide solution for RD Sharma maths Class 12 Chapter 21 Differential Equation Exercise 21.10 Question 37 Subquestion (vi) textbook solution.

Answer : $y=x^{2}+\cos x$

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

Hint : Using $\int \frac{1}{1+x^{2}} d x$

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

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

This is a linear differential equation of the form

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

The integrating factor $If$of this differential equation is

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

Hence, the solution is

\begin{aligned} &y I f=\int Q I f d x+C \\ &=y \sec x=\int\left(2 x+x^{2} \tan x\right) \sec x d x+C \\ &=y \sec x=I+C \ldots(i) \\ &=I=\int\left(2 x+x^{2} \tan x\right) \sec x d x \end{aligned}

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

Substituting in (i)

$=y \sec x=x^{2} \sec x+C$

Dividing by $\sec\; x$

\begin{aligned} &=y=x^{2}+\frac{C}{\sec x} \\ &=y=x^{2}+C \cos x \ldots(i i) \end{aligned}

Now

\begin{aligned} &y(0)=1 \text { when } x=0, y=1 \\ &\quad=1=0^{2}+C \cos (0) \\ &\quad=1=+C(1) \quad[\cos 0=1] \\ &\; \; \; \; =C=1 \end{aligned}

Substituting in (ii)

\begin{aligned} &=y=x^{2}+(1) \cos x \\ &=y=x^{2}+\cos x \end{aligned}