#### Explain solution RD Sharma class 12 chapter Differential Equation exercise 21.3 question 12 maths

$y=e^{x}(A \cos x+B \sin x)$  is a solution of given equation

Hint:

Differentiate the given solution and substitute in the differential equation.

Given:

$y=e^{x}(A \cos x+B \sin x)$  is a solution of the equation

Solution:

Differentiating on both sides with respect to $x$

\begin{aligned} &\frac{d y}{d x}=\frac{d}{d x}\left[e^{x}(A \cos x+B \sin x)\right] \\\\ &\frac{d y}{d x}=\frac{d}{d x}\left[e^{x} A \cos x\right]+\frac{d}{d x}\left[e^{x} B \sin x\right] \end{aligned}

$\frac{d y}{d x}=A\left[e^{x} \frac{d}{d x}(\cos x)+\cos x \frac{d}{d x}\left(e^{x}\right)\right]+B\left[e^{x} \frac{d}{d x}(\sin x)+\sin x \frac{d}{d x}\left(e^{x}\right)\right]$

\begin{aligned} &\frac{d y}{d x}=A\left[e^{x}(-\sin x)+\cos x\left(e^{x}\right)\right]+B\left[e^{x}(\cos x)+\sin x\left(e^{x}\right)\right] \\\\ &\frac{d y}{d x}=e^{x}[-A \sin x+A \cos x]+e^{x}[B \cos x+B \sin x] \end{aligned}            ............(i)

Differentiate equation (i) with respect to $x$

\begin{aligned} &\frac{d^{2} y}{d x^{2}}=\frac{d}{d x}\left[e^{x}[-A \sin x+A \cos x]+e^{x}[B \cos x+B \sin x]\right] \\\\ &\frac{d^{2} y}{d x^{2}}=A \frac{d}{d x}\left[-e^{x} \sin x+e^{x} \cos x\right]+B \frac{d}{d x}\left[e^{x} \cos x+e^{x} \sin x\right] \end{aligned}

\begin{aligned} &\frac{d^{2} y}{d x^{2}}=A\left[-\left(e^{x} \cos x+e^{x} \sin x\right)+e^{x}(-\sin x)+e^{x} \cos x\right]+B\left[\left(e^{x}(-\sin x)+e^{x} \cos x\right)+e^{x}(\cos x)+e^{x} \sin x\right] \\\\ &\frac{d^{2} y}{d x^{2}}=A\left[e^{x}(-\cos x-\sin x)+e^{x}(\cos x-\sin x)\right]+B\left[e^{x}(\cos x-\sin x)+e^{x}(\cos x+\sin x)\right] \end{aligned}

\begin{aligned} &\frac{d^{2} y}{d x^{2}}=e^{x}[-A \sin x-A \cos x+A \cos x-A \sin x]+e^{x}[B \cos x-B \sin x+B \cos x+B \sin x] \\\\ &\frac{d^{2} y}{d x^{2}}=e^{x}[-2 A \sin x]+e^{x}[2 B \cos x] \end{aligned}

\begin{aligned} &\frac{d^{2} y}{d x^{2}}=e^{x}[2 B \cos x-2 A \sin x] \\\\ &\frac{d^{2} y}{d x^{2}}=2 e^{x}[-A \sin x+B \cos x]+2 e^{x}[A \cos x+B \sin x]-2 e^{x}[A \cos x+B \sin x] \end{aligned}

[on Adding and subtracting the value of $y$ in the above step ]

$\frac{d^{2} y}{d x^{2}}=2\left[e^{x}(-A \sin x+B \cos x)+e^{x}(A \cos x+B \sin x)\right]-2 e^{x}\left ( A\cos x+B\sin x \right )$

Put value of $y$ as per question and value of equation (i) in above equation

\begin{aligned} &\frac{d^{2} y}{d x^{2}}=2 \frac{d y}{d x}-2 y \\\\ &\frac{d^{2} y}{d x^{2}}-2 \frac{d y}{d x}+2 y=0 \end{aligned}

Hence it is proved that $y=e^{x}(A \cos x+B \sin x)$ is solution of given equation.