#### Please Solve RD Sharma Class 12 Chapter 21 Differential Equation Exercise 21.10 Question 13 Maths Textbook Solution.

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

Hint: To solve this equation we use $e^{\int Pdx}$  formula.

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

Solution:  $\frac{d y}{d x}+P(x) y=Q(x)$

\begin{aligned} &\text { If }=e^{\int P(x) d x} \\ &\end{aligned}

$y \text { If }=\int Q(x) \text { If }d x \\$

$\frac{d y}{d x}+y=\cos x \\$

$P(x)=1, Q(x)=\cos x \\$

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

$=e^{x} \\$

$y e^{x}=\int \cos x e^{x} d x \ldots(i) \\$

$y\: \text{If}=\int Q(x)\text{If} \: d x$

Suppose   \begin{aligned} & I=\int \cos x e^{x} d x\\ & \end{aligned}

$=\cos e^{x}-\int(-\sin x) e^{x} d x\\$

$=-\cos x e^{x}+-\int \sin x e^{x} d x\\$

$=I=\cos x e^{x}+\sin x e^{x}-\int \cos x e^{x} d x$

\begin{aligned} &=I=e^{x}(\cos x+\sin x)-I \\ \end{aligned}

$=2 I=e^{x}(\cos x+\sin x) \\$

$=I=\frac{e^{x}}{2}(\cos x+\sin x) \ldots(i i) \\$

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