#### Provide solution for RD Sharma maths Class 12 Chapter 21 Differential Equation Exercise 21.10 Question 33 textbook solution.

Answer : $y=\left(\frac{x^{2}}{2}+C\right) e^{x}$

Hint : To solve this equation we use $\frac{dy}{dx}+Py=Q$ where P,Q are constants.

Give: $\frac{d y}{d x}-y=x e^{x}$

Solution : $\frac{d y}{d x}+(-1) y=x e^{x}$

\begin{aligned} &=\frac{d y}{d x}+P y=Q \\ &P=-1, Q=x e^{x} \end{aligned}

$If$ of differential equation is

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

\begin{aligned} &y I f=\int \text { QIf } d x+C \\ &=y\left(e^{-x}\right)=\int x e^{x} e^{-x} d x+C \\ &=y\left(e^{-x}\right)=\int x e^{x-x} d x+C \end{aligned}

\begin{aligned} &=y\left(e^{-x}\right)=\int x e^{0} d x+C \\ &=y\left(e^{-x}\right)=\int x d x+C \\ &=y\left(e^{-x}\right)=\frac{x^{1+1}}{1+1}+C \end{aligned}

\begin{aligned} &=y\left(e^{-x}\right)=\frac{x^{2}}{2}+C \\ &=y\left(e^{-x}\right) e^{x}=e^{x}\left(\frac{x^{2}}{2}+C\right) \\ &=y\left(e^{-x+x}\right)=e^{x}\left(\frac{x^{2}}{2}+C\right) \end{aligned}

\begin{aligned} &=y\left(e^{0}\right)=e^{x}\left(\frac{x^{2}}{2}+C\right) \\ &=y=e^{x}\left(\frac{x^{2}}{2}+C\right) \end{aligned}