#### Explain solution RD Sharma class 12 Chapter 21 Differential Equation exercise 21.10 question 36 subquetsion (ii)

Answer:  $y=\frac{1}{5}(2 \sin 2 x-\cos 2 x)+C e^{x}$

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

Hint: Using integration by parts

Explanation: \begin{aligned} & \frac{d y}{d x}-y=\cos 2 x \\ & \end{aligned}

$\frac{d y}{d x}+(-1) y=\cos 2 x$

This is a first order linear differential equation of the form

\begin{aligned} &\frac{d y}{d x}+P y=Q \\ &P=-1 \text { and } Q=\cos 2 x \end{aligned}

The integrating factor $If$  of this differential equation is

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

$=e^{\int-1 d x} \\$

$=e^{-\int 1 d x} \quad\left[\int d c=x+C\right] \\$

$=e^{-x}$

Hence, the solution of differential equation is

\begin{aligned} &y(I f)=\int Q I f d x+C \\ & \end{aligned}

$\Rightarrow y\left(e^{-x}\right)=\int(\cos 2 x) e^{-x} d x+C \\$

$\Rightarrow y e^{-x}=\int e^{-x} \cos 2 x d x+C \\$

$\Rightarrow y e^{-x}=\int\left(e^{-x}\right)(\cos 2 x) d x+C$

\begin{aligned} \text { Let } I=& \int\left(e^{-x}\right)(\cos 2 x) d x+C \\ \end{aligned}

$\Rightarrow I=e^{-x} \int \cos 2 x d x-\int \frac{d}{d x}\left(e^{-x}\right)\left(\int \cos 2 x d x\right) d x+C \\$

$\Rightarrow I=e^{-x}\left(\frac{\sin 2 x}{2}\right)-\int-e^{-x}\left(\frac{\sin 2 x}{2}\right) d x+C \\$

$\Rightarrow I=\frac{1}{2} e^{-x} \sin 2 x+\frac{1}{2} \int e^{-x} \sin 2 x d x+C$

\begin{aligned} &\Rightarrow I=\frac{1}{2} e^{-x} \sin 2 x+\frac{1}{2}\left\{\left[e^{-x}\left(\int \sin 2 x d x\right)\right]-\int \frac{d}{d x} e^{-x}\left(\int \sin 2 x d x\right) d x+C\right\} \\ & \end{aligned}

$\Rightarrow I=\frac{1}{2} e^{-x} \sin 2 x+\frac{1}{2}\left\{\left[e^{-x}\left(\frac{-\cos 2 x}{2}\right)\right]-\int-e^{-x}\left(-\frac{\cos 2 x}{2}\right) d x+c\right\} \\$

$\Rightarrow I=\frac{1}{2} e^{-x} \sin 2 x+\frac{1}{2}\left\{\left[-\frac{1}{2} e^{-x} \cos 2 x\right]-\frac{1}{2} \int-e^{-x}(-\cos 2 x) d x+C\right\} \\$

$\Rightarrow I=\frac{1}{2} e^{-x} \sin 2 x+\frac{1}{2}\left\{\left[-\frac{1}{2} e^{-x} \cos 2 x\right]-\frac{1}{2} \int e^{-x} \cos 2 x d x+c\right\}$

\begin{aligned} &\Rightarrow I=\frac{1}{2} e^{-x} \sin 2 x+\frac{1}{2}\left\{\left[-\frac{1}{2} e^{-x} \cos 2 x\right]-\frac{1}{2} I\right\} \\ & \end{aligned}

$\Rightarrow I=\frac{1}{2} e^{-x} \sin 2 x+\frac{1}{2}\left(-\frac{1}{2} e^{-x} \cos 2 x\right)+\frac{1}{2}\left(-\frac{1}{2} I\right) \\$

$\Rightarrow I=\frac{1}{2} e^{-x} \sin 2 x-\frac{1}{4} e^{-x} \cos 2 x-\frac{1}{4} I \\$

$\Rightarrow I+\frac{1}{4} I=\frac{1}{2} e^{-x} \sin 2 x-\frac{1}{4} e^{-x} \cos 2 x$

\begin{aligned} &\Rightarrow I+\frac{1}{4} I=\frac{1}{2} e^{-x} \sin 2 x-\frac{1}{4} e^{-x} \cos 2 x \\ & \end{aligned}

$\Rightarrow \frac{5}{4} I=\frac{1}{4} 2 e^{-x} \sin 2 x-\frac{1}{4} e^{-x} \cos 2 x \\$

$\Rightarrow \frac{5}{4} I=\frac{1}{4} e^{-x}(2 \sin 2 x-\cos 2 x) \\$

$\Rightarrow 5 I=e^{-x}(2 \sin 2 x-\cos 2 x) \\$

$\therefore I=\frac{e^{-x}}{5}(2 \sin 2 x-\cos 2 x)$

By substituting the value of   in the original integral we get

\begin{aligned} &\Rightarrow y e^{-x}=\frac{e^{-x}}{5}(2 \sin 2 x-\cos 2 x)+C \\ & \end{aligned}

$\Rightarrow y e^{-x} e^{x}=e^{x}\left[\frac{e^{-x}}{5}(2 \sin 2 x-\cos 2 x)+C\right] \\$

$\Rightarrow y e^{-x} e^{x}=\frac{e^{x-x}}{5}(2 \sin 2 x-\cos 2 x)+C e^{x} \\$

$\therefore y=\frac{1}{5}(2 \sin 2 x-\cos 2 x)+C e^{x}$