#### Need solution for RD Sharma Maths Class 12 Chapter 21 Differential Equation Excercise 21.10 Question 37 subquestion (ix)

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

Give:   \begin{aligned} & \frac{d y}{d x}+2 y \tan x=\sin x, y=0 \text { when } x=\frac{\pi}{3} \\ & \end{aligned}

Hint: Using  $\int \tan x d x$

Explanation:  $\frac{d y}{d x}+y \cot x=4 x \operatorname{cosec} x \\$

\begin{aligned} &\frac{d y}{d x}+2 y \tan x=\sin x \\ &=\frac{d y}{d x}+(2 \tan x) y=\sin x \end{aligned}

This is a linear differential equation of the form

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

The integrating factor $If$  of this differential equation is

\begin{aligned} &I f=e^{\int P d x} \\ &=e^{\int 2 \tan x d x} \\ &=e^{2 \int \tan x d x} \end{aligned}

\begin{aligned} &=e^{2 \log |\sec x|} \qquad\left[\int \tan x d x=\log |\sec x|+C\right] \\ &=e^{\log \sec ^{2} x} \\ &=\sec ^{2} x \qquad\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 ^{2} x=\int\left(\sin x \sec ^{2} x\right) d x+C \\ &=y \sec ^{2} x=\int \sin x \frac{1}{\cos ^{2} x} d x+C \end{aligned}
\begin{aligned} &=y \sec ^{2} x=\int \frac{\sin x}{\cos x} \frac{1}{\cos x} d x+C \\ &=y \sec ^{2} x=\int \tan x \sec x d x+C \qquad\left[\tan x=\frac{\sin x}{\cos x}\right] \\ &=y \sec ^{2} x=\sec x+C \qquad \quad\left[\int \tan x \sec x d x=\sec x+C\right] \end{aligned}

Divide by $\sec x$

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

Now  \begin{aligned} y &=0 \text { when } x=\frac{\pi}{3} \\ & \end{aligned}

$=0 \sec x=1+C \cos \frac{\pi}{3}$

\begin{aligned} &=0=1+C\left(\frac{1}{2}\right) \qquad\left[\cos \frac{\pi}{3}=\frac{1}{2}\right] \\ &=\frac{C}{2}=-1 \\ &=C=-2 \end{aligned}

Substituting in (i)

$=y \sec x=1-2 \cos x$

Divide by $\sec x$

\begin{aligned} &=y=\frac{1}{\sec x}-\frac{2 \cos x}{\sec x} \\ &=y=\cos x-2 \cos x \cos x \qquad\left[\frac{1}{\sec x}=\cos x\right] \\ &=y=\cos x-2 \cos ^{2} x \end{aligned}